salvar no banco com alguns Edits em branco!!
26/06/2019
0
Ancelmo Cardoso
Posts
26/06/2019
Bruno
Poste o código para ver como você esta pegando o valor do edit e salvando.
26/06/2019
Ancelmo Cardoso
begin
close;
end;
procedure Trendimento.Edit11Change(Sender: TObject);
var
iniciot : TDateTime;
finalt : TDateTime;
totalt : TDateTime;
begin
iniciot := StrtoTime(edit9.text);
finalt := StrtoTime(edit10.text);
totalt := finalt - iniciot;
Edit11.Text := FormatDateTime('hh:nn',totalt);
end;
procedure Trendimento.Edit12Change(Sender: TObject);
begin
Edit12.Text := FormatDateTime('hh:nn',StrToTime(Edit7.text) + StrToTime(Edit11.text));
end;
procedure Trendimento.Edit13Change(Sender: TObject);
begin
Edit13.Text := IntToStr(StrToInt(Edit4.Text)+StrToInt(Edit8.Text));
end;
procedure Trendimento.Edit14Change(Sender: TObject);
var
totalcaixa : double;
totalhora : TdateTime;
converter : double;
begin
totalcaixa := StrToint(Edit4.Text)+StrToInt(Edit8.Text);
totalhora := StrToTime(Edit7.text) + StrToTime(Edit11.text);
converter :=(totalhora)*24;
Label18.Caption :=Formatfloat('#0.00',totalcaixa/converter);
end;
procedure Trendimento.Edit7Change(Sender: TObject);
var
iniciom : tDatetime;
finalm : TDatetime;
totalm : TDatetime;
zero : TdateTime;
begin
iniciom := StrtoTime(edit5.text);
finalm := StrtoTime(edit6.text);
totalm := finalm -iniciom;
Edit7.text:= FormatDateTime('hh:nn',totalm);
end;
end.
27/06/2019
Ancelmo Cardoso
begin
close;
end;
procedure Trendimento.Edit11Change(Sender: TObject);
var
iniciot : TDateTime;
finalt : TDateTime;
totalt : TDateTime;
begin
iniciot := StrtoTime(edit9.text);
finalt := StrtoTime(edit10.text);
totalt := finalt - iniciot;
Edit11.Text := FormatDateTime('hh:nn',totalt);
end;
procedure Trendimento.Edit12Change(Sender: TObject);
begin
Edit12.Text := FormatDateTime('hh:nn',StrToTime(Edit7.text) + StrToTime(Edit11.text));
end;
procedure Trendimento.Edit13Change(Sender: TObject);
begin
Edit13.Text := IntToStr(StrToInt(Edit4.Text)+StrToInt(Edit8.Text));
end;
procedure Trendimento.Edit14Change(Sender: TObject);
var
totalcaixa : double;
totalhora : TdateTime;
converter : double;
begin
totalcaixa := StrToint(Edit4.Text)+StrToInt(Edit8.Text);
totalhora := StrToTime(Edit7.text) + StrToTime(Edit11.text);
converter :=(totalhora)*24;
Label18.Caption :=Formatfloat('#0.00',totalcaixa/converter);
end;
procedure Trendimento.Edit7Change(Sender: TObject);
var
iniciom : tDatetime;
finalm : TDatetime;
totalm : TDatetime;
zero : TdateTime;
begin
iniciom := StrtoTime(edit5.text);
finalm := StrtoTime(edit6.text);
totalm := finalm -iniciom;
Edit7.text:= FormatDateTime('hh:nn',totalm);
end;
end.
então ninguém???
29/06/2019
Ancelmo Cardoso
valeu a dica mas eu coloquei pra executar as procedure antes do insert , que que ja atualize antes de salvar
Clique aqui para fazer login e interagir na Comunidade :)