public void UpdateRegularDue(String parentID) { GuardianInfoDB parentInfo = new GuardianInfoDB(); lbl_RegularDueValue.Content = parentInfo.GetCurrentDue(txt_GuardianID.Text, "Regular"); string total = parentInfo.GetTotalDue(parentID); }
private void AddTotalsColumn(DataTable table) { GuardianInfoDB gDB = new GuardianInfoDB(); table.Columns.Add("Current Due", typeof(string)); if (table.Rows.Count > 1) { string id = ""; bool campTotalDisplayed = false; bool regTotalDisplayed = false; for (int i = 0; i < table.Rows.Count; i++) { if (id != table.Rows[i][0].ToString().Remove(5)) { campTotalDisplayed = false; regTotalDisplayed = false; id = table.Rows[i][0].ToString().Remove(5); } if (IsRegular(table.Rows[i][3].ToString())) { if (!regTotalDisplayed) { table.Rows[i][5] = String.Format("{0:0.00}", gDB.GetCurrentDue(table.Rows[i][0].ToString(), "Regular")); regTotalDisplayed = true; } } else if (table.Rows[i][3].ToString().Contains("Camp") || table.Rows[i][3].ToString().Contains("camp")) { if (!campTotalDisplayed) { campTotalDisplayed = true; table.Rows[i][5] = String.Format("{0:0.00}", gDB.GetCurrentDue(table.Rows[i][0].ToString(), "Camp")); } } if (table.Rows[i][5] == "$0.00") { table.Rows[i][5] = ""; } } } }
public void UpdateMiscDue(String parentID) { GuardianInfoDB parentInfo = new GuardianInfoDB(); var price = parentInfo.GetCurrentDue(parentID, "Misc"); lbl_MiscDueValue.Content = price; var row = table.NewRow(); row["Event Type"] = "Total Price: "; row["Total"] = price; table.Rows.Add(row); }
public void UpdateMiscDue(String parentID) { GuardianInfoDB parentInfo = new GuardianInfoDB(); lbl_MiscDueValue.Content = parentInfo.GetCurrentDue(txt_GuardianID.Text, "Misc"); }
private void InitializeCurrentBalance() { GuardianInfoDB parentInfoDB = new GuardianInfoDB(); lbl_CurrentBalance.Content += " " + parentInfoDB.GetCurrentDue(guardianID, this.type); }