コード例 #1
0
 private void Lbl_previous_Click(object sender, EventArgs e)
 {
     if (acctID != 0)
     {
         this.Hide();
         var acctDet = new AcctDetails(acctID, false);
         acctDet.Show();
     }
     else
     {
         this.Hide();
         var orderHistory = new OrderReviewForm();
         orderHistory.Show();
     }
 }
コード例 #2
0
 private void Dgv_accounting_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (payable)
     {
         int.TryParse(dgv_accounting.CurrentRow.Cells[0].Value.ToString(), out int payID);
         var acctDetails = new AcctDetails(payID, true);
         acctDetails.Show();
         this.Hide();
     }
     else if (receiving)
     {
         int.TryParse(dgv_accounting.CurrentRow.Cells[0].Value.ToString(), out int recID);
         var acctDetails = new AcctDetails(recID, false);
         acctDetails.Show();
         this.Hide();
     }
     else
     {
         MessageBox.Show("Select Accounts Payable or Accounts Receivable before attempting to view items.", "No Data Selected", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }