Exemple #1
0
        private void TsmiAdd_Click(object sender, EventArgs e)
        {
            FrmCustomerInfo frmCustomerInfo = new FrmCustomerInfo();

            frmCustomerInfo.WorkingState = WorkingState.Add;
            frmCustomerInfo.Seller       = this.UserName;
            DialogResult dialogResult = frmCustomerInfo.ShowDialog(this);

            if (DialogResult.OK == dialogResult)
            {
            }
        }
Exemple #2
0
 private void TsmiEdit_Click(object sender, EventArgs e)
 {
     try
     {
         object          objId           = DataGridViewCustomerInfo.SelectedRows[0].Cells["Id"];
         int             id              = Convert.ToInt32(objId);
         FrmCustomerInfo frmCustomerInfo = new FrmCustomerInfo
         {
             WorkingState = WorkingState.Modify,
             CustomerId   = id,
             Seller       = this.UserName
         };
         DialogResult dialogResult = frmCustomerInfo.ShowDialog(this);
         if (DialogResult.OK == dialogResult)
         {
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(this, ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }