예제 #1
0
 public FormTreatmentCosts(TamsProject theProject, Dictionary <string, double> pricePerYard, FormAnalysis formAnalysis)
 {
     InitializeComponent();
     Project               = theProject;
     updatedPricePerYard   = pricePerYard;
     analysis              = formAnalysis;
     treatments            = Database.GetDataByQuery(Project.conn, "SELECT id, name, cost FROM treatments;");
     numericUpDown1.Value  = Convert.ToDecimal(treatments.Rows[0]["cost"]);
     numericUpDown2.Value  = Convert.ToDecimal(treatments.Rows[1]["cost"]);
     numericUpDown3.Value  = Convert.ToDecimal(treatments.Rows[2]["cost"]);
     numericUpDown4.Value  = Convert.ToDecimal(treatments.Rows[3]["cost"]);
     numericUpDown5.Value  = Convert.ToDecimal(treatments.Rows[4]["cost"]);
     numericUpDown6.Value  = Convert.ToDecimal(treatments.Rows[5]["cost"]);
     numericUpDown7.Value  = Convert.ToDecimal(treatments.Rows[6]["cost"]);
     numericUpDown8.Value  = Convert.ToDecimal(treatments.Rows[7]["cost"]);
     numericUpDown9.Value  = Convert.ToDecimal(treatments.Rows[8]["cost"]);
     numericUpDown10.Value = Convert.ToDecimal(treatments.Rows[9]["cost"]);
     numericUpDown11.Value = Convert.ToDecimal(treatments.Rows[10]["cost"]);
     numericUpDown12.Value = Convert.ToDecimal(treatments.Rows[11]["cost"]);
     numericUpDown13.Value = Convert.ToDecimal(treatments.Rows[12]["cost"]);
     numericUpDown14.Value = Convert.ToDecimal(treatments.Rows[13]["cost"]);
     numericUpDown15.Value = Convert.ToDecimal(treatments.Rows[14]["cost"]);
     numericUpDown16.Value = Convert.ToDecimal(treatments.Rows[15]["cost"]);
     numericUpDown17.Value = Convert.ToDecimal(treatments.Rows[16]["cost"]);
     numericUpDown18.Value = Convert.ToDecimal(treatments.Rows[17]["cost"]);
     numericUpDown19.Value = Convert.ToDecimal(treatments.Rows[18]["cost"]);
     numericUpDown20.Value = Convert.ToDecimal(treatments.Rows[19]["cost"]);
     numericUpDown21.Value = Convert.ToDecimal(treatments.Rows[23]["cost"]);
     numericUpDown22.Value = Convert.ToDecimal(treatments.Rows[20]["cost"]);
     numericUpDown23.Value = Convert.ToDecimal(treatments.Rows[21]["cost"]);
     numericUpDown24.Value = Convert.ToDecimal(treatments.Rows[22]["cost"]);
 }
예제 #2
0
 public BudgetControlTable(FormAnalysis form)
 {
     formAnalysis = form;
     //
     // labelAreaCovered
     //
     labelAreaCovered.AutoSize = true;
     labelAreaCovered.Location = new System.Drawing.Point(138, 0);
     labelAreaCovered.Name     = "labelAreaCovered";
     labelAreaCovered.Size     = new System.Drawing.Size(75, 13);
     labelAreaCovered.TabIndex = 32;
     labelAreaCovered.Text     = "Area  Covered";
     //
     // labelRSLx
     //
     labelRSLx.AutoSize = true;
     labelRSLx.Location = new System.Drawing.Point(3, 0);
     labelRSLx.Name     = "labelRSLx";
     labelRSLx.Size     = new System.Drawing.Size(28, 13);
     labelRSLx.TabIndex = 28;
     labelRSLx.Text     = "RSL";
     //
     // labelBudgetUsed
     //
     labelBudgetUsed.AutoSize = true;
     labelBudgetUsed.Location = new System.Drawing.Point(43, 0);
     labelBudgetUsed.Name     = "labelBudgetUsed";
     labelBudgetUsed.Size     = new System.Drawing.Size(69, 13);
     labelBudgetUsed.TabIndex = 31;
     labelBudgetUsed.Text     = "Budget Used";
     //
     // labelPercentConvered
     //
     labelPercentCovered.AutoSize = true;
     labelPercentCovered.Location = new System.Drawing.Point(233, 0);
     labelPercentCovered.Name     = "labelPercentConvered";
     labelPercentCovered.Size     = new System.Drawing.Size(58, 13);
     labelPercentCovered.TabIndex = 33;
     labelPercentCovered.Text     = "% Covered";
     //
     // tableBudgetControl
     //
     AutoScroll  = true;
     ColumnCount = 4;
     ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 40F));
     ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 95F));
     ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 95F));
     ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 70F));
     Controls.Add(labelAreaCovered, 2, 0);
     Controls.Add(labelRSLx, 0, 0);
     Controls.Add(labelBudgetUsed, 1, 0);
     Controls.Add(labelPercentCovered, 3, 0);
     Location    = new System.Drawing.Point(14, 125);
     MaximumSize = new System.Drawing.Size(300, 585);
     Name        = "tableBudgetControl";
     RowCount    = 1;
     RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
     Size     = new System.Drawing.Size(300, 15);
     TabIndex = 32;
     Visible  = true;
     formAnalysis.panelRowTotal.Visible = true;
 }