//CONSTRUCTOR /// <summary> /// This is the constructor for the EquipmentMaintenanceForm. It initialazes the display of the form, initializes the class variables and bind the controls on the form the their corresponding data sources. /// </summary> /// <param name="dataModule">The DataModule object this application uses for database connection.</param> /// <param name="mainForm">The MainForm that was clicked to open this form.</param> public EquipmentMaintenanceForm(DataModule dataModule, MainForm mainForm) { this.InitializeComponent(); this.dataModule = dataModule; this.mainForm = mainForm; this.BindControls(); }
/// <summary> /// The constructor for the PrintInvoicesForm. Initializes the display objects and variables for the form. /// </summary> /// <param name="dataModule">The DataModule object this application uses for database connection.</param> /// <param name="mainForm">The MainForm that was clicked to open this form.</param> public PrintInvoicesForm(DataModule dataModule, MainForm mainForm) { InitializeComponent(); this.dataModule = dataModule; this.mainForm = mainForm; serviceCurrencyManager = (CurrencyManager)this.BindingContext[dataModule.greenDataSet, "SERVICE"]; ownerCurrencyManager = (CurrencyManager)this.BindingContext[dataModule.greenDataSet, "OWNER"]; vehicleCurrencyManager = (CurrencyManager)this.BindingContext[dataModule.greenDataSet, "VEHICLE"]; serviceTypeCurrencyManager = (CurrencyManager)this.BindingContext[dataModule.greenDataSet, "SERVICETYPE"]; blackBrush = new SolidBrush(Color.Black); this.printPreviewDialog.Document = reportPrintDocument; }
//CONSTRUCTOR public ServiceMaintenanceForm(DataModule dataModule, MainForm mainForm) { this.InitializeComponent(); this.dataModule = dataModule; this.mainForm = mainForm; serviceCurrencyManager = (CurrencyManager)this.BindingContext[dataModule.greenDataSet, "SERVICE"]; vehicleCurrencyManager = (CurrencyManager)this.BindingContext[dataModule.greenDataSet, "VEHICLE"]; ownerCurrencyManager = (CurrencyManager)this.BindingContext[dataModule.greenDataSet, "OWNER"]; serviceTypeCurrencyManager = (CurrencyManager)this.BindingContext[dataModule.greenDataSet, "SERVICETYPE"]; this.BindControls(); //changing data grid view column widths. this.setColumnWidths(serviceDataGridView, 80); }
//CONSTRUCTOR /// <summary> /// The constructor for the AllocateEquipmentForm. Initializes the objects variables and lays out the data grid views. /// </summary> /// <param name="dataModule">The DataModule object this application uses for database connection.</param> /// <param name="mainForm">The mainform object that contains the allocate equipment button that was clicked to show this form.</param> public AllocateEquipmentForm(DataModule dataModule, MainForm mainForm) { this.InitializeComponent(); this.dataModule = dataModule; this.mainForm = mainForm; //creating currency managers for the various data grid views. equipmentCurrencyManager = (CurrencyManager)this.BindingContext[dataModule.greenDataSet, "EQUIPMENT"]; serviceTypeCurrencyManager = (CurrencyManager)this.BindingContext[dataModule.greenDataSet, "SERVICETYPE"]; serviceTypeEquipmentCurrencyManager = (CurrencyManager)this.BindingContext[dataModule.greenDataSet, "SERVICETYPEEQUIPMENT"]; this.BindControls(); //changing data grid view column widths. this.setColumnWidths(serviceTypeDataGridView, 80); this.serviceTypeDataGridView.Columns[1].Width = 106; this.setColumnWidths(equipmentDataGridView, 90); this.equipmentDataGridView.Columns[1].Width = 160; this.setColumnWidths(serviceTypeEquipmentDataGridView, 80); }