private void btnPayment_Click(object sender, EventArgs e)
 {
     if (UpdatingItem != null)
     {
         string           paymentID = (UpdatingItem as CustomerPayment).ID;
         FrmPaymentAssign frm       = new FrmPaymentAssign();
         frm.PaymentType       = PaymentType;
         frm.CustomerPaymentID = paymentID;
         frm.ShowDialog();
         UpdatingItem = (new CustomerPaymentBLL(AppSettings.Current.ConnStr)).GetByID((UpdatingItem as CustomerPayment).ID).QueryObject;
         ItemShowing();
         OnItemUpdated(new ItemUpdatedEventArgs(UpdatingItem));
     }
 }
Esempio n. 2
0
 private void mnu_Assign_Click(object sender, EventArgs e)
 {
     if (dataGridView1.SelectedRows.Count == 1)
     {
         CustomerPayment cp = dataGridView1.SelectedRows[0].Tag as CustomerPayment;
         if (cp.State == SheetState.Approved && cp.Remain > 0)
         {
             string           paymentID = cp.ID;
             FrmPaymentAssign frm       = new FrmPaymentAssign();
             frm.CustomerPaymentID = paymentID;
             frm.PaymentType       = CustomerPaymentType.Customer;
             frm.ShowDialog();
             cp = new CustomerPaymentBLL(AppSettings.Current.ConnStr).GetByID(cp.ID).QueryObject;
             ShowItemInGridViewRow(dataGridView1.SelectedRows[0], cp);
         }
     }
 }