public AddReferences(SacramentType t, int sacramentID, string groomName, string brideName) { InitializeComponent(); lblSacrament.Text = t.ToString(); lblName.Text = string.Format("{0} & {1}", groomName, brideName); this.sacramentID = sacramentID; this.t = t; }
public AddReferences(SacramentType t, int sacramentID, string name) { InitializeComponent(); lblSacrament.Text = t.ToString(); lblName.Text = name; Draggable drag = new Draggable(this); drag.makeDraggable(panel1); this.sacramentID = sacramentID; this.t = t; }
public ApplicationPayment(SacramentType type, DataGridViewRow dr, DataHandler dh) { InitializeComponent(); this.dh = dh; this.type = type; this.row = dr.Cells; Draggable drag = new Draggable(this); drag.makeDraggable(panel1); int applicationID = int.Parse(row[0].Value.ToString()); sacramentIncomeID = dh.getSacramentIncomeID(applicationID); if (type == SacramentType.Marriage) { //Escaped ampersand by && lblName.Text = row["groomName"].Value + " && " + row["brideName"].Value; } else { lblName.Text = string.Join(" ", row[4].Value, row[5].Value, row[6].Value, row[7].Value); } DataTable sacramentIncome = dh.getSacramentIncome(applicationID); lblPaymentFor.Text = type.ToString(); lblOR.Text = dh.getNextOR(BookType.Parish).ToString(); lblDate.Text = DateTime.Now.ToString("yyyy-MM-dd"); lblPrice.Text = string.Format("{0:C}", double.Parse(sacramentIncome.Rows[0]["price"].ToString())); remainingBalance = dh.getBalanceOfSacramentIncome(sacramentIncomeID); lblBalance.Text = string.Format("{0:C}", remainingBalance); dgvPaymentHistory.AutoGenerateColumns = false; dgvPaymentHistory.DataSource = dh.getPaymentHistory(sacramentIncomeID); nudPayment.Maximum = Convert.ToDecimal(remainingBalance); }
public AddApplication(SacramentType type) { InitializeComponent(); sacramentType = type; this.dh = DataHandler.getDataHandler(); Draggable drag = new Draggable(this); drag.makeDraggable(this); drag.makeDraggable(panel1); birthdate_dtp.MaxDate = DateTime.Today; birthdate_dtp.Value = DateTime.Today; this.sacramentType = type; label1.Text = sacramentType + " Application"; sacramentItem = dh.getItem(sacramentType.ToString()); nupPrice.Maximum = Int32.MaxValue; nupPrice.Text = sacramentItem.Rows[0]["suggestedPrice"].ToString(); }