Статьи Королевства Дельфи


L2_pas - часть 5


TypesComboBox.SetFocus;

end;

{ Предварительная детализация поля }

FTFieldType := ftUnknown;

case FpTFbCommonType.FbTypeGroup of

FldGroup :

begin

FTFieldType := FpTFbCommonType.FbFld.sType;

end;

RefGroup :

begin

FTFieldType := ftInteger;

end;

PicGroup :

begin

FTFieldType := FpTFbCommonType.FbPic.sType;

end;

LUpGroup :

begin

FTFieldType := FpTFbCommonType.FbLUp.sType;

end;

end;

FModalRes := FTFieldType <> ftUnknown;

if not FModalRes then

begin

FbKernelWarning('Не выбран тип поля!');

TypesComboBox.SetFocus;

Exit;

end;

Close;

end;

Function TFldDlgFr.Execute: Bool;

begin

Result := False;

if not FModalRes then

Exit;

try

// Указатель на выбранный тип уже должен быть задан

if FpTFbCommonType = nil then

Exit;

// Результаты передаются в форму TbDefFr

FDbInterface.N_pTFieldInfo.sFieldAttr.Values['sFieldCaption'] := FldCaptionEdit.Text;

FDbInterface.N_pTFieldInfo.sFieldAttr.Values['sFieldDescr'] := FldDescrEdit.Text;

case FpTFbCommonType.FbTypeGroup of

FldGroup :

begin // базовый тип данных

FDbInterface.N_pTFieldInfo.sFieldAttr.Values['sFieldName'] := FldNameEdit.Text;

FDbInterface.N_pTFieldInfo.sFieldAttr.Values['sMTableName'] := '';

FDbInterface.N_pTFieldInfo.sFieldAttr.Values['sMFieldName'] := '';

FDbInterface.N_pTFieldInfo.sFieldAttr.Values['sPicDescr'] := '';

FDbInterface.N_pTFieldInfo.sFieldAttr.Values['sAgregateExpr']:= '';

FDbInterface.N_pTFieldInfo.sMTTableInfo := nil;

FDbInterface.N_pTFieldInfo.sMTFieldInfo := nil;

FDbInterface.N_pTFieldInfo.sPickList := nil;

FDbInterface.N_pTFieldInfo.sFieldType := FpTFbCommonType.FbFld.sType;

if FldSizeEdit.Visible then

begin

FDbInterface.N_pTFieldInfo.sFieldSize := StrToInt(FldSizeEdit.Text);

FDbInterface.N_pTFieldInfo.sFieldMBytes :=

FDbInterface.N_pTFieldInfo.sFieldSize + 1;

end

else

begin

FDbInterface.N_pTFieldInfo.sFieldSize := FpTFbCommonType.FbFld.sSize;

FDbInterface.N_pTFieldInfo.sFieldMBytes := FpTFbCommonType.FbFld.sBytes;

end;

end;

RefGroup :

begin // ссылка на таблицу




Начало  Назад  Вперед