28-01-2016, 12:29 PM
(28-01-2016, 08:52 AM)B.M.AbdelAziZ كتب :إقتباس :نقوم بإخيار رمز القسم واسم القاعة . 2 : نضغط على حفظ لكي يتم حفظأذن زر الحفظ لكل حصة ويتم الضغط عليه أكثر من مرة ومنه جرب ما يلي
كود :procedure TForm1.Button2Click(Sender: TObject); var c,r:integer; jour,temp,codeprof,codemat:string; begin c:=StringGrid1.Col; r:=StringGrid1.Row; case c of 1:jour:='الأحد'; 2:jour:='الاثنين'; 3:jour:='الثلاثاء'; 4:jour:='الأربعاء'; 5:jour:='الخميس'; end; case r of 1:temp:='08:00'; 2:temp:='09:00'; 3:temp:='10:00'; 4:temp:='11:00'; 5:temp:='14:00'; 6:temp:='15:00'; 7:temp:='16:00'; end; ShowMessage('Jour='+Jour+' Temp='+Temp); codeprof:=DBLookupComboBox3.Text; //codeprof:=StringGrid1.Cells[c,r]; codemat:=copy (codeprof,1,3); ADOTable1.Edit; //ADOTable1.FieldByName('codeprof').Value:=codeprof; ADOTable1codeprof.Value:=DBLookupComboBox3.Text; ADOTable1.FieldByName('codemat').Value:=codemat; ADOTable1.FieldByName('nomjour').Value:=jour; ADOTable1.FieldByName('tempstart').Value:=temp; ADOTable1.FieldByName('codeclasse').Value:= DBLookupComboBox1.Text; ADOTable1.FieldByName('nomlocale').Value:= DBLookupComboBox2.Text; ADOTable1.FieldByName('annee').Value:= DBEdit1.Text; ADOTable1.Post; end;
[size=x-large]شكرا أستاذ عبد العزيز ... تم حل المشكل ... بارك الله فيك وفي اهلك [/size]
![[صورة: image.jpg]](http://s20.postimg.org/mpwq5fnjx/image.jpg)

