/// <summary> /// Used to instantiate a new invoice with the passed arguments /// </summary> /// <param name="id">The unique identification number of an invoice</param> /// <param name="customerID">The unique identification number of the collector associated with this invoice</param> /// <param name="date">The date this invoice was created</param> public DBInvoice(int id, int customerID, DateTime date) { this.ID = id; this.Collector = DBCollector.GetCollectorById(customerID); this.Date = date; this.Transactions = new BindingList <DBTransaction>(); }
private void NudCollectorId_ValueChanged(object sender, EventArgs e) { try { collector = DBCollector.GetCollectorById((int)this.nudCollectorId.Value); this.lblCollectorName.Text = collector.FullName; this.mtxtPhoneNumber.Text = collector.PhoneNumber; } catch (Exception ex) { (this.Parent.Parent as MasterForm).SetStatus("Error! Failed to load collector: " + ex.Message); } }
private void ShowCollector() { int collectorID = (int)this.nudCollectorId.Value; DBCollector tempCollector = DBCollector.GetCollectorById(collectorID); this.txtFirstName.Text = tempCollector.FirstName; this.txtLastName.Text = tempCollector.LastName; this.mtxtPhoneNumber.Text = tempCollector.PhoneNumber; this.cbxType.SelectedValue = tempCollector.CollectorTypeID; //Check the checkboxes of tags which this collector is interested in DBControlHelper.CheckControlsWithValues(this.tlpTagsBookSelection, DBCollector.GetInterestsOfType(collectorID, 1)); DBControlHelper.CheckControlsWithValues(this.tlpTagsMapSelection, DBCollector.GetInterestsOfType(collectorID, 2)); DBControlHelper.CheckControlsWithValues(this.tlpTagsPeriodicalSelection, DBCollector.GetInterestsOfType(collectorID, 3)); }
public void SetCollector(int id, int max) { collector = DBCollector.GetCollectorById(id); this.nudCollectorId.Maximum = max; this.nudCollectorId.Value = id; }