new void Update()
 {
     try
     {
         Functions.TBL_Current current = DB.TBL_Currents.First(s => s.ID == CurrentID);
         current.CurrentAddress         = txtAddress.Text;
         current.CurrentAuthorized1     = txtAuthorized1.Text;
         current.CurrentAuthorized1Mail = txtAuthorized1Mail.Text;
         current.CurrentAuthorized2     = txtAuthorized2.Text;
         current.CurrentAuthorized2Mail = txtAuthorized2Mail.Text;
         current.CurrentCity            = txtCity.Text;
         current.CurrentCode            = txtCurrentCode.Text;
         current.CurrentCountry         = txtCountry.Text;
         current.CurrentDistrict        = txtDistrict.Text;
         current.CurrentGroupID         = GroupID;
         current.CurrentMailInfo        = txtMailInfo.Text;
         current.CurrentName            = txtCurrentName.Text;
         current.CurrentPhone1          = txtPhone1.Text;
         current.CurrentPhone2          = txtPhone2.Text;
         current.CurrentFax1            = txtFax1.Text;
         current.CurrentFax2            = txtFax2.Text;
         current.CurrentTaxNumber       = txtTaxNumber.Text;
         current.CurrentTaxOffice       = txtTaxOffice.Text;
         current.CurrentWebAddress      = txtWebAddress.Text;
         current.CurrentEditDate        = DateTime.Now;
         current.CurrentEditUser        = frmMain.UserID;
         DB.SubmitChanges();
         Messages.Update(true);
         Clear();
     }
     catch (Exception e)
     {
         Messages.Error(e);
     }
 }
 public void Open(int ID)
 {
     try
     {
         Edit      = true;
         CurrentID = ID;
         Functions.TBL_Current current = DB.TBL_Currents.First(s => s.ID == CurrentID);
         txtAddress.Text         = current.CurrentAddress;
         txtAuthorized1.Text     = current.CurrentAuthorized1;
         txtAuthorized2.Text     = current.CurrentAuthorized2;
         txtAuthorized2Mail.Text = current.CurrentAuthorized2Mail;
         txtAuthorized1Mail.Text = current.CurrentAuthorized1Mail;
         txtCity.Text            = current.CurrentCity;
         txtCountry.Text         = current.CurrentCountry;
         txtCurrentCode.Text     = current.CurrentCode;
         txtCurrentName.Text     = current.CurrentName;
         txtDistrict.Text        = current.CurrentDistrict;
         txtFax1.Text            = current.CurrentFax1;
         txtFax2.Text            = current.CurrentFax2;
         txtMailInfo.Text        = current.CurrentMailInfo;
         txtPhone1.Text          = current.CurrentPhone1;
         txtPhone2.Text          = current.CurrentPhone2;
         txtTaxNumber.Text       = current.CurrentTaxNumber;
         txtTaxOffice.Text       = current.CurrentTaxOffice;
         txtWebAddress.Text      = current.CurrentWebAddress;
         OpenGroup(current.CurrentGroupID.Value);
     }
     catch (Exception e)
     {
         Messages.Error(e);
     }
 }
Example #3
0
        void CurrentSelect(int ID)
        {
            try
            {
                CurrentID = ID;
                Functions.TBL_Current current = db.TBL_Currents.First(s => s.ID == CurrentID);
                txtCurrentCode.Text = current.CurrentCode;
                txtCurrentName.Text = current.CurrentName;
            }
            catch (Exception EX)
            {

                messages.Error(EX);
            }
        }
 void NewSave()
 {
     try
     {
         Functions.TBL_Current current = new Functions.TBL_Current();
         current.CurrentAddress         = txtAddress.Text;
         current.CurrentAuthorized1     = txtAuthorized1.Text;
         current.CurrentAuthorized1Mail = txtAuthorized1Mail.Text;
         current.CurrentAuthorized2     = txtAuthorized2.Text;
         current.CurrentAuthorized2Mail = txtAuthorized2Mail.Text;
         current.CurrentCity            = txtCity.Text;
         current.CurrentCode            = txtCurrentCode.Text;
         current.CurrentCountry         = txtCountry.Text;
         current.CurrentDistrict        = txtDistrict.Text;
         current.CurrentGroupID         = GroupID;
         current.CurrentMailInfo        = txtMailInfo.Text;
         current.CurrentName            = txtCurrentName.Text;
         current.CurrentPhone1          = txtPhone1.Text;
         current.CurrentPhone2          = txtPhone2.Text;
         current.CurrentFax1            = txtFax1.Text;
         current.CurrentFax2            = txtFax2.Text;
         current.CurrentTaxNumber       = txtTaxNumber.Text;
         current.CurrentTaxOffice       = txtTaxOffice.Text;
         current.CurrentWebAddress      = txtWebAddress.Text;
         current.CurrentSaveDate        = DateTime.Now;
         current.CurrentSaveUser        = frmMain.UserID;
         DB.TBL_Currents.InsertOnSubmit(current);
         DB.SubmitChanges();
         Messages.NewRecord("Yeni Cari Kaydı Oluşturuldu.");
         Clear();
     }
     catch (Exception e)
     {
         Messages.Error(e);
     }
 }