private void btnREP_Click(object sender, EventArgs e) { PL.Pay frm = new Pay(); frm.txtID.Text = this.id.ToString(); frm.txtName.Text = this.bunifuCustomDataGrid1.CurrentRow.Cells[0].Value.ToString(); //frm.OldDebt = (debt.getTotalInvDebt(id) + debt.getTotalDocDebt(id)); frm.txtOldDept.Text = string.Format("{0:n0}", debt.GetFinalValueOfDebt(id)); frm.State = "inv"; frm.ShowDialog(); }
private void UpDateInfo() { this.dataGridView1.DataSource = debt.StatementOfAccount(CustomerNo); //this.invoDataGrid1.DataSource = order.notPaidInCash(id); //this.docDataGrid2.DataSource = doc.unPaidDoc(id); double ValueOfFinalDebt; if (debt.GetFinalValueOfDebt(CustomerNo).Rows.Count > 0) { ValueOfFinalDebt = Convert.ToDouble(debt.GetFinalValueOfDebt(CustomerNo).Rows[0][0]); } else { ValueOfFinalDebt = 0.0; } this.txtDebt.Text = string.Format("{0:n0}", (ValueOfFinalDebt)); }