public void TransmitPartPayData() { if (gridPayPart.Rows.Count != 1) { int a = gridPayPart.RowSel; using (TuitionFeeAddPaymentForm payForm = new TuitionFeeAddPaymentForm()) { pubReceivePartPay = payForm.pubTransmitPartPay; payForm.txtPartition.text = gridPayPart[a, 1].ToString(); payForm.txtAmount.text = gridPayPart[a, 2].ToString(); payForm.calDueDate.Value = DateTime.Parse(gridPayPart[a, 3].ToString()); payForm.lblTitle.Text = "Edit Payment Partition"; payForm.lblData.Text = "Remaining: " + balanceHold.ToString(); payForm.balanceHolder = balanceHold; payForm.editBalanceHold = Decimal.Parse(gridPayPart[a, 2].ToString()); payForm.ShowDialog(); if (payForm.isConfirmed == true) { pubReceivePartPay = payForm.pubTransmitPartPay; balanceHold = payForm.balanceHolder; gridPayPart[a, 1] = pubReceivePartPay.PartPay_Partition; gridPayPart[a, 2] = pubReceivePartPay.PartPay_Amount; gridPayPart[a, 3] = pubReceivePartPay.PartPay_DueDate; } // do what ever with result... } } }
public void ReceivePartPayData() { using (TuitionFeeAddPaymentForm payForm = new TuitionFeeAddPaymentForm()) { payForm.balanceHolder = balanceHold; payForm.lblData.Text = balanceHold.ToString(); payForm.ShowDialog(); if (payForm.isConfirmed == true) { pubReceivePartPay = payForm.pubTransmitPartPay; balanceHold = payForm.balanceHolder; gridPayPart.Rows.Count++; gridPayPart[gridPayPart.Rows.Count - 1, 1] = pubReceivePartPay.PartPay_Partition; gridPayPart[gridPayPart.Rows.Count - 1, 2] = pubReceivePartPay.PartPay_Amount; gridPayPart[gridPayPart.Rows.Count - 1, 3] = pubReceivePartPay.PartPay_DueDate; } // do what ever with result... } }