21-02-2012, 10:32 PM
السلام عليكم أفيدونا مما جادت به عقولكم
مشكلة في الحفظ
dbcombobox1 قيم (تكليف بالحضور و استدعاء ،إنذار،.....)
dbcombobox2 قيم من 1إلى 100
dbcombobox6 قيم من 1إلى 100
dbedit8,9,10
button1 on click
button2 on click يحسب المبلغ المتبقي dbedit9 تعبأ يدويا
استعملت الكود التالي في الحدث onexit
علما أن كل المعطيات تحفظ بشكل عادي dbedit7,5,11... إلا المذكورة أعلاه وكل
المعطيات في جدول واحد
ولكن عندما اضغط على الزر next ثم prior تحفظ
بارك الله فيكم
مشكلة في الحفظ
dbcombobox1 قيم (تكليف بالحضور و استدعاء ،إنذار،.....)
dbcombobox2 قيم من 1إلى 100
dbcombobox6 قيم من 1إلى 100
dbedit8,9,10
button1 on click
كود :
var np,np1,TVA,somme,result:real;
begin
np:=strtofloat(dbcombobox2.Text);
np1:=strtofloat(dbcombobox6.Text);
result:=((((1300+(np*100))*0.17))+((1300+(np*100))))*np1;
dbedit8.Text:=floattostr(result);
if dbcombobox1.ItemIndex=1 then
result:=((((1200+(np*100))*0.17))+((1260+(np*100))))*np1;
dbedit8.Text:=floattostr(result);
if dbcombobox1.ItemIndex=2 then
result:=((((1200+(np*100))*0.17))+((1260+(np*100))))*np1;
dbedit8.Text:=floattostr(result);
if dbcombobox1.ItemIndex=3 then
result:=((((1200+(np*100))*0.17))+((1260+(np*100))))*np1;
dbedit8.Text:=floattostr(result);
if dbcombobox1.ItemIndex=4 then
result:=((((1200+(np*100))*0.17))+((1260+(np*100))))*np1;
dbedit8.Text:=floattostr(result);
if dbcombobox1.ItemIndex=5 then
result:=(1560+255)*np1;
dbedit8.Text:=floattostr(result);
if dbcombobox1.ItemIndex=6 then
result:=((((1200+(np*100))*0.17))+((1260+(np*100))))*np1;
dbedit8.Text:=floattostr(result);
end;[align=left][/align]button2 on click يحسب المبلغ المتبقي dbedit9 تعبأ يدويا
كود :
var result, pa, somme:real;
begin
somme:=strtofloat(dbedit8.Text);
pa:=strtofloat(dbedit9.Text);
result:=somme-pa;
begin
dbedit10.Text:=floattostr(result);
end;استعملت الكود التالي في الحدث onexit
كود :
if Table1.State in [DsEdit,DsInsert] then Table1.Post;علما أن كل المعطيات تحفظ بشكل عادي dbedit7,5,11... إلا المذكورة أعلاه وكل
المعطيات في جدول واحد
ولكن عندما اضغط على الزر next ثم prior تحفظ
بارك الله فيكم
إن أصبت فمن الله وإن أخطأت فمن نفسي ومن الشيطان

