void OpenGroup(int ID)
 {
     try
     {
         GroupID = ID;
         Functions.TBL_CurrentGroup currentGroup = DB.TBL_CurrentGroups.First(s => s.ID == GroupID);
         txtCurrentGroupName.Text = currentGroup.CurrentGroupCode;
         txtCurrentGroupCode.Text = currentGroup.CurrentGroupName;
     }
     catch (Exception e)
     {
         Messages.Error(e);
     }
 }
예제 #2
0
 new void Update()
 {
     try
     {
         Functions.TBL_CurrentGroup group = DB.TBL_CurrentGroups.First(s => s.ID == SelectionID);
         group.CurrentGroupName     = txtGroupName.Text;
         group.CurrentGroupCode     = txtGroupCode.Text;
         group.CurrentGroupEditDate = DateTime.Now;
         group.CurrentGroupEditUser = frmMain.UserID;
         DB.SubmitChanges();
         Messages.Update(true);
         Clear();
     }
     catch (Exception e)
     {
         Messages.Error(e);
     }
 }
예제 #3
0
 void NewSave()
 {
     try
     {
         Functions.TBL_CurrentGroup group = new Functions.TBL_CurrentGroup();
         group.CurrentGroupName     = txtGroupName.Text;
         group.CurrentGroupCode     = txtGroupCode.Text;
         group.CurrentGroupSaveDate = DateTime.Now;
         group.CurrentGroupSaveUser = frmMain.UserID;
         DB.TBL_CurrentGroups.InsertOnSubmit(group);
         DB.SubmitChanges();
         Messages.NewRecord("Yeni cari grup kayı oluşturuldu.");
         Clear();
     }
     catch (Exception e)
     {
         Messages.Error(e);
     }
 }