Esempio n. 1
0
        private void MaterialForm_Load(object sender, EventArgs e)
        {
            chklbSummaryDetails.CheckOnClick = false;
            chklbSummaryDetails.MouseClick += new MouseEventHandler(chklbSummaryDetails_DoubleClick);
            grdVwMatSum.CellEndEdit += new DataGridViewCellEventHandler(grdVwMatSum_CellEndEdit);

            for (int i = 0; i < phases.Length; i++)
            {
                DataGridViewRow row = new DataGridViewRow();
                DataGridViewCell phaseCell = new DataGridViewTextBoxCell();
                phaseCell.Value = phases[i];
                row.Cells.Add(phaseCell);

                grdVwMatSum.Rows.Add(row);
            }
            grdVwMatSum.Columns["phaseColumn"].ReadOnly = true;
            grdVwMatSum.Enabled = false;
            summ = new MaterialSummary();
        }
Esempio n. 2
0
 private void loadSummary(MaterialSummary.SummaryType type)
 {
     List<double> vals = summ.GetSummaryByType(type);
     Boolean setNull = false;
     if (vals.Count <= 0)
         setNull = true;
     for (int i = 0; i < grdVwMatSum.Rows.Count; i++)
     {
         //value column of each row
         if (setNull)
             grdVwMatSum[1, i].Value = null;
         else
             grdVwMatSum[1, i].Value = vals[i];
     }
 }