コード例 #1
0
ファイル: FormOTD.cs プロジェクト: peritan21/AistLab1
 public void InsertOrder(OTD o)
 {
     _db = new DataClassesLabDataContext();
     _db.OTDs.InsertOnSubmit(o);
     try
     {
         _db.SubmitChanges(ConflictMode.ContinueOnConflict);
     }
     catch (ChangeConflictException)
     {
     }
 }
コード例 #2
0
ファイル: FormOTD.cs プロジェクト: peritan21/AistLab1
 private void FormOTDLoad(object sender, EventArgs e)
 {
     _lprofotd.Add(new AccessorLab.ProfilOTD(0, "Амбулаторное"));
     _lprofotd.Add(new AccessorLab.ProfilOTD(1, "Стационарное"));
     _lxozraschet.Add(new AccessorLab.ProfilOTD(0, "ОМС"));
     _lxozraschet.Add(new AccessorLab.ProfilOTD(1, "ДМС"));
     _lxozraschet.Add(new AccessorLab.ProfilOTD(2, "Хозрасчетное"));
     _db = new DataClassesLabDataContext();
     var res = (from c in _db.OTDs  select c);
     oTDBindingSource.DataSource = res;
     gridControl1.DataSource = oTDBindingSource;
     repositoryItemLookUpEdit1.DataSource = _lprofotd;
     repositoryItemLookUpEdit2.DataSource = _lxozraschet;
 }