Jump to content

Mediv

Members
  • Posts

    79
  • Joined

  • Last visited

Posts posted by Mediv

  1. The same question arises when editing data grid, made ​​with Timer.

    Perhaps this is what you need.

     

    procedure DataVirtualTableAfterEdit(DataSet: TDataSet);
    begin
     inherited;
     UniTimer.Enabled := True;
    end;
    
    //
    procedure UniTimerTimer(Sender: TObject);
    begin
     inherited;
    
     UniTimer.Enabled := False;
    //
       DataVirtualTable.DisableControls;
       ...
       DataVirtualTable.edit;
       ...
       DataVirtualTable.post;
       ...
           
       DataVirtualTable.Next;
    //
     DataVirtualTable.EnableControls;    
    end;
    

  2. Всем привет, подскажите как реализовать такую вещь.

    К гриду привязан набор данных, при хождении по строкам в гриде отрабатывает DataChange на источнике данных,

    в нем происходит выполнения другого запроса, как повесить маску на время выполнения второго селекта?

    Спасибо.

  3. У меня в проекте 150-200 пользователей, сколько одновременно работает сказать не могу, но exe в диспетчере показывает в среднем 500-600 метров,

    бывало и 800 и клиент работал, каждую ночь стоит перезапуск на всякий случай.

    Сервер на линуксе, там подняли виртуалку и в ней висит проект.

    Почти год работаем - полет нормальный.

  4. Use this for filename generation:

     

    formatdatetime('yyyymmddhhnnzzz', now) + '.pdf'

    this is absolute unique :)

     

    Mortymer

    I have added a random at the end, there were cases when the 1s formed more than one report.

  5. Hi,

    I have posted a temporary example (that works!!) on modified/extend component for obtain dynamic lookup on big tables, search/filter/order in a grid....

    There are some problems on delay and response time...

    Please tell me what you think.... :rolleyes:

     

    http://62.149.239.41:8077

     

    I hope that those features are perfect and available in 0.90 :rolleyes:

    Thank you,

    Stefano Monterisi

    hi. I liked the sort. a very necessary thing. In my project, too, do the sorting, but a symbol showing the direction of the sort we have not really look beautiful. (pic 11, 12) Can you share your sorting.

    Thank you.

    post-475-0-88926200-1349330360.png

    post-475-0-47279300-1349330368.png

    post-475-0-53355500-1349330379.png

  6. Bpl своя, просто перенесли туда часть функционала программы, щас собрал проект без нее, по тестируем отпишу, но на первый взгляд все нормально, установил в среду библиотеку EurekaLog может что покажет.

    Ошибка явно возникает при срабатывании SessionTimeOut, но из-за чего отловить не получается, прошел отладчиком по шагам, все нормально.

  7. Hello everyone, some functionality in the project in the package, is there anyone have any experience with the package uniGUI?? I encountered a problem, an error on the server side (client no errors), the error occurs after the operation SessionTimeOut, attached image error, after error exe stops responding to user requests, no one can enter into the program, after the close of the error messages that everything starts to work fine, until the next time (exe not restarted).

    Someone has the idea of ​​what it is and how to fight it?

    Thank you.

    10.bmp

  8. Всем привет, в проекте часть функционала поместили в пакет, есть ли у кого нибудь опыт использования пакетов в uniGUI?? я столкнулся с проблемой, появляется ошибка на серверной стороне(на клиенте ошибок нет), ошибка возникает после срабатывания SessionTimeOut, изображение ошибки прикрепил, после возникновения ошибки exe перестает отвечать на запросы пользователей, никто не может войти в программу, после закрытия сообщений об ошибке, все начинает работать нормально, до следующего раза( exe не перезапускался).

    У кого нибудь есть идеи что это такое и как с этим бороться?

    Спасибо.

    10.bmp

  9. Hi All,

     

    The same problem seems relevant to many, the user has to press 2 times Enter in mass edit data in the grid:

    Edited field, hit Enter to save, record shifted down and to have one more time to press Enter, to enter the edit mode of the cell.

     

    Give somebody a code call ExtEvent. which is responsible for the transition of the cell into edit mode?

    (like event "select", I could be wrong, have long had to deal with this by AjaxEvent saw the order of events that are called when editing a cell in the grid)

     

    Thank you.

  10. Hi,

     

    The issue starts when once the grid gets focused, the workaround I found is :

    procedure TUniForm1.UniEditAjaxEvent(Sender: TComponent; EventName: string; Params: TStrings);
    begin
      UniEdit.SetFocus;
    end;
    
    procedure TUniForm1.Grid1AjaxEvent(Sender: TComponent; EventName: string; Params: TStrings);
    begin
      UniEdit.SetFocus;
    end;

     

    with this, UniEdit always remains focused..

     

    Regards

     

     

    Thanks, helped.

  11. Hello,

     

    If we show mask on form, Form1.BitBtn_Dummy1.showMask('....Wait...', Form1.FormPanel), the form will be disabled, showing the mask...

     

    I used Dummy button..

     

    First Grid->ClientEvents

    Ext.grid.EditorGridPanel

     

    function OnAfterEdit(value, originalValue, row, column)

    {

    Form1.BitBtn_Dummy1.showMask('....Wait...', Form1.UniDBGrid1 );

    }

     

    Second Grid->ClientEvents

    Ext.grid.EditorGridPanel

    function OnAfterEdit(value, originalValue, row, column)

    {

    Form1.BitBtn_Dummy1.hideMask();

    }

     

    Thanks, I'll try.

  12. Hi Farhad.

    Very interesting situation. Took your demo example with fish, added the button (Click) and my form, grid tied with ClientDataSet.

    In the form of context-sensitive search is implemented, the OnKeyDown event on the component TUniEdit put filters on ClientDataSet.

    The sequence of actions for which the focus is lost from the component TUniEdit:

    1. I type in the box for example "sna", filtered 3 records. All is well.

    2. Box is cleared, a complete list. all is well.

    3. I type "sn", filtered multiple entries, do click on the grid, and then put the cursor in the TUniEdit and add character "a",

    is filtered out 3 records, but the focus away from the component! continue to type the text in the box does not work,

    you need to constantly move the cursor to TUniEdit!!!!!!!!

    FishFactsTest.zip

  13. Hi Farhad.

    Posted an example in which no hint is always displayed when the main Design time set the first tab, the hint on buttons in the other tabs do not

    displayed. If the Design time to set the main second tab, the hint is displayed in the first and second tab, and the third is not displayed.

    delphi 2007 Build 943

    Tell that to build 943 bug? or can I have something wrong?

    Thank you.

    test.zip

  14. Hi all, I want to hang the mask on the form after changing data in the first grid and remove the mask after changing data in the second grid,

    can someone tell me AjaxEvent to catch the change data in the grid, unless of course this event is.

    Thank you.

  15. Hi,

     

    ERROR: Bitmap image is not valid is due to TUniDbImage, if the blob field do not contain image,

    Try TUniImage and display the Picture using ShowImage Procedure in Mainform in my DemoProject.

     

    Regards

    Thank you very much for your time. I'll try.

  16. Thank you very much for your help.

    It works, loaded bmp, loading jpg, png error:

    Bitmap image is not valid

    // Save record
    procedure TAddRecordForm.SaveButtonClick(Sender: TObject);
    var
      BlobField: TBlobField;
    begin
     if mStream <> nil then
       begin
         FDSourse.DataSet.Append;
         FDSourse.DataSet.FieldByName('FIRSTNAMEHAMSTER').Value := Trim(FirstNameEdit.Text);
         FDSourse.DataSet.FieldByName('NEXTNAMEHAMSTER').Value  := Trim(LastNameEdit.Text);
         FDSourse.DataSet.FieldByName('NOTE').Value             := Trim(NoteMemo.Text);
    
         BlobField := TBlobField(FDSourse.DataSet.FieldByName('IMG'));
         BlobField.LoadFromStream(mStream);                                // ERROR: Bitmap image is not valid
         
         FDSourse.DataSet.Post;
         TClientDataSet(FDSourse.DataSet).SaveToFile('hamster.cds',dfBinary);
      
         mStream.Free;
         mStream:=nil;
       end;
    
    //
     ModalResult := mrOk;
    end;
    

  17. What filetype (.bmp, .jpg, .png, ...) do you upload and do you really want to save it as Bitmap?

     

    You should delete "BS.Free;".

     

    What if you use field type ftBlob instead of ftGraphic?

     

    I tried to load the image format jpeg, png, bmp. added another blob type field in the dataset,

    I tried to load in this field. Not what does not work, text fields are stored and the image is not.

     

    procedure TAddRecordForm.SaveButtonClick(Sender: TObject);
    var   BlobField, GraphicField: TField;
          BS, BS1: TStream;
    begin
         FDSourse.DataSet.Append;
         FDSourse.DataSet.FieldByName('FIRSTNAMEHAMSTER').Value := Trim(FirstNameEdit.Text);
         FDSourse.DataSet.FieldByName('NEXTNAMEHAMSTER').Value  := Trim(LastNameEdit.Text);
         FDSourse.DataSet.FieldByName('NOTE').Value             := Trim(NoteMemo.Text);
    
         BlobField := FDSourse.DataSet.FieldByName('IMG');
         BS        := FDSourse.DataSet.CreateBlobStream(BlobField,bmReadWrite);
    
         GraphicField := FDSourse.DataSet.FieldByName('IMAGE');
         BS1          := FDSourse.DataSet.CreateBlobStream(GraphicField,bmReadWrite);
         UniImage.Picture.Graphic.SaveToStream(BS);
         UniImage.Picture.Graphic.SaveToStream(BS1);
    
         FDSourse.DataSet.Post;
    
         TClientDataSet(FDSourse.DataSet).SaveToFile('hamster.cds',dfBinary);
    
         SaveButton.ModalResult := mrOk;
    end;
    

  18. Do you use the TUniFileUpload component? Then you can use the OnCompleted event of this component, see here:

     

    http://forums.unigui.com/index.php?/topic/1107-load-picture-into-database/page__p__3528__hl__fileupload__fromsearch__1&do=findComment&comment=3528

     

     

    Uploading an image into the application, everything is fine.

     

    procedure TAddRecordForm.UniFileUploadCompleted(Sender: TObject;
     AStream: TFileStream);
    begin
     if IsImage then
       UniImage.Picture.LoadFromFile(AStream.FileName);
    end;
    

     

    Fill out the required fields on the form and save it to the database (TClientDataSet field type ftGraphic).

    The image is not saved.

     

    Does anyone see a mistake?

    Thank you.

     

     

    // Save record
    procedure TAddRecordForm.SaveButtonClick(Sender: TObject);
    var   blob, blob1: TStream;
          BlobField: TField;
          BS: TStream;
    begin
         FDSourse.DataSet.Append;
         FDSourse.DataSet.FieldByName('FIRSTNAMEHAMSTER').Value := Trim(FirstNameEdit.Text);
         FDSourse.DataSet.FieldByName('NEXTNAMEHAMSTER').Value  := Trim(LastNameEdit.Text);
         FDSourse.DataSet.FieldByName('NOTE').Value             := Trim(NoteMemo.Text);
    
         BlobField := FDSourse.DataSet.FieldByName('IMAGE');
         BS        := FDSourse.DataSet.CreateBlobStream(BlobField,bmReadWrite);
         UniImage.Picture.Bitmap.SaveToStream(BS);     
        
         BS.Free;
    
         FDSourse.DataSet.Post;
    
         TClientDataSet(FDSourse.DataSet).SaveToFile('hamster.cds',dfBinary);
        
         SaveButton.ModalResult := mrOk;
    end;
    

  19. // Save record
    procedure TAddRecordForm.SaveButtonClick(Sender: TObject);
    var   blob: TStream;
    begin
         FDSourse.DataSet.Append;
         FDSourse.DataSet.FieldByName('FIRSTNAMEHAMSTER').Value := Trim(FirstNameEdit.Text);
         FDSourse.DataSet.FieldByName('NEXTNAMEHAMSTER').Value  := Trim(LastNameEdit.Text);
         FDSourse.DataSet.FieldByName('NOTE').Value             := Trim(NoteMemo.Text);
    
         blob := FDSourse.DataSet.CreateBlobStream(FDSourse.DataSet.FieldByName('IMAGE'), bmWrite);
         UniImage.Picture.Graphic.SaveToStream(blob);
    
         blob.Free;                                 // ERROR: Bitmap image is not valid
    
         FDSourse.DataSet.Post;
    
         SaveButton.ModalResult := mrOk;
    end;
    

     

    Uploading a picture to the component as in the examples TUniImage Farhad, while maintaining an error in the dataset, in line blob.Free.

    Can I save an image from TUniImage or it must first be put into UniHTMLFrame??

    Tell me where the error occurred.

    Thank you.

×
×
  • Create New...