コード例 #1
0
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     if (SLS.Static.selected == 0)
     {
         if (SLS.Static.ID != 0)
         {
             var child = new SLS.Loan.Application.ModeOfPayment();
             child.FormClosed += chargeModeTerm;
             child.ShowDialog();
         }
         else
         {
             MessageBox.Show("Please select data from the database.", "Error", MessageBoxButtons.OK);
         }
     }
     else if (SLS.Static.selected == 1)
     {
         if (SLS.Static.ID != 0)
         {
             var child = new SLS.Loan.Application.TermOfPayment();
             child.FormClosed += chargeModeTerm;
             child.ShowDialog();
         }
         else
         {
             MessageBox.Show("Please select data from the database.", "Error", MessageBoxButtons.OK);
         }
     }
     else
     {
         if (SLS.Static.ID != 0)
         {
             var child = new SLS.Loan.Application.LoanChargeName();
             child.FormClosed += chargeModeTerm;
             child.ShowDialog();
         }
         else
         {
             MessageBox.Show("Please select data from the database.", "Error", MessageBoxButtons.OK);
         }
     }
 }
コード例 #2
0
 private void btnNew_Click(object sender, EventArgs e)
 {
     if (SLS.Static.selected == 0)
     {
         SLS.Static.ID = 0;
         var child = new SLS.Loan.Application.ModeOfPayment();
         child.FormClosed += chargeModeTerm;
         child.ShowDialog();
     }
     else if(SLS.Static.selected == 1)
     {
         SLS.Static.ID = 0;
         var child = new SLS.Loan.Application.TermOfPayment();
         child.FormClosed += chargeModeTerm;
         child.ShowDialog();
     }
     else
     {
         SLS.Static.ID = 0;
         var child = new SLS.Loan.Application.LoanChargeName();
         child.FormClosed += chargeModeTerm;
         child.ShowDialog();
     }
 }