Приветствую,


в другую таблицу куда именно? в ячейку или в подвал?

6,227

(22 replies, posted in Russian)

nikolai_nn wrote:

здравейте,искам да добавам 1 месец,а не 30 дни,защото има месеци с 31 ден,а февруари с 28 и т.н.

это не совсем тривиальная задача. Допустим у вас дата 31.10.2015, необходимо прибавить месяц, но в ноябре только 30 дней, какая дата должна быть в результате?


или даже сегодня 29.02.2016, нужно прибавить месяц, какая будет итоговая дата? 29.03 ? 30.03? или 31.03?


сначала необходимо знать какой именно алгоритм прибавления месяца вам необходим.

6,228

(131 replies, posted in Russian)

не совсем

procedure Form3_TableGrid1_OnChange (Sender: string);
var i,c: integer;
    s: string;
begin 
      c := Form3.TableGrid1.RowCount - 1;                     
      for i := 0 to c do
      begin
         s := Form3.TableGrid1.Cells[10,i];
         if ValidFloat(s) then
            if StrToFloat(s) < 0 then
               then Form3.TableGrid1.Cell[10,i].TextColor := clGreen
               else Form3.TableGrid1.Cell[10,i].TextColor := clRed;

      
         if Form3.TableGrid1.Cells[3,i] = 'Real'
         then Form3.TableGrid1.Cell[3,i].Color := clSilver
         else Form3.TableGrid1.Cell[3,i].Color := clYellow;
     end;
end;

6,229

(3 replies, posted in General)

Usually you don't need any script when you using scanner, you need just set focus to textbox after scanning you will see code from barcode in the textbox, because scanner will send code like keystrokes.

6,230

(12 replies, posted in Script)

But for hint into textboxes or comboboxes there is no way to set the pause time

Form1.Edit1.TextHint := 'Enter the last name';

An example for you, to demonstrate try to edit record:

6,232

(2 replies, posted in Script)

Example, how to extract Some product name

procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
var
    sStart, sEnd: string;
    sSource: string;
begin
    sSource := '<ProductName VALUE="Some product name"/> ?';
    sStart := '<ProductName VALUE="';
    sEnd := '"/> ?';

    Form1.Edit1.Text := Copy(sSource, Length(sStart)+1, Length(sSource) - Length(sStart)-Length(sEnd) );
end;

6,233

(2 replies, posted in FAQ)

No, you can only to send email with attached file directly from MVD.

6,234

(131 replies, posted in Russian)

забыли точку с запятой

procedure Form3_TableGrid1_OnChange (Sender: string);
var
   i,c: integer;
   s: string;
begin
     c := Form3.TableGrid1.RowCount - 1;
     for i := 0 to c do
     begin
         
         s := Form3.TableGrid1.Cells[10,i];
         if ValidInt(s) then
            if StrToFloat(s) < 0 then Form3.TableGrid1.Cell[10,i].TextColor := clRed;

         if Form3.TableGrid1.Cells[3,i] = 'Real'
            then Form3.TableGrid1.Cell[3,i].Color := clSilver
            else Form3.TableGrid1.Cell[3,i].Color := clYellow;
     end;
end;

в скрипте у компонента может быть только одно событие одного вида, поэтому нужно объединять.

6,235

(7 replies, posted in Script)

You should use begin end keywords

if Admin.Edit_typ.Text<>'' then 
begin
   Admin.Edit_typ.ReadOnly := True;
   Admin.Edit_typ.color := $003333FF;
end
else
begin
   Admin.Edit_typ.ReadOnly := False;
   Admin.Edit_typ.color := clWindow;
end;

6,236

(22 replies, posted in Russian)

nikolai_nn wrote:

здравейте,имам въпрос:
Form1.DateTimePicker2.Date := Form1.DateTimePicker1.Date+ ????
как да добавя 1 месец


можно так

Form1.DateTimePicker2.Date := Form1.DateTimePicker1.Date + 30;

6,237

(10 replies, posted in Russian)

wertyby
Программа не может автоматически связать более двух таблиц, поэтому в данном случае эти таблицы необходимо связать вручную с помощью вычисляемых полей.


по этой же причине поиск можно произвести только по сорту, с помощью стандартной кнопки Поиск.


Чтобы можно было искать по категориям, видам и подвидам, необходимо использовать кнопку "SQL запрос" в котором вы можете организовать любой поиск с помощью SQL запросе.



Добавил в ваш проект вычисляемые поля в таблицу sort

6,238

(13 replies, posted in General)

Hello,


I made some changes, please try it:

6,239

(54 replies, posted in Russian)

достаточно просто написать название первого поля (но нельзя в вычисляемое поле вписывать другие вычисляемые поля)

6,240

(8 replies, posted in General)

imcisco
In the settings of button "Search" I just changed a option "2. Select the database table for the query" from "StockInfo" to "DesignInfo"

6,241

(8 replies, posted in General)

imcisco
I made some changes in the settings of button "Search"
project attached:

6,242

(12 replies, posted in Script)

tcoton
An example for you:

6,243

(10 replies, posted in Russian)

wertyby
Приветствую,


посмотрел проект, не нашел где не работает связанный список, пожалуйста описывайте подробней, на какой форме и в каких компонентах не работает.

6,244

(131 replies, posted in Russian)

procedure Form1_GridEmployees_OnChange (Sender: string);
var
   i,c: integer;
   s: string;
begin
     c := Form1.GridEmployees.RowCount - 1;
     for i := 0 to c do
     begin
         s := Form1.GridEmployees.Cells[5,i];

         if ValidFloat(s) then
             if StrToFloat(s) < 0 then Form1.GridEmployees.Cell[5,i].TextColor := clRed
     end;
end;

6,245

(4 replies, posted in Script)

mathmathou
You can get ID of record from button with action "Save Record"

Form1.ButtonSave.dbGeneralTableId

or

new_product_keywords.Label_prod_id.Caption := IntToStr(new_product.ButtonSave.dbGeneralTableId);

6,246

(2 replies, posted in General)

I can only help you with specific questions.


Here you can find how to install MySQL server:
http://myvisualdatabase.com/forum/viewt … p?pid=9770

6,247

(131 replies, posted in Russian)

procedure Form1_GridEmployees_OnChange (Sender: string);
var
   i,c: integer;
   s: string;
begin
     c := Form1.GridEmployees.RowCount - 1;
     for i := 0 to c do
     begin
         s := Form1.GridEmployees.Cells[5,i];

         if ValidFloat(s) then 
            if StrToFloat(s) < 0 then Form1.GridEmployees.Cell[5,i].TextColor := clRed
     end;
end;

6,248

(131 replies, posted in Russian)

procedure Form3_TableGrid1_OnChange (Sender: string);
var
   i,c: integer;
   s: string;
begin
     c := Form3.TableGrid1.RowCount - 1;
     for i := 0 to c do
     begin
         s := Form3.TableGrid1.Cells[10,i];
         if ValidInt(s) then 
            if StrToInt(s) <= 0 then Form3.TableGrid1.Cell[10,i].TextColor := clRed;

         s := Form3.TableGrid1.Cells[4,i];
         if ValidInt(s) then 
            if StrToInt(s) >= 0 then Form3.TableGrid1.Cell[4,i].Color := clGreen
                else Form3.TableGrid1.Cell[4,i].Color := clRed;

     end;
end;

6,249

(131 replies, posted in Russian)

вместо Cell[4,i].Color используйте Cell[4,i].TextColor

6,250

(131 replies, posted in Russian)

попробуйте так

procedure Form1_GridEmployees_OnChange (Sender: string);
var
   i,c: integer;
   s: string;
begin
     c := Form1.GridEmployees.RowCount - 1;
     for i := 0 to c do
     begin
         s := Form1.GridEmployees.Cells[4,i];
         if ValidInt(s) then 
            if StrToInt(s) >= 0 then Form1.GridEmployees.Cell[4,i].Color := clGreen
                else Form1.GridEmployees.Cell[4,i].Color := clRed;
     end;
end;