Ejemplo n.º 1
0
        public void BuildGridView()
        {
            try
            {
                if (maxCountCum > 0)
                {
                    for (int i = 0; i < maxCountCum; i++)
                    {
                        var columnTram = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
                        columnTram.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
                        columnTram.HeaderText   = "Trạm" + (i + 1).ToString();
                        columnTram.Name         = "lblTram" + (i + 1).ToString();
                        columnTram.ReadOnly     = true;
                        this.dgTTNangXuat.Columns.Add(columnTram);

                        var columnLuyKeTram = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
                        columnLuyKeTram.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
                        columnLuyKeTram.HeaderText   = "Lũy kế trạm" + (i + 1).ToString();
                        columnLuyKeTram.Name         = "lblLuyKeTram" + (i + 1).ToString();
                        columnLuyKeTram.ReadOnly     = true;
                        this.dgTTNangXuat.Columns.Add(columnLuyKeTram);
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Lỗi: " + ex.Message);
            }
        }
Ejemplo n.º 2
0
 public void BuildGridView()
 {
     try
     {
         if (listError != null && listError.Count > 0)
         {
             for (int i = 0; i < listError.Count; i++)
             {
                 var error       = listError[i];
                 var columnError = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
                 columnError.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
                 columnError.HeaderText   = error.Name;
                 columnError.Name         = error.Name;
                 columnError.ReadOnly     = true;
                 this.dgTTNangXuat.Columns.Add(columnError);
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Lỗi: " + ex.Message);
     }
 }
Ejemplo n.º 3
0
        private void FrmRecommend4_Load(object sender, EventArgs e)
        {
            #region //具体搭设情况
            DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colParaType1 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
            colParaType1.HeaderText = "参数名称";
            colParaType1.Width      = 180;
            DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colParaResult1 = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
            colParaResult1.HeaderText = "参数值";
            colParaResult1.Width      = 100;
            DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colParaType2 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
            colParaType2.HeaderText = "参数名称";
            colParaType2.Width      = 180;
            DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colParaResult2 = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
            colParaResult2.HeaderText = "参数值";
            colParaResult2.Width      = 100;

            Dgv_Recommend4Para.Columns.Add(colParaType1);
            Dgv_Recommend4Para.Columns.Add(colParaResult1);
            Dgv_Recommend4Para.Columns.Add(colParaType2);
            Dgv_Recommend4Para.Columns.Add(colParaResult2);
            Dgv_Recommend4Para.Rows.Add(6);
            string[] strParaType1   = new string[] { "脚手架搭设高度H(m)", "立杆纵向间距la(m)", "立杆步距h(m)", "顶部防护栏杆高h1(m)", "内立杆离建筑物距离a(mm)", "连墙件布置方式" };
            string[] strParaResult1 = new string[] { "X", "X", "X", "X", "X", "两步两跨/两步三跨" };
            string[] strParaType2   = new string[] { "脚手架沿纵向搭设长度L(m)", "立杆横向间距lb(m)", "脚手架总步数n", "纵横向扫地杆离地距离h2(mm)", "脚手板铺设方式", "" };
            string[] strParaResult2 = new string[] { "X", "X", "X", "X", "X步1设", " " };

            for (int i = 0; i < strParaType1.Length; i++)
            {
                Dgv_Recommend4Para.Rows[i].Cells[0].Value = strParaType1[i];
                Dgv_Recommend4Para.Rows[i].Cells[1].Value = strParaResult1[i];
                Dgv_Recommend4Para.Rows[i].Cells[2].Value = strParaType2[i];
                Dgv_Recommend4Para.Rows[i].Cells[3].Value = strParaResult2[i];
            }
            #endregion

            #region //4承插型盘扣式钢管脚手架—劳动力安排表
            {
                DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colWorktypeChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                colWorktypeChoice.HeaderText = "选择工种";
                colWorktypeChoice.Width      = 100;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colWorktype = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colWorktype.HeaderText = "工种名称";
                colWorktype.Width      = 180;
                DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn colWorkNumber = new DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn();
                colWorkNumber.HeaderText = "人数";
                colWorkNumber.Width      = 180;
                DevComponents.DotNetBar.Controls.DataGridViewCheckBoxXColumn colWorkDelete = new DevComponents.DotNetBar.Controls.DataGridViewCheckBoxXColumn();
                colWorkDelete.HeaderText = "删除行";
                colWorkDelete.Width      = 60;
                Dgv_Recommend4Labor.Columns.Add(colWorktypeChoice);
                Dgv_Recommend4Labor.Columns.Add(colWorktype);
                Dgv_Recommend4Labor.Columns.Add(colWorkNumber);
                Dgv_Recommend4Labor.Columns.Add(colWorkDelete);
                Dgv_Recommend4Labor.Rows.Add();

                object[] strWork = new object[] { "技术管理", "安全监督", "质量检查", "测量放线", "架子工" };
                for (int i = 0; i < strWork.Length; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text   = (string)strWork[i];
                    btnItem.Click += new System.EventHandler(delegate(object sender1, System.EventArgs args)
                    {
                        int RowNum = Dgv_Recommend4Labor.CurrentRow.Index;
                        Dgv_Recommend4Labor.Rows[RowNum].Cells[1].Value = btnItem.Text;
                        Dgv_Recommend4Labor.Refresh();
                    });
                    colWorktypeChoice.SubItems.Add(btnItem);
                }
            }
            #endregion

            #region//4承插型盘扣式钢管脚手架—材料安排表
            {
                DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colMaterialChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                colMaterialChoice.HeaderText = "选择材料";
                colMaterialChoice.Width      = 60;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colMaterialName = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colMaterialName.HeaderText = "名称";
                colMaterialName.Width      = 80;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colMaterialType = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colMaterialType.HeaderText = "型号";
                colMaterialType.Width      = 80;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colMaterialStandard = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colMaterialStandard.HeaderText = "规格(mm)";
                colMaterialStandard.Width      = 110;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colMaterialQuality = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colMaterialQuality.HeaderText = "材质 ";
                colMaterialQuality.Width      = 75;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colDesignWeight = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colDesignWeight.HeaderText = "理论重量(kg)";
                colDesignWeight.Width      = 75;
                DevComponents.DotNetBar.Controls.DataGridViewCheckBoxXColumn colMaterialDelete = new DevComponents.DotNetBar.Controls.DataGridViewCheckBoxXColumn();
                colMaterialDelete.HeaderText = "删除行";
                colMaterialDelete.Width      = 50;
                Dgv_Recommend4Material.Columns.Add(colMaterialChoice);
                Dgv_Recommend4Material.Columns.Add(colMaterialName);
                Dgv_Recommend4Material.Columns.Add(colMaterialType);
                Dgv_Recommend4Material.Columns.Add(colMaterialStandard);
                Dgv_Recommend4Material.Columns.Add(colMaterialQuality);
                Dgv_Recommend4Material.Columns.Add(colDesignWeight);
                Dgv_Recommend4Material.Columns.Add(colMaterialDelete);
                Dgv_Recommend4Material.Rows.Add();
                object[,] material = new object[, ] {
                    { "立杆", new string[] { " A-LG-500	&	Φ60×3.2×500	&	Q345A	&	3.75 ", " A-LG-1000	&	Φ60×3.2×1000	&	Q345A	&	6.65 ", " A-LG-1500	&	Φ60×3.2×1500	&	Q345A	&	9.60 ", " A-LG-2000	&	Φ60×3.2×2000	&	Q345A	&	12.50 ", " A-LG-2500	&	Φ60×3.2×2500	&	Q345A	&	15.50 ", " A-LG-3000	&	Φ60×3.2×3000	&	Q345A	&	18.40 ", " B-LG-500	&	Φ48×3.2×500	&	Q345A	&	2.95 ", " B-LG-1000	&	Φ48×3.2×1000	&	Q345A	&	5.30 ", " B-LG-1500	&	Φ48×3.2×1500	&	Q345A	&	7.64 ", " B-LG-2000	&	Φ48×3.2×2000	&	Q345A	&	9.90 ", " B-LG-2500	&	Φ48×3.2×2500	&	Q345A	&	12.30 ", " B-LG-3000	&	Φ48×3.2×3000	&	Q345A	&	14.65 "} },
                    { "水平杆", new string[] { " A-SG-300	&	Φ48×2.5×240	&	Q235B	&	1.40 ", " A-SG-600	&	Φ48×2.5×540	&	Q235B	&	2.30 ", " A-SG-900	&	Φ48×2.5×840	&	Q235B	&	3.20 ", " A-SG-1200	&	Φ48×2.5×1140	&	Q235B	&	4.10 ", " A-SG-1500	&	Φ48×2.5×1440	&	Q235B	&	5.00 ", " A-SG-1800	&	Φ48×2.5×1740	&	Q235B	&	5.90 ", " A-SG-2000	&	Φ48×2.5×1940	&	Q235B	&	6.50 ", " B-SG-300	&	Φ42×2.5×240	&	Q235B	&	1.30 ", " B-SG-600	&	Φ42×2.5×540	&	Q235B	&	2.00 ", " B-SG-900	&	Φ42×2.5×840	&	Q235B	&	2.80 ", " B-SG-1200	&	Φ42×2.5×1140	&	Q235B	&	3.60 ", " B-SG-1500	&	Φ42×2.5×1440	&	Q235B	&	4.30 ", " B-SG-1800	&	Φ42×2.5×1740	&	Q235B	&	5.10 ", " B-SG-2000	&	Φ42×2.5×1940	&	Q235B	&	5.60 "} },
                    { "竖向斜杆", new string[] { " A-XG-300×1000	&	Φ48×2.5×1008	&	Q195	&	4.10 ", " A-XG-300×1500	&	Φ48×2.5×1506	&	Q195	&	5.50 ", " A-XG-600×1000	&	Φ48×2.5×1089	&	Q195	&	4.30 ", " A-XG-600×1500	&	Φ48×2.5×1560	&	Q195	&	5.60 ", " A-XG-900×1000	&	Φ48×2.5×1238	&	Q195	&	4.70 ", " A-XG-900×1500	&	Φ48×2.5×1668	&	Q195	&	5.90 ", " A-XG-900×2000	&	Φ48×2.5×2129	&	Q195	&	7.20 ", " A-XG-1200×1000	&	Φ48×2.5×1436	&	Q195	&	5.30 ", " A-XG-1200×1500	&	Φ48×2.5×1820	&	Q195	&	6.40 ", " A-XG-1200×2000	&	Φ48×2.5×2250	&	Q195	&	7.55 ", " A-XG-1500×1000	&	Φ48×2.5×1664	&	Q195	&	5.90 ", " A-XG-1500×1500	&	Φ48×2.5×2005	&	Q195	&	6.90 ", " A-XG-1500×2000	&	Φ48×2.5×2402	&	Q195	&	8.00 ", " A-XG-1800×1000	&	Φ48×2.5×1912	&	Q195	&	6.60 ", " A-XG-1800×1500	&	Φ48×2.5×2215	&	Q195	&	7.40 ", " A-XG-1800×2000	&	Φ48×2.5×2580	&	Q195	&	8.50 ", " A-XG-2000×1000	&	Φ48×2.5×2085	&	Q195	&	7.00 ", " A-XG-2000×1500	&	Φ48×2.5×2411	&	Q195	&	7.90 ", " A-XG-2000×2000	&	Φ48×2.5×2756	&	Q195	&	8.80 ", " B-XG-300×1000	&	Φ33×2.3×1057	&	Q195	&	2.95 ", " B-XG-300×1500	&	Φ33×2.3×1555	&	Q195	&	3.82 ", " B-XG-600×1000	&	Φ33×2.3×1131	&	Q195	&	3.10 ", " B-XG-600×1500	&	Φ33×2.3×1606	&	Q195	&	3.92 ", " B-XG-900×1000	&	Φ33×2.3×1277	&	Q195	&	3.36 ", " B-XG-900×1500	&	Φ33×2.3×1710	&	Q195	&	4.10 ", " B-XG-900×2000	&	Φ33×2.3×2173	&	Q195	&	4.90 ", " B-XG-1200×1000	&	Φ33×2.3×1472	&	Q195	&	3.70 ", " B-XG-1200×1500	&	Φ33×2.3×1859	&	Q195	&	4.40 ", " B-XG-1200×2000	&	Φ33×2.3×2291	&	Q195	&	5.10 ", " B-XG-1500×1000	&	Φ33×2.3×1699	&	Q195	&	4.09 ", " B-XG-1500×1500	&	Φ33×2.3×2042	&	Q195	&	4.70 ", " B-XG-1500×2000	&	Φ33×2.3×2402	&	Q195	&	5.40 ", " B-XG-1800×1000	&	Φ33×2.3×1946	&	Q195	&	4.53 ", " B-XG-1800×1500	&	Φ33×2.3×2251	&	Q195	&	5.05 ", " B-XG-1800×2000	&	Φ33×2.3×2618	&	Q195	&	5.70 ", " B-XG-2000×1000	&	Φ33×2.3×2119	&	Q195	&	4.82 ", " B-XG-2000×1500	&	Φ33×2.3×2411	&	Q195	&	5.35 ", " B-XG-2000×2000	&	Φ33×2.3×2756	&	Q195	&	5.95 "} },
                    { "水平斜杆", new string[] { " A-SXG-900×900	&	Φ48×2.5×1273	&	Q235B	&	4.30 ", " A-SXG-900×1200	&	Φ48×2.5×1500	&	Q235B	&	5.00 ", " A-SXG-900×1500	&	Φ48×2.5×1749	&	Q235B	&	5.70 ", " A-SXG-1200×1200	&	Φ48×2.5×1697	&	Q235B	&	5.55 ", " A-SXG-1200×1500	&	Φ48×2.5×1921	&	Q235B	&	6.20 ", " A-SXG-1500×1500	&	Φ48×2.5×2121	&	Q235B	&	6.80 ", " B-SXG-900×900	&	Φ42×2.5×1272	&	Q235B	&	3.80 ", " B-SXG-900×1200	&	Φ42×2.5×1500	&	Q235B	&	4.30 ", " B-SXG-900×1500	&	Φ42×2.5×1749	&	Q235B	&	5.00 ", " B-SXG-1200×1200	&	Φ42×2.5×1697	&	Q235B	&	4.90 ", " B-SXG-1200×1500	&	Φ42×2.5×1921	&	Q235B	&	5.50 ", " B-SXG-1500×1500	&	Φ42×2.5×2121	&	Q235B	&	6.00 "} }
                };
                for (int i = 0; i < 4; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text = (string)material[i, 0];
                    string[] types = (string[])material[i, 1];
                    for (int j = 0; j < types.Length; j++)
                    {
                        DevComponents.DotNetBar.ButtonItem btnChildItem = new DevComponents.DotNetBar.ButtonItem();
                        string[] info = types[j].ToString().Split('&');
                        btnChildItem.Text   = info[0];
                        btnChildItem.Click += new System.EventHandler(delegate(object sender1, System.EventArgs args)
                        {
                            int RowNum = Dgv_Recommend4Material.CurrentRow.Index;
                            DevComponents.DotNetBar.ButtonItem item            = sender1 as DevComponents.DotNetBar.ButtonItem;
                            Dgv_Recommend4Material.Rows[RowNum].Cells[1].Value = item.Parent.Text;
                            Dgv_Recommend4Material.Rows[RowNum].Cells[2].Value = info[0];
                            Dgv_Recommend4Material.Rows[RowNum].Cells[3].Value = info[1];
                            Dgv_Recommend4Material.Rows[RowNum].Cells[4].Value = info[2];
                            Dgv_Recommend4Material.Rows[RowNum].Cells[5].Value = info[3];
                            Dgv_Recommend4Material.Refresh();
                        });
                        btnItem.SubItems.Add(btnChildItem);
                    }
                    colMaterialChoice.SubItems.Add(btnItem);
                }
            }
            #endregion
        }
Ejemplo n.º 4
0
        public FrmArrayList(Framework.Entity.Chapter chapter, object type)
        {
            InitializeComponent();
            @class = type;
            System.Collections.ArrayList templateList = contentService.GetContentTemplateByTitle(chapter.Title);
            foreach (Framework.Entity.Template template in templateList)
            {
                Framework.Class.ComboItem item = new Framework.Class.ComboItem();
                item.Text  = template.Title;
                item.Value = template;
                CbxType.Items.Add(item);
            }
            CbxType.SelectedIndex = 0;
            if (@class.GetType().Equals(new Framework.Model.PlanLabor().GetType()))
            {
                System.Windows.Forms.DataGridViewCheckBoxColumn colState = new System.Windows.Forms.DataGridViewCheckBoxColumn(true);
                colState.ThreeState = false;
                colState.Width      = 30;
                DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colType = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
                colType.HeaderText = "工种";
                colType.Width      = 80;
                DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn colBase = new DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn();
                colBase.HeaderText = "基础施工阶段";
                colBase.Width      = 100;
                DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn colMain = new DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn();
                colMain.HeaderText = "主体施工阶段";
                colMain.Width      = 100;
                DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn colFitup = new DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn();
                colFitup.HeaderText = "基础施工阶段";
                colFitup.Width      = 100;
                DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn colLast = new DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn();
                colLast.HeaderText = "收尾阶段";
                colLast.Width      = 100;
                DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn colPrepare = new DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn();
                colPrepare.HeaderText = "准备阶段";
                colPrepare.Width      = 100;
                DataGridView.Columns.Add(colState);
                DataGridView.Columns.Add(colType);
                DataGridView.Columns.Add(colBase);
                DataGridView.Columns.Add(colMain);
                DataGridView.Columns.Add(colFitup);
                DataGridView.Columns.Add(colLast);
                DataGridView.Columns.Add(colPrepare);
            }
            else if (@class.GetType().Equals(new Framework.Model.PlanMachine().GetType()))
            {
                DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                colChoice.HeaderText = "选择设备";
                colChoice.Width      = 70;
                DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colName = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
                colName.HeaderText = "设备名称";
                colName.Width      = 180;
                DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colType = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
                colType.HeaderText = "设备型号";
                colType.Width      = 180;
                DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colFunction = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
                colFunction.HeaderText = "性能";
                colFunction.Width      = 180;
                object[,] machines     = new object[, ] {
                    { "塔吊", new string[] { "QTZ31.5&315-KN·m", "QTZ40&400KN·m", "QTZ50&500KN·m", "QTZ63&630KN·m" } },
                    { "施工电梯", new string[] { "SCD200/200&100m/200m" } },
                    { "砼搅拌机", new string[] { "JDC350&350L/560L", "JS500&500L/800L", "JS75&750L/1200L" } },
                    { "挖掘机(反铲)", new string[] { "Atlas3306LC&31500&1.90", "Atlas2606LC&25000&1.50", "Atlas2006LC&18000&1.00", "Atlas2306LC&22000&1.20", "BonnyCE400-6&40000&2.00", "BonnyCE650-6&66000&4.00" } }
                };
                for (int i = 0; i < 4; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text = (string)machines[i, 0];
                    string[] types = (string[])machines[i, 1];
                    for (int j = 0; j < types.Length; j++)
                    {
                        DevComponents.DotNetBar.ButtonItem btnChildItem = new DevComponents.DotNetBar.ButtonItem();
                        string[] info = types[j].ToString().Split('&');
                        btnChildItem.Text   = info[0];
                        btnChildItem.Click += new System.EventHandler(delegate(object sender, System.EventArgs args)
                        {
                            DevComponents.DotNetBar.ButtonItem item     = sender as DevComponents.DotNetBar.ButtonItem;
                            DataGridView.SelectedRows[0].Cells[1].Value = item.Parent.Text;
                            DataGridView.SelectedRows[0].Cells[2].Value = info[0];
                            DataGridView.SelectedRows[0].Cells[3].Value = info[1];
                            DataGridView.Refresh();
                        });
                        btnItem.SubItems.Add(btnChildItem);
                    }
                    colChoice.SubItems.Add(btnItem);
                }
                DataGridView.Columns.Add(colChoice);
                DataGridView.Columns.Add(colName);
                DataGridView.Columns.Add(colType);
                DataGridView.Columns.Add(colFunction);
            }
            else if (@class.GetType().Equals(new Framework.Model.PlanMaterial().GetType()))
            {
                // DevComponents.DotNetBar.Controls.DataGridViewComboBoxExColumn colName = new DevComponents.DotNetBar.Controls.DataGridViewComboBoxExColumn();
                System.Windows.Forms.DataGridViewComboBoxColumn colName = new System.Windows.Forms.DataGridViewComboBoxColumn();
                colName.HeaderText = "材料名称";
                colName.Width      = 120;
                DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn colNumber = new DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn();
                colNumber.HeaderText = "进场数量";
                colNumber.Width      = 100;
                DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colUnit = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
                colUnit.HeaderText = "单位";
                colUnit.Width      = 80;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colPlan = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colPlan.HeaderText = "进场计划";
                colPlan.Width      = 160;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colRemarks = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colRemarks.HeaderText = "备注";
                colRemarks.Width      = 150;
                DataGridView.Columns.Add(colName);
                DataGridView.Columns.Add(colNumber);
                DataGridView.Columns.Add(colUnit);
                DataGridView.Columns.Add(colPlan);
                DataGridView.Columns.Add(colRemarks);
            }
            else if (@class.GetType().Equals(new Framework.Model.ManageMember().GetType()))
            {
                System.Windows.Forms.DataGridViewCheckBoxColumn colState = new System.Windows.Forms.DataGridViewCheckBoxColumn(true);
                colState.ThreeState = false;
                colState.Width      = 30;
                System.Windows.Forms.DataGridViewTextBoxColumn colName = new System.Windows.Forms.DataGridViewTextBoxColumn();
                colName.HeaderText = "姓名";
                colName.Width      = 100;
                DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colWork = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
                colWork.HeaderText = "职务";
                colWork.Width      = 120;
                System.Windows.Forms.DataGridViewComboBoxColumn colTitle = new System.Windows.Forms.DataGridViewComboBoxColumn();
                colTitle.HeaderText = "职称";
                colTitle.Width      = 120;
                colTitle.Items.Add("高级工程师");
                colTitle.Items.Add("工程师");
                colTitle.Items.Add("助理工程师");
                colTitle.Items.Add("经济师");
                colTitle.Items.Add("会计师");
                System.Windows.Forms.DataGridViewTextBoxColumn colDuty = new System.Windows.Forms.DataGridViewTextBoxColumn();
                colDuty.HeaderText = "工作责任";
                colDuty.Width      = 120;
                System.Windows.Forms.DataGridViewTextBoxColumn colRemarks = new System.Windows.Forms.DataGridViewTextBoxColumn();
                colRemarks.HeaderText = "备注";
                colRemarks.Width      = 120;
                DataGridView.Columns.Add(colState);
                DataGridView.Columns.Add(colName);
                DataGridView.Columns.Add(colWork);
                DataGridView.Columns.Add(colTitle);
                DataGridView.Columns.Add(colDuty);
                DataGridView.Columns.Add(colRemarks);
            }
            else if (@class.GetType().Equals(new Framework.Model.PrepareMaterial().GetType()))
            {
                DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                colChoice.HeaderText = "选择材料";
                colChoice.Width      = 150;
                DevComponents.DotNetBar.Controls.DataGridViewMaskedTextBoxAdvColumn colName = new DevComponents.DotNetBar.Controls.DataGridViewMaskedTextBoxAdvColumn();
                colName.HeaderText = "材料名称";
                colName.Width      = 460;
                object[] machines = new object[] {
                    "发泡陶瓷保温板",
                    "复合水泥发泡保温板",
                    "加气混凝土板",
                    "岩棉板(条)",
                    "蓝海板",
                    "其它"
                };
                for (int i = 0; i < 6; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text   = (string)machines[i];
                    btnItem.Click += new System.EventHandler(delegate(object sender, System.EventArgs args)
                    {
                        DataGridView.SelectedRows[0].Cells[1].Value = btnItem.Text;
                        DataGridView.Refresh();
                    });
                    colChoice.SubItems.Add(btnItem);
                }
                DataGridView.Columns.Add(colChoice);
                DataGridView.Columns.Add(colName);
            }
            else if (@class.GetType().Equals(new Framework.Model.PrepareMachineTool().GetType()))
            {
                DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                colChoice.HeaderText = "选择机具";
                colChoice.Width      = 150;
                DevComponents.DotNetBar.Controls.DataGridViewMaskedTextBoxAdvColumn colName = new DevComponents.DotNetBar.Controls.DataGridViewMaskedTextBoxAdvColumn();
                colName.HeaderText = "机具名称";
                colName.Width      = 460;

                object[] machines = new object[] {
                    "抹子", "砂纸", "2m靠尺", "弹线墨盒", "多用刀", "铲刀", "阴阳角抿子", "电动搅拌机", "角磨机", "其它"
                };
                for (int i = 0; i < 10; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text   = (string)machines[i];
                    btnItem.Click += new System.EventHandler(delegate(object sender, System.EventArgs args)
                    {
                        DataGridView.SelectedRows[0].Cells[1].Value = btnItem.Text;
                        DataGridView.Refresh();
                    });
                    colChoice.SubItems.Add(btnItem);
                }
                DataGridView.Columns.Add(colChoice);
                DataGridView.Columns.Add(colName);
            }
            else if (@class.GetType().Equals(new Framework.Model.PrepareMaterial().GetType()))
            {
                DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                colChoice.HeaderText = "选择屋面做法";
                colChoice.Width      = 150;
                DevComponents.DotNetBar.Controls.DataGridViewMaskedTextBoxAdvColumn colName = new DevComponents.DotNetBar.Controls.DataGridViewMaskedTextBoxAdvColumn();
                colName.HeaderText = "屋面做法";
                colName.Width      = 460;
                object[] machines = new object[] {
                    "发泡陶瓷保温板",
                    "复合水泥发泡保温板",
                    "加气混凝土板",
                    "岩棉板(条)",
                    "蓝海板",
                    "其它"
                };
                for (int i = 0; i < 6; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text   = (string)machines[i];
                    btnItem.Click += new System.EventHandler(delegate(object sender, System.EventArgs args)
                    {
                        DataGridView.SelectedRows[0].Cells[1].Value = btnItem.Text;
                        DataGridView.Refresh();
                    });
                    colChoice.SubItems.Add(btnItem);
                }
                DataGridView.Columns.Add(colChoice);
                DataGridView.Columns.Add(colName);
            }
        }
Ejemplo n.º 5
0
        private void FrmRecommend3_Load(object sender, EventArgs e)
        {
            #region //具体搭设情况
            DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colParaType1 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
            colParaType1.HeaderText = "参数名称";
            colParaType1.Width      = 180;
            DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colParaResult1 = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
            colParaResult1.HeaderText = "参数值";
            colParaResult1.Width      = 100;
            DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colParaType2 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
            colParaType2.HeaderText = "参数名称";
            colParaType2.Width      = 180;
            DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colParaResult2 = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
            colParaResult2.HeaderText = "参数值";
            colParaResult2.Width      = 100;

            Dgv_Recommend3Para.Columns.Add(colParaType1);
            Dgv_Recommend3Para.Columns.Add(colParaResult1);
            Dgv_Recommend3Para.Columns.Add(colParaType2);
            Dgv_Recommend3Para.Columns.Add(colParaResult2);
            Dgv_Recommend3Para.Rows.Add(6);
            string[] strParaType1   = new string[] { "脚手架搭设高度H(m)", "立杆纵向间距la(m)", "立杆步距h(m)", "顶部防护栏杆高h1(m)", "内立杆离建筑物距离a(mm)", "连墙件布置方式" };
            string[] strParaResult1 = new string[] { "X", "X", "X", "X", "X", "两步两跨/两步三跨" };
            string[] strParaType2   = new string[] { "脚手架沿纵向搭设长度L(m)", "立杆横向间距lb(m)", "脚手架总步数n", "纵横向扫地杆离地距离h2(mm)", "脚手板铺设方式", "" };
            string[] strParaResult2 = new string[] { "X", "X", "X", "X", "X步1设", " " };

            for (int i = 0; i < strParaType1.Length; i++)
            {
                Dgv_Recommend3Para.Rows[i].Cells[0].Value = strParaType1[i];
                Dgv_Recommend3Para.Rows[i].Cells[1].Value = strParaResult1[i];
                Dgv_Recommend3Para.Rows[i].Cells[2].Value = strParaType2[i];
                Dgv_Recommend3Para.Rows[i].Cells[3].Value = strParaResult2[i];
            }
            #endregion

            #region //3碗扣式脚手架—劳动力安排表
            {
                DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colWorktypeChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                colWorktypeChoice.HeaderText = "选择工种";
                colWorktypeChoice.Width      = 100;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colWorktype = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colWorktype.HeaderText = "工种名称";
                colWorktype.Width      = 180;
                DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn colWorkNumber = new DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn();
                colWorkNumber.HeaderText = "人数";
                colWorkNumber.Width      = 180;
                DevComponents.DotNetBar.Controls.DataGridViewCheckBoxXColumn colWorkDelete = new DevComponents.DotNetBar.Controls.DataGridViewCheckBoxXColumn();
                colWorkDelete.HeaderText = "删除行";
                colWorkDelete.Width      = 60;
                Dgv_Recommend3Labor.Columns.Add(colWorktypeChoice);
                Dgv_Recommend3Labor.Columns.Add(colWorktype);
                Dgv_Recommend3Labor.Columns.Add(colWorkNumber);
                Dgv_Recommend3Labor.Columns.Add(colWorkDelete);
                Dgv_Recommend3Labor.Rows.Add();

                object[] strWork = new object[] { "技术管理", "安全监督", "质量检查", "测量放线", "架子工" };
                for (int i = 0; i < strWork.Length; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text   = (string)strWork[i];
                    btnItem.Click += new System.EventHandler(delegate(object sender1, System.EventArgs args)
                    {
                        int RowNum = Dgv_Recommend3Labor.CurrentRow.Index;
                        Dgv_Recommend3Labor.Rows[RowNum].Cells[1].Value = btnItem.Text;
                        Dgv_Recommend3Labor.Refresh();
                    });
                    colWorktypeChoice.SubItems.Add(btnItem);
                }
            }
            #endregion

            #region//3碗扣式脚手架—材料安排表
            {
                DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colMaterialChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                colMaterialChoice.HeaderText = "选择材料";
                colMaterialChoice.Width      = 60;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colMaterialName = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colMaterialName.HeaderText = "名称";
                colMaterialName.Width      = 80;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colMaterialType = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colMaterialType.HeaderText = "型号";
                colMaterialType.Width      = 80;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colMaterialStandard = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colMaterialStandard.HeaderText = "规格(mm)";
                colMaterialStandard.Width      = 110;
                DevComponents.DotNetBar.Controls.DataGridViewDoubleInputColumn colMarketWeight = new DevComponents.DotNetBar.Controls.DataGridViewDoubleInputColumn();
                colMarketWeight.HeaderText = "市场重量(kg)";
                colMarketWeight.Width      = 75;
                DevComponents.DotNetBar.Controls.DataGridViewDoubleInputColumn colDesignWeight = new DevComponents.DotNetBar.Controls.DataGridViewDoubleInputColumn();
                colDesignWeight.HeaderText = "设计重量(kg)";
                colDesignWeight.Width      = 75;
                DevComponents.DotNetBar.Controls.DataGridViewCheckBoxXColumn colMaterialDelete = new DevComponents.DotNetBar.Controls.DataGridViewCheckBoxXColumn();
                colMaterialDelete.HeaderText = "删除行";
                colMaterialDelete.Width      = 50;
                Dgv_Recommend3Material.Columns.Add(colMaterialChoice);
                Dgv_Recommend3Material.Columns.Add(colMaterialName);
                Dgv_Recommend3Material.Columns.Add(colMaterialType);
                Dgv_Recommend3Material.Columns.Add(colMaterialStandard);
                Dgv_Recommend3Material.Columns.Add(colMarketWeight);
                Dgv_Recommend3Material.Columns.Add(colDesignWeight);
                Dgv_Recommend3Material.Columns.Add(colMaterialDelete);
                Dgv_Recommend3Material.Rows.Add();
                object[,] material = new object[, ] {
                    { "立杆", new string[] { "LG-120&ф48×3.5×1200&7.41&7.05", "LG-180&ф48×3.5×1800&10.67&10.19&", "LG-240&ф48×3.5×2400&14.02&13.34&", "LG-300&ф48×3.5×3000&17.31&16.48&" } },
                    { "横杆", new string[] { "HG-30&ф48×3.5×300&1.67&1.32", "HG-60&ф48×3.5×600&2.82&2.47", "HG-90&ф48×3.5×900&3.97&3.63", "HG-120&ф48×3.5×1200&5.12&4.78", "HG-150&ф48×3.5×1500&6.28&5.93", "HG-180&ф48×3.5×180&7.43&7.08" } },
                    { "间横杆", new string[] { "JHG-90&ф48×3.5×900&5.28&4.37 ", "JHG-120	&ф48×3.5×1200	&6.43&5.52", "JHG-120+30&ф48×3.5×(1200+300)&7.74	&6.85", "JHG-120+60&ф48×3.5×(1200+600)&9.69&8.16" } },
                    { "专用斜杆", new string[] { "XG-0912&ф48×3.5×150&7.11&6.33", "XG-1212&ф48×3.5×170&7.87&7.03", "XG-1218&ф48×3.5×2160&9.66&8.66", "XG-1518&ф48×3.5×2340&10.34&9.30", "XG-1818&ф48×3.5×2550	&11.13&10.04"} },
                    { "专用斜杆", new string[] { "ZXG-0912	&ф48×3.5×1270&0&5.89 ", " ZXG-1212	&ф48×3.5×1500&0&6.76", " ZXG-1218	&ф48×3.5×1920&0&8.73"} },
                    { "十字撑", new string[] { "XZC-0912&ф30×2.5×1390&0&4.72 ", " XZC-1212&ф30×2.5×1560&0&5.31", " XZC-1218	&ф30×2.5×2060&0&7"} },
                    { "窄挑梁", new string[] { "TL-30	&宽度300	&1.68	&1.53 "} },
                    { "宽挑梁", new string[] { " TL-60&宽度600	&9.30	&8.60"} },
                    { "立杆连接销", new string[] { "LLX	&ф12	&0&0.18"} },
                    { "可调底座", new string[] { "KTZ-45	&可调范围≤300	&0&5.82", " KTZ-60&可调范围≤450&0&7.12", "KTZ-75	&可调范围≤600	&0&8.5"} },
                    { "可调托座", new string[] { "KTC-45	&可调范围≤300	&0&7.01", "KTC-60&可调范围≤450&0&8.31", "KTC-75	&可调范围≤600	&0&9.69"} },
                    { "脚手板", new string[] { "JB-120&1200x270	&0&12.8", "JB-150&1500x270	&0&15", "JB-180&1800x270	&	0&17.9"} },
                    { "架梯", new string[] { "JT-255	&2546×530	&0&34.7"} },
                };
                for (int i = 0; i < 13; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text = (string)material[i, 0];
                    string[] types = (string[])material[i, 1];
                    for (int j = 0; j < types.Length; j++)
                    {
                        DevComponents.DotNetBar.ButtonItem btnChildItem = new DevComponents.DotNetBar.ButtonItem();
                        string[] info = types[j].ToString().Split('&');
                        btnChildItem.Text   = info[0];
                        btnChildItem.Click += new System.EventHandler(delegate(object sender1, System.EventArgs args)
                        {
                            int RowNum = Dgv_Recommend3Material.CurrentRow.Index;
                            DevComponents.DotNetBar.ButtonItem item            = sender1 as DevComponents.DotNetBar.ButtonItem;
                            Dgv_Recommend3Material.Rows[RowNum].Cells[1].Value = item.Parent.Text;
                            Dgv_Recommend3Material.Rows[RowNum].Cells[2].Value = info[0];
                            Dgv_Recommend3Material.Rows[RowNum].Cells[3].Value = info[1];
                            Dgv_Recommend3Material.Rows[RowNum].Cells[4].Value = info[2];
                            Dgv_Recommend3Material.Rows[RowNum].Cells[5].Value = info[3];
                            Dgv_Recommend3Material.Refresh();
                        });
                        btnItem.SubItems.Add(btnChildItem);
                    }
                    colMaterialChoice.SubItems.Add(btnItem);
                }
            }
            #endregion
        }
Ejemplo n.º 6
0
        public FrmConstructPrepare(Framework.Entity.Chapter chapter, object type)
        {
            InitializeComponent();
            @class       = type;
            templateList = contentService.GetContentTemplateByTitle(chapter.Title);
            foreach (Framework.Entity.Template template in templateList)
            {
                if (template.Title == "脚手架工程")
                {
                    tempInsertText = template;
                }
            }

            {
                #region/*机械准备*/
                object[,] machines = new object[, ] {
                    { "架子扳手", "架子工搭设和拆除架子用" },
                    { "力矩扳手", "检查架子扣件拧紧力度是否达到要求" },
                    { "倒链", "调整架子水平弯曲度" },
                };
                for (int i = 0; i < 3; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text = (string)machines[i, 0];

                    btnItem.Click += new System.EventHandler(delegate(object sender, System.EventArgs args)
                    {
                        DataGridView1.SelectedRows[0].Cells[1].Value = btnItem.Text;
                        switch (btnItem.Text)
                        {
                        case "架子扳手": DataGridView1.SelectedRows[0].Cells[3].Value = (string)machines[0, 1]; break;

                        case "力矩扳手": DataGridView1.SelectedRows[0].Cells[3].Value = (string)machines[1, 1]; break;

                        case "倒链": DataGridView1.SelectedRows[0].Cells[3].Value = (string)machines[2, 1]; break;
                        }
                        DataGridView1.Refresh();
                    });
                    colChoice.SubItems.Add(btnItem);
                }
                #endregion
            }

            {
                #region /*材料准备*/
                DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                colChoice.HeaderText = "选择脚手架";
                colChoice.Width      = 100;
                DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colName = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
                colName.HeaderText = "脚手架名称";
                colName.Width      = 150;
                DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colType = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
                colType.HeaderText = "所需材料";
                colType.Width      = 100;
                DevComponents.DotNetBar.Controls.DataGridViewMaskedTextBoxAdvColumn colFunction = new DevComponents.DotNetBar.Controls.DataGridViewMaskedTextBoxAdvColumn();
                colFunction.HeaderText = "材料说明";
                colFunction.Width      = 250;
                object[,] machines     = new object[, ] {
                    { "钢管落地脚手架_内脚手架", new string[] { "钢管&Φ48 × 3.5", "扣件&配套", "连墙件&二步三跨,扣件连接", "脚手扳&木脚手板", "安全网&密目安全网" } },
                    { "钢管落地脚手架_外脚手架", new string[] { "钢管&Φ48 × 3.5", "扣件&配套", "连墙件&二步三跨,扣件连接", "脚手扳&木脚手板", "安全网&密目安全网" } },
                    { "钢管落地脚手架_物料提升架", new string[] { "钢管&Φ48 × 3.5", "扣件&配套", "连墙件&二步三跨,扣件连接", "脚手扳&木脚手板", "安全网&密目安全网" } },
                    { "腕扣式钢管脚手架", new string[] { "钢管&Φ48 × 3.5", "扣件&配套", "连墙件&二步三跨,扣件连接", "脚手扳&木脚手板", "安全网&密目安全网" } },
                    { "门式钢管脚手架", new string[] { "钢管&Φ48 × 3.5", "扣件&配套", "连墙件&二步三跨,扣件连接", "脚手扳&木脚手板", "安全网&密目安全网" } },
                    { "门式脚手架", new string[] { "钢管&Φ48 × 3.5", "扣件&配套", "连墙件&二步三跨,扣件连接", "脚手扳&木脚手板", "安全网&密目安全网" } },
                    { "扣件式钢管脚手架", new string[] { "钢管&Φ48 × 3.5", "扣件&配套", "连墙件&二步三跨,扣件连接", "脚手扳&木脚手板", "安全网&密目安全网" } },
                    { "附墙升降脚手架", new string[] { "钢管&Φ48 × 3.5", "扣件&配套", "连墙件&二步三跨,扣件连接", "脚手扳&木脚手板", "安全网&密目安全网" } },
                    { "整体提升脚手架", new string[] { "钢管&Φ48 × 3.5", "扣件&配套", "连墙件&二步三跨,扣件连接", "脚手扳&木脚手板", "安全网&密目安全网" } },
                    { "整体提升外脚手架", new string[] { "钢管&Φ48 × 3.5", "扣件&配套", "连墙件&二步三跨,扣件连接", "脚手扳&木脚手板", "安全网&密目安全网" } },
                    { "钢管扣件满堂脚手架", new string[] { "钢管&Φ48 × 3.5", "扣件&配套", "连墙件&二步三跨,扣件连接", "脚手扳&木脚手板", "安全网&密目安全网" } },
                };
                for (int i = 0; i < 11; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text = (string)machines[i, 0];
                    string[] types = (string[])machines[i, 1];
                    for (int j = 0; j < types.Length; j++)
                    {
                        DevComponents.DotNetBar.ButtonItem btnChildItem = new DevComponents.DotNetBar.ButtonItem();
                        string[] info = types[j].ToString().Split('&');
                        btnChildItem.Text   = info[0];
                        btnChildItem.Click += new System.EventHandler(delegate(object sender, System.EventArgs args)
                        {
                            DevComponents.DotNetBar.ButtonItem item      = sender as DevComponents.DotNetBar.ButtonItem;
                            DataGridView2.SelectedRows[0].Cells[1].Value = item.Parent.Text;
                            DataGridView2.SelectedRows[0].Cells[2].Value = info[0];
                            DataGridView2.SelectedRows[0].Cells[3].Value = info[1];
                            DataGridView2.Refresh();
                        });
                        btnItem.SubItems.Add(btnChildItem);
                    }
                    colChoice.SubItems.Add(btnItem);
                }
                DataGridView2.Columns.Add(colChoice);
                DataGridView2.Columns.Add(colName);
                DataGridView2.Columns.Add(colType);
                DataGridView2.Columns.Add(colFunction);
                #endregion
            }

            {
                #region /*劳动力需求*/
                DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                colChoice.HeaderText = "选择工种";
                colChoice.Width      = 100;
                DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colName = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
                colName.HeaderText = "工种名称";
                colName.Width      = 250;
                DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn colNumber = new DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn();
                colNumber.HeaderText = "每班人数";
                colNumber.Width      = 250;
                object[] labor = new object[] {
                    "技术管理",
                    "安全监督",
                    "质量检查",
                    "测量放线",
                    "架子工"
                };
                for (int i = 0; i < 5; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text = (string)labor[i];

                    btnItem.Click += new System.EventHandler(delegate(object sender, System.EventArgs args)
                    {
                        DataGridView3.SelectedRows[0].Cells[1].Value = btnItem.Text;
                        DataGridView3.Refresh();
                    });
                    colChoice.SubItems.Add(btnItem);
                }
                DataGridView3.Columns.Add(colChoice);
                DataGridView3.Columns.Add(colName);
                DataGridView3.Columns.Add(colNumber);
                #endregion
            }

            {
                #region/*脚手架施工方案*/
                //DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                //colChoice.HeaderText = "选择脚手架施工方案";
                //colChoice.Width = 200;
                //DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colName = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
                //colName.HeaderText = "脚手架施工方案";
                //colName.Width = 400;
                //object[,] machines = new object[,]{
                // {"腕扣式钢管脚手架",new string[] {"内脚手架","物料提升架","外脚手架"}},
                // {"复合水泥发泡保温板",new string[]{}},
                // };
                //for (int i = 0; i < 2; i++)
                //{
                //    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                //    btnItem.Text = (string)machines[i, 0];
                //    string[] types = (string[])machines[0, 1];
                //    btnItem.Click += new System.EventHandler(delegate(object sender, System.EventArgs args)
                //    {
                //        if (int i = 0)
                //        {
                //            for (int j = 0; j < types.Length; j++)
                //            {
                //                DevComponents.DotNetBar.ButtonItem btnChildItem = new DevComponents.DotNetBar.ButtonItem();
                //                //btnChildItem.Text = types[j].ToString();
                //                //btnChildItem.Click += new System.EventHandler(delegate(object sender, System.EventArgs args)
                //                //{
                //                //    DevComponents.DotNetBar.ButtonItem item = sender as DevComponents.DotNetBar.ButtonItem;
                //                DataGridView2.SelectedRows[0].Cells[1].Value = types[j].ToString();
                //                    //DataGridView2.SelectedRows[0].Cells[2].Value = info[0];
                //                    //DataGridView2.SelectedRows[0].Cells[3].Value = info[1];
                //                    //DataGridView2.Refresh();
                //                //});
                //                btnItem.SubItems.Add(btnChildItem);
                //            }

                //        }
                //        else
                //        {
                //            DataGridView4.SelectedRows[0].Cells[1].Value = btnItem.Text;
                //            DataGridView4.Refresh();

                //        }
                //    });
                //    colChoice.SubItems.Add(btnItem);
                //}
                //DataGridView4.Columns.Add(colChoice);
                //DataGridView4.Columns.Add(colName);
                #endregion
            }
        }
Ejemplo n.º 7
0
        public FrmConcreteProject(Framework.Entity.Chapter chapter, object type)
        {
            InitializeComponent();
            @class = type;
            System.Collections.ArrayList templateList = contentService.GetContentTemplateByTitle(chapter.Title);
            foreach (Framework.Entity.Template template in templateList)
            {
                Framework.Class.ComboItem item = new Framework.Class.ComboItem();
                item.Text  = template.Title;
                item.Value = template;
                CbxType.Items.Add(item);
            }
            CbxType.SelectedIndex = 0;
            {
                #region /*劳动力准备*/
                DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                colChoice.HeaderText = "选择工种";
                colChoice.Width      = 100;
                DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colName = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
                colName.HeaderText = "工种名称";
                colName.Width      = 100;
                DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn colNumber = new DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn();
                colNumber.HeaderText = "每班人数";
                colNumber.Width      = 100;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colRemarks = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colRemarks.HeaderText = "备注";
                colRemarks.Width      = 309;
                object[,] machines    = new object[, ] {
                    { "班组长", "有较强施工组织能力,熟悉混凝土施工方法。" },
                    { "振捣手", "有振捣经验,持证上岗。" },
                    { "抹面", "必须是瓦工出身,有抹面经验,持证上岗。" },
                    { "接管", "有接管经验,操作熟练。" },
                    { "普工", "能够吃苦,不怕脏,听从指挥" }
                };
                for (int i = 0; i < 5; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text = (string)machines[i, 0];

                    btnItem.Click += new System.EventHandler(delegate(object sender, System.EventArgs args)
                    {
                        DataGridView1.SelectedRows[0].Cells[1].Value = btnItem.Text;
                        switch (btnItem.Text)
                        {
                        case "班组长": DataGridView1.SelectedRows[0].Cells[3].Value = (string)machines[0, 1]; break;

                        case "振捣手": DataGridView1.SelectedRows[0].Cells[3].Value = (string)machines[1, 1]; break;

                        case "抹面": DataGridView1.SelectedRows[0].Cells[3].Value = (string)machines[2, 1]; break;

                        case "接管": DataGridView1.SelectedRows[0].Cells[3].Value = (string)machines[3, 1]; break;

                        case "普工": DataGridView1.SelectedRows[0].Cells[3].Value = (string)machines[4, 1]; break;
                        }
                        DataGridView1.Refresh();
                    });
                    colChoice.SubItems.Add(btnItem);
                }
                DataGridView1.Columns.Add(colChoice);
                DataGridView1.Columns.Add(colName);
                DataGridView1.Columns.Add(colNumber);
                DataGridView1.Columns.Add(colRemarks);
                #endregion
            }

            {
                #region/*机具准备 */
                DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                colChoice.HeaderText = "选择机械";
                colChoice.Width      = 100;
                DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colName = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
                colName.HeaderText = "机械名称";
                colName.Width      = 100;
                DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn colNumber = new DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn();
                colNumber.HeaderText = "数量";
                colNumber.Width      = 100;
                DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn colPower = new DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn();
                colPower.HeaderText = "功率(KW)";
                colPower.Width      = 100;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colRemarks = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colRemarks.HeaderText = "备注";
                colRemarks.Width      = 209;
                object[] machines2 = new object[] {
                    "混凝土泵车", "环保型振动棒", "BL12布料杆", "架子车", "木抹", "铁抹刮杠", "线绳", "钢卷尺", "棕刷"
                };
                for (int i = 0; i < 9; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text   = (string)machines2[i];
                    btnItem.Click += new System.EventHandler(delegate(object sender, System.EventArgs args)
                    {
                        DataGridView2.SelectedRows[0].Cells[1].Value = btnItem.Text;
                        DataGridView2.Refresh();
                    });
                    colChoice.SubItems.Add(btnItem);
                }
                DataGridView2.Columns.Add(colChoice);
                DataGridView2.Columns.Add(colName);
                DataGridView2.Columns.Add(colNumber);
                DataGridView2.Columns.Add(colPower);
                DataGridView2.Columns.Add(colRemarks);
                #endregion
            }

            {
                #region/*混凝土原材料要求 */
                DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                colChoice.HeaderText = "选择原材料";
                colChoice.Width      = 100;
                DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colName = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
                colName.HeaderText = "原材料名称";
                colName.Width      = 100;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colRemarks = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colRemarks.HeaderText = "备注";
                colRemarks.Width      = 409;
                object[,] machines3   = new object[, ] {
                    { "砂", "选用中粗砂,平均粒径不大于0.5mm,含泥量≤1%,对砂子的含石量、含水量在商砼生产厂家搅拌站进行现场取样实测,保证混凝土严格按照施工配合比施工。" },
                    { "石子", "选用砾石,要求含泥量≤1%,泥块含量≤0.5%,压碎指标值≤10,最大粒径与管径之比在1:3~1:4之间。" },
                    { "水泥", "采用普通硅酸盐水泥,水泥进场后立即取样送试,安定性合格后方可使用。" },
                    { "泵送剂", "进场泵送剂应具有出厂合格证及产品技术资料,并符合相应国家标准的要求,超过有效期或受潮的泵送剂不得使用。" },
                    { "粉煤灰", "选用Ⅱ级干排灰,进场材料必须出具出厂合格证" },
                    { "膨胀剂", "选用MEA,使混凝土得以补偿收缩,减少混凝土的收缩应力增强砼的防水能力。进场材料必须出具出厂合格证及厂家资质证书" },
                    { "水", "市政供水管网洁净自来水" }
                };
                for (int i = 0; i < 7; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text   = (string)machines3[i, 0];
                    btnItem.Click += new System.EventHandler(delegate(object sender, System.EventArgs args)
                    {
                        DataGridView3.SelectedRows[0].Cells[1].Value = btnItem.Text;
                        switch (btnItem.Text)
                        {
                        case "砂": DataGridView3.SelectedRows[0].Cells[2].Value = (string)machines3[0, 1]; break;

                        case "石子": DataGridView3.SelectedRows[0].Cells[2].Value = (string)machines3[1, 1]; break;

                        case "水泥": DataGridView3.SelectedRows[0].Cells[2].Value = (string)machines3[2, 1]; break;

                        case "泵送剂": DataGridView3.SelectedRows[0].Cells[2].Value = (string)machines3[3, 1]; break;

                        case "粉煤灰": DataGridView3.SelectedRows[0].Cells[2].Value = (string)machines3[4, 1]; break;

                        case "膨胀剂": DataGridView3.SelectedRows[0].Cells[2].Value = (string)machines3[5, 1]; break;

                        case "水": DataGridView3.SelectedRows[0].Cells[2].Value = (string)machines3[6, 1]; break;
                        }
                        DataGridView3.Refresh();
                    });
                    colChoice.SubItems.Add(btnItem);
                }
                DataGridView3.Columns.Add(colChoice);
                DataGridView3.Columns.Add(colName);
                DataGridView3.Columns.Add(colRemarks);
                #endregion
            }
        }
Ejemplo n.º 8
0
        private void FrmRecommend4_Load(object sender, EventArgs e)
        {
            #region //����������
            DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colParaType1 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
            colParaType1.HeaderText = "��������";
            colParaType1.Width = 180;
            DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colParaResult1 = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
            colParaResult1.HeaderText = "����ֵ";
            colParaResult1.Width = 100;
            DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colParaType2 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
            colParaType2.HeaderText = "��������";
            colParaType2.Width = 180;
            DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colParaResult2 = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
            colParaResult2.HeaderText = "����ֵ";
            colParaResult2.Width = 100;

            Dgv_Recommend4Para.Columns.Add(colParaType1);
            Dgv_Recommend4Para.Columns.Add(colParaResult1);
            Dgv_Recommend4Para.Columns.Add(colParaType2);
            Dgv_Recommend4Para.Columns.Add(colParaResult2);
            Dgv_Recommend4Para.Rows.Add(6);
            string[] strParaType1 = new string[] { "���ּܴ���߶�H(m)", "����������la(m)", "���˲���h(m)", "�����������˸�h1(m)", "�������뽨�������a(mm)", "��ǽ�����÷�ʽ" };
            string[] strParaResult1 = new string[] { "X", "X", "X", "X", "X", "��������/��������" };
            string[] strParaType2 = new string[] { "���ּ���������賤��L(m)", "���˺�����lb(m)", "���ּ��ܲ���n", "�ݺ���ɨ�ظ���ؾ���h2(mm)", "���ְ����跽ʽ", "" };
            string[] strParaResult2 = new string[] { "X", "X", "X", "X", "X��1��", " " };

            for (int i = 0; i < strParaType1.Length; i++)
            {
                Dgv_Recommend4Para.Rows[i].Cells[0].Value = strParaType1[i];
                Dgv_Recommend4Para.Rows[i].Cells[1].Value = strParaResult1[i];
                Dgv_Recommend4Para.Rows[i].Cells[2].Value = strParaType2[i];
                Dgv_Recommend4Para.Rows[i].Cells[3].Value = strParaResult2[i];
            }
            #endregion

            #region //4�в����̿�ʽ�ֹܽ��ּܡ��Ͷ������ű�
            {
                DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colWorktypeChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                colWorktypeChoice.HeaderText = "ѡ����";
                colWorktypeChoice.Width = 100;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colWorktype = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colWorktype.HeaderText = "��������";
                colWorktype.Width = 180;
                DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn colWorkNumber = new DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn();
                colWorkNumber.HeaderText = "����";
                colWorkNumber.Width = 180;
                DevComponents.DotNetBar.Controls.DataGridViewCheckBoxXColumn colWorkDelete = new DevComponents.DotNetBar.Controls.DataGridViewCheckBoxXColumn();
                colWorkDelete.HeaderText = "ɾ����";
                colWorkDelete.Width = 60;
                Dgv_Recommend4Labor.Columns.Add(colWorktypeChoice);
                Dgv_Recommend4Labor.Columns.Add(colWorktype);
                Dgv_Recommend4Labor.Columns.Add(colWorkNumber);
                Dgv_Recommend4Labor.Columns.Add(colWorkDelete);
                Dgv_Recommend4Labor.Rows.Add();

                object[] strWork = new object[] { "��������", "��ȫ�ල", "�������", "��������", "���ӹ�" };
                for (int i = 0; i < strWork.Length; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text = (string)strWork[i];
                    btnItem.Click += new System.EventHandler(delegate(object sender1, System.EventArgs args)
                    {
                        int RowNum = Dgv_Recommend4Labor.CurrentRow.Index;
                        Dgv_Recommend4Labor.Rows[RowNum].Cells[1].Value = btnItem.Text;
                        Dgv_Recommend4Labor.Refresh();
                    });
                    colWorktypeChoice.SubItems.Add(btnItem);
                }
            }
            #endregion

            #region//4�в����̿�ʽ�ֹܽ��ּܡ����ϰ��ű�
            {
                DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colMaterialChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                colMaterialChoice.HeaderText = "ѡ�����";
                colMaterialChoice.Width = 60;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colMaterialName = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colMaterialName.HeaderText = "����";
                colMaterialName.Width = 80;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colMaterialType = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colMaterialType.HeaderText = "�ͺ�";
                colMaterialType.Width = 80;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colMaterialStandard = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colMaterialStandard.HeaderText = "���(mm)";
                colMaterialStandard.Width = 110;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colMaterialQuality = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colMaterialQuality.HeaderText = "���� ";
                colMaterialQuality.Width = 75;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colDesignWeight = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colDesignWeight.HeaderText = "��������(kg)";
                colDesignWeight.Width = 75;
                DevComponents.DotNetBar.Controls.DataGridViewCheckBoxXColumn colMaterialDelete = new DevComponents.DotNetBar.Controls.DataGridViewCheckBoxXColumn();
                colMaterialDelete.HeaderText = "ɾ����";
                colMaterialDelete.Width = 50;
                Dgv_Recommend4Material.Columns.Add(colMaterialChoice);
                Dgv_Recommend4Material.Columns.Add(colMaterialName);
                Dgv_Recommend4Material.Columns.Add(colMaterialType);
                Dgv_Recommend4Material.Columns.Add(colMaterialStandard);
                Dgv_Recommend4Material.Columns.Add(colMaterialQuality);
                Dgv_Recommend4Material.Columns.Add(colDesignWeight);
                Dgv_Recommend4Material.Columns.Add(colMaterialDelete);
                Dgv_Recommend4Material.Rows.Add();
                object[,] material = new object[,]{
                    {"����",new string[]{" A-LG-500	&	��60��3.2��500	&	Q345A	&	3.75 "," A-LG-1000	&	��60��3.2��1000	&	Q345A	&	6.65 "," A-LG-1500	&	��60��3.2��1500	&	Q345A	&	9.60 "," A-LG-2000	&	��60��3.2��2000	&	Q345A	&	12.50 "," A-LG-2500	&	��60��3.2��2500	&	Q345A	&	15.50 "," A-LG-3000	&	��60��3.2��3000	&	Q345A	&	18.40 "," B-LG-500	&	��48��3.2��500	&	Q345A	&	2.95 "," B-LG-1000	&	��48��3.2��1000	&	Q345A	&	5.30 "," B-LG-1500	&	��48��3.2��1500	&	Q345A	&	7.64 "," B-LG-2000	&	��48��3.2��2000	&	Q345A	&	9.90 "," B-LG-2500	&	��48��3.2��2500	&	Q345A	&	12.30 "," B-LG-3000	&	��48��3.2��3000	&	Q345A	&	14.65 "}},
                    {"ˮƽ��",new string[]{" A-SG-300	&	��48��2.5��240	&	Q235B	&	1.40 "," A-SG-600	&	��48��2.5��540	&	Q235B	&	2.30 "," A-SG-900	&	��48��2.5��840	&	Q235B	&	3.20 "," A-SG-1200	&	��48��2.5��1140	&	Q235B	&	4.10 "," A-SG-1500	&	��48��2.5��1440	&	Q235B	&	5.00 "," A-SG-1800	&	��48��2.5��1740	&	Q235B	&	5.90 "," A-SG-2000	&	��48��2.5��1940	&	Q235B	&	6.50 "," B-SG-300	&	��42��2.5��240	&	Q235B	&	1.30 "," B-SG-600	&	��42��2.5��540	&	Q235B	&	2.00 "," B-SG-900	&	��42��2.5��840	&	Q235B	&	2.80 "," B-SG-1200	&	��42��2.5��1140	&	Q235B	&	3.60 "," B-SG-1500	&	��42��2.5��1440	&	Q235B	&	4.30 "," B-SG-1800	&	��42��2.5��1740	&	Q235B	&	5.10 "," B-SG-2000	&	��42��2.5��1940	&	Q235B	&	5.60 "}},
                    {"�����",new string[]{" A-XG-300��1000	&	��48��2.5��1008	&	Q195	&	4.10 "," A-XG-300��1500	&	��48��2.5��1506	&	Q195	&	5.50 "," A-XG-600��1000	&	��48��2.5��1089	&	Q195	&	4.30 "," A-XG-600��1500	&	��48��2.5��1560	&	Q195	&	5.60 "," A-XG-900��1000	&	��48��2.5��1238	&	Q195	&	4.70 "," A-XG-900��1500	&	��48��2.5��1668	&	Q195	&	5.90 "," A-XG-900��2000	&	��48��2.5��2129	&	Q195	&	7.20 "," A-XG-1200��1000	&	��48��2.5��1436	&	Q195	&	5.30 "," A-XG-1200��1500	&	��48��2.5��1820	&	Q195	&	6.40 "," A-XG-1200��2000	&	��48��2.5��2250	&	Q195	&	7.55 "," A-XG-1500��1000	&	��48��2.5��1664	&	Q195	&	5.90 "," A-XG-1500��1500	&	��48��2.5��2005	&	Q195	&	6.90 "," A-XG-1500��2000	&	��48��2.5��2402	&	Q195	&	8.00 "," A-XG-1800��1000	&	��48��2.5��1912	&	Q195	&	6.60 "," A-XG-1800��1500	&	��48��2.5��2215	&	Q195	&	7.40 "," A-XG-1800��2000	&	��48��2.5��2580	&	Q195	&	8.50 "," A-XG-2000��1000	&	��48��2.5��2085	&	Q195	&	7.00 "," A-XG-2000��1500	&	��48��2.5��2411	&	Q195	&	7.90 "," A-XG-2000��2000	&	��48��2.5��2756	&	Q195	&	8.80 "," B-XG-300��1000	&	��33��2.3��1057	&	Q195	&	2.95 "," B-XG-300��1500	&	��33��2.3��1555	&	Q195	&	3.82 "," B-XG-600��1000	&	��33��2.3��1131	&	Q195	&	3.10 "," B-XG-600��1500	&	��33��2.3��1606	&	Q195	&	3.92 "," B-XG-900��1000	&	��33��2.3��1277	&	Q195	&	3.36 "," B-XG-900��1500	&	��33��2.3��1710	&	Q195	&	4.10 "," B-XG-900��2000	&	��33��2.3��2173	&	Q195	&	4.90 "," B-XG-1200��1000	&	��33��2.3��1472	&	Q195	&	3.70 "," B-XG-1200��1500	&	��33��2.3��1859	&	Q195	&	4.40 "," B-XG-1200��2000	&	��33��2.3��2291	&	Q195	&	5.10 "," B-XG-1500��1000	&	��33��2.3��1699	&	Q195	&	4.09 "," B-XG-1500��1500	&	��33��2.3��2042	&	Q195	&	4.70 "," B-XG-1500��2000	&	��33��2.3��2402	&	Q195	&	5.40 "," B-XG-1800��1000	&	��33��2.3��1946	&	Q195	&	4.53 "," B-XG-1800��1500	&	��33��2.3��2251	&	Q195	&	5.05 "," B-XG-1800��2000	&	��33��2.3��2618	&	Q195	&	5.70 "," B-XG-2000��1000	&	��33��2.3��2119	&	Q195	&	4.82 "," B-XG-2000��1500	&	��33��2.3��2411	&	Q195	&	5.35 "," B-XG-2000��2000	&	��33��2.3��2756	&	Q195	&	5.95 "}},
                    {"ˮƽб��",new string[]{" A-SXG-900��900	&	��48��2.5��1273	&	Q235B	&	4.30 "," A-SXG-900��1200	&	��48��2.5��1500	&	Q235B	&	5.00 "," A-SXG-900��1500	&	��48��2.5��1749	&	Q235B	&	5.70 "," A-SXG-1200��1200	&	��48��2.5��1697	&	Q235B	&	5.55 "," A-SXG-1200��1500	&	��48��2.5��1921	&	Q235B	&	6.20 "," A-SXG-1500��1500	&	��48��2.5��2121	&	Q235B	&	6.80 "," B-SXG-900��900	&	��42��2.5��1272	&	Q235B	&	3.80 "," B-SXG-900��1200	&	��42��2.5��1500	&	Q235B	&	4.30 "," B-SXG-900��1500	&	��42��2.5��1749	&	Q235B	&	5.00 "," B-SXG-1200��1200	&	��42��2.5��1697	&	Q235B	&	4.90 "," B-SXG-1200��1500	&	��42��2.5��1921	&	Q235B	&	5.50 "," B-SXG-1500��1500	&	��42��2.5��2121	&	Q235B	&	6.00 "}}
                };
                for (int i = 0; i < 4; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text = (string)material[i, 0];
                    string[] types = (string[])material[i, 1];
                    for (int j = 0; j < types.Length; j++)
                    {
                        DevComponents.DotNetBar.ButtonItem btnChildItem = new DevComponents.DotNetBar.ButtonItem();
                        string[] info = types[j].ToString().Split('&');
                        btnChildItem.Text = info[0];
                        btnChildItem.Click += new System.EventHandler(delegate(object sender1, System.EventArgs args)
                        {
                            int RowNum = Dgv_Recommend4Material.CurrentRow.Index;
                            DevComponents.DotNetBar.ButtonItem item = sender1 as DevComponents.DotNetBar.ButtonItem;
                            Dgv_Recommend4Material.Rows[RowNum].Cells[1].Value = item.Parent.Text;
                            Dgv_Recommend4Material.Rows[RowNum].Cells[2].Value = info[0];
                            Dgv_Recommend4Material.Rows[RowNum].Cells[3].Value = info[1];
                            Dgv_Recommend4Material.Rows[RowNum].Cells[4].Value = info[2];
                            Dgv_Recommend4Material.Rows[RowNum].Cells[5].Value = info[3];
                            Dgv_Recommend4Material.Refresh();
                        });
                        btnItem.SubItems.Add(btnChildItem);
                    }
                    colMaterialChoice.SubItems.Add(btnItem);
                }
            }
            #endregion
        }
Ejemplo n.º 9
0
 public FrmInsertText(Framework.Entity.Chapter chapter, object type)
 {
     InitializeComponent();
     @class       = type;
     templateList = contentService.GetContentTemplateByTitle(chapter.Title);
     foreach (Framework.Entity.Template template in templateList)
     {
         if (template.Title == "冬期施工措施" | template.Title == "越冬工程的维护" | template.Title == "桩基工程" | template.Title == "屋面及防水施工方案")
         {
             tempInsertText = template;
         }
     }
     if (@class.GetType().Equals(new Framework.Model.InsertTextWinterMeasure().GetType()))
     {
         this.Text = "冬期施工措施";
         System.Windows.Forms.DataGridViewCheckBoxColumn colState = new System.Windows.Forms.DataGridViewCheckBoxColumn(true);
         colState.ThreeState = false;
         colState.Width      = 30;
         DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colName = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
         colName.HeaderText = "冬期施工措施";
         colName.Width      = 475;
         DataGridView.Columns.Add(colState);
         DataGridView.Columns.Add(colName);
     }
     else if (@class.GetType().Equals(new Framework.Model.InsertTextWinterMaintain().GetType()))
     {
         this.Text = "越冬工程的维护";
         System.Windows.Forms.DataGridViewCheckBoxColumn colState = new System.Windows.Forms.DataGridViewCheckBoxColumn(true);
         colState.ThreeState = false;
         colState.Width      = 30;
         DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colName = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
         colName.HeaderText = "越冬工程的维护";
         colName.Width      = 475;
         DataGridView.Columns.Add(colState);
         DataGridView.Columns.Add(colName);
     }
     else if (@class.GetType().Equals(new Framework.Model.InsertTextPileProject().GetType()))
     {
         this.Text = "常用桩基的施工方案";
         System.Windows.Forms.DataGridViewCheckBoxColumn colState = new System.Windows.Forms.DataGridViewCheckBoxColumn(true);
         colState.ThreeState = false;
         colState.Width      = 30;
         DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colName = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
         colName.HeaderText = "桩基施工方案";
         colName.Width      = 475;
         DataGridView.Columns.Add(colState);
         DataGridView.Columns.Add(colName);
     }
     else if (@class.GetType().Equals(new Framework.Model.InsertTextRoof().GetType()))
     {
         this.Text = "屋面及防水施工方案";
         System.Windows.Forms.DataGridViewCheckBoxColumn colState = new System.Windows.Forms.DataGridViewCheckBoxColumn(true);
         colState.ThreeState = false;
         colState.Width      = 30;
         DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colName = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
         colName.HeaderText = "屋面的做法";
         colName.Width      = 475;
         DataGridView.Columns.Add(colState);
         DataGridView.Columns.Add(colName);
     }
 }
 /// <summary> 
 /// 此為設計工具支援所需的方法 - 請勿使用程式碼編輯器修改這個方法的內容。
 ///
 /// </summary>
 private void InitializeComponent()
 {
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
     this.btnRemove = new DevComponents.DotNetBar.ButtonX();
     this.btnAdd = new DevComponents.DotNetBar.ButtonX();
     this.buttonItem1 = new DevComponents.DotNetBar.ButtonItem();
     this.label1 = new System.Windows.Forms.Label();
     this.label2 = new System.Windows.Forms.Label();
     this.dgvData = new DevComponents.DotNetBar.Controls.DataGridViewX();
     this.ClassName = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
     this.SNum = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
     this.StudentName = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
     this.Gender = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
     this.ReportGroup = new System.Windows.Forms.DataGridViewTextBoxColumn();
     this.IsCancel = new System.Windows.Forms.DataGridViewCheckBoxColumn();
     ((System.ComponentModel.ISupportInitialize)(this.dgvData)).BeginInit();
     this.SuspendLayout();
     //
     // btnRemove
     //
     this.btnRemove.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
     this.btnRemove.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
     this.btnRemove.Location = new System.Drawing.Point(20, 227);
     this.btnRemove.Name = "btnRemove";
     this.btnRemove.Size = new System.Drawing.Size(115, 23);
     this.btnRemove.TabIndex = 4;
     this.btnRemove.Text = "移除修課學生";
     this.btnRemove.Click += new System.EventHandler(this.btnRemove_Click);
     //
     // btnAdd
     //
     this.btnAdd.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
     this.btnAdd.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
     this.btnAdd.Location = new System.Drawing.Point(141, 227);
     this.btnAdd.Name = "btnAdd";
     this.btnAdd.Size = new System.Drawing.Size(132, 23);
     this.btnAdd.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
     this.buttonItem1});
     this.btnAdd.TabIndex = 6;
     this.btnAdd.Text = "加入待處理學生";
     this.btnAdd.PopupOpen += new System.EventHandler(this.btnAdd_PopupOpen);
     this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
     //
     // buttonItem1
     //
     this.buttonItem1.Name = "buttonItem1";
     this.buttonItem1.Text = "New Item";
     //
     // label1
     //
     this.label1.AutoSize = true;
     this.label1.Location = new System.Drawing.Point(304, 230);
     this.label1.Name = "label1";
     this.label1.Size = new System.Drawing.Size(99, 17);
     this.label1.TabIndex = 7;
     this.label1.Text = "目前修課人數:";
     //
     // label2
     //
     this.label2.AutoSize = true;
     this.label2.Location = new System.Drawing.Point(399, 230);
     this.label2.Name = "label2";
     this.label2.Size = new System.Drawing.Size(21, 17);
     this.label2.TabIndex = 8;
     this.label2.Text = " ";
     //
     // dgvData
     //
     this.dgvData.AllowUserToAddRows = false;
     this.dgvData.AllowUserToDeleteRows = false;
     this.dgvData.BackgroundColor = System.Drawing.Color.White;
     this.dgvData.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.dgvData.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
     this.dgvData.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
     this.ClassName,
     this.SNum,
     this.StudentName,
     this.Gender,
     this.ReportGroup,
     this.IsCancel});
     dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
     dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window;
     dataGridViewCellStyle1.Font = new System.Drawing.Font("微軟正黑體", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(136)));
     dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText;
     dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
     dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText;
     dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
     this.dgvData.DefaultCellStyle = dataGridViewCellStyle1;
     this.dgvData.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229)))));
     this.dgvData.Location = new System.Drawing.Point(20, 22);
     this.dgvData.Name = "dgvData";
     this.dgvData.RowHeadersWidth = 25;
     this.dgvData.RowTemplate.Height = 24;
     this.dgvData.Size = new System.Drawing.Size(508, 188);
     this.dgvData.TabIndex = 9;
     //
     // ClassName
     //
     this.ClassName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
     this.ClassName.HeaderText = "教學分班";
     this.ClassName.Name = "ClassName";
     this.ClassName.ReadOnly = true;
     this.ClassName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
     this.ClassName.TextAlignment = System.Drawing.StringAlignment.Center;
     this.ClassName.Width = 85;
     //
     // SNum
     //
     this.SNum.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
     this.SNum.HeaderText = "學號";
     this.SNum.Name = "SNum";
     this.SNum.ReadOnly = true;
     this.SNum.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
     this.SNum.TextAlignment = System.Drawing.StringAlignment.Center;
     this.SNum.Width = 59;
     //
     // StudentName
     //
     this.StudentName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
     this.StudentName.HeaderText = "學生姓名";
     this.StudentName.Name = "StudentName";
     this.StudentName.ReadOnly = true;
     this.StudentName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
     this.StudentName.TextAlignment = System.Drawing.StringAlignment.Center;
     this.StudentName.Width = 85;
     //
     // Gender
     //
     this.Gender.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
     this.Gender.HeaderText = "性別";
     this.Gender.Name = "Gender";
     this.Gender.ReadOnly = true;
     this.Gender.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
     this.Gender.TextAlignment = System.Drawing.StringAlignment.Center;
     this.Gender.Width = 59;
     //
     // ReportGroup
     //
     this.ReportGroup.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
     this.ReportGroup.HeaderText = "報告小組";
     this.ReportGroup.Name = "ReportGroup";
     this.ReportGroup.Resizable = System.Windows.Forms.DataGridViewTriState.True;
     this.ReportGroup.Width = 85;
     //
     // IsCancel
     //
     this.IsCancel.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
     this.IsCancel.HeaderText = "停修";
     this.IsCancel.Name = "IsCancel";
     this.IsCancel.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
     this.IsCancel.Width = 59;
     //
     // Course_SCAttend
     //
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
     this.BackColor = System.Drawing.Color.Transparent;
     this.Controls.Add(this.dgvData);
     this.Controls.Add(this.label2);
     this.Controls.Add(this.label1);
     this.Controls.Add(this.btnAdd);
     this.Controls.Add(this.btnRemove);
     this.Name = "Course_SCAttend";
     this.Size = new System.Drawing.Size(550, 260);
     ((System.ComponentModel.ISupportInitialize)(this.dgvData)).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
Ejemplo n.º 11
0
        private void FrmRecommend3_Load(object sender, EventArgs e)
        {
            #region //����������
            DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colParaType1 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
            colParaType1.HeaderText = "��������";
            colParaType1.Width = 180;
            DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colParaResult1 = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
            colParaResult1.HeaderText = "����ֵ";
            colParaResult1.Width = 100;
            DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colParaType2 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
            colParaType2.HeaderText = "��������";
            colParaType2.Width = 180;
            DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colParaResult2 = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
            colParaResult2.HeaderText = "����ֵ";
            colParaResult2.Width = 100;

            Dgv_Recommend3Para.Columns.Add(colParaType1);
            Dgv_Recommend3Para.Columns.Add(colParaResult1);
            Dgv_Recommend3Para.Columns.Add(colParaType2);
            Dgv_Recommend3Para.Columns.Add(colParaResult2);
            Dgv_Recommend3Para.Rows.Add(6);
            string[] strParaType1 = new string[] { "���ּܴ���߶�H(m)", "����������la(m)", "���˲���h(m)", "�����������˸�h1(m)", "�������뽨�������a(mm)", "��ǽ�����÷�ʽ"};
            string[] strParaResult1 = new string[] { "X", "X", "X", "X", "X", "��������/��������" };
            string[] strParaType2 = new string[] { "���ּ���������賤��L(m)", "���˺�����lb(m)", "���ּ��ܲ���n", "�ݺ���ɨ�ظ���ؾ���h2(mm)", "���ְ����跽ʽ",""};
            string[] strParaResult2 = new string[] { "X", "X", "X", "X", "X��1��", " " };

            for (int i = 0; i < strParaType1.Length; i++)
            {
                Dgv_Recommend3Para.Rows[i].Cells[0].Value = strParaType1[i];
                Dgv_Recommend3Para.Rows[i].Cells[1].Value = strParaResult1[i];
                Dgv_Recommend3Para.Rows[i].Cells[2].Value = strParaType2[i];
                Dgv_Recommend3Para.Rows[i].Cells[3].Value = strParaResult2[i];
            }
            #endregion

            #region //3���ʽ���ּܡ��Ͷ������ű�
            {
                DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colWorktypeChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                colWorktypeChoice.HeaderText = "ѡ����";
                colWorktypeChoice.Width = 100;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colWorktype = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colWorktype.HeaderText = "��������";
                colWorktype.Width = 180;
                DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn colWorkNumber = new DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn();
                colWorkNumber.HeaderText = "����";
                colWorkNumber.Width = 180;
                DevComponents.DotNetBar.Controls.DataGridViewCheckBoxXColumn colWorkDelete = new DevComponents.DotNetBar.Controls.DataGridViewCheckBoxXColumn();
                colWorkDelete.HeaderText = "ɾ����";
                colWorkDelete.Width = 60;
                Dgv_Recommend3Labor.Columns.Add(colWorktypeChoice);
                Dgv_Recommend3Labor.Columns.Add(colWorktype);
                Dgv_Recommend3Labor.Columns.Add(colWorkNumber);
                Dgv_Recommend3Labor.Columns.Add(colWorkDelete);
                Dgv_Recommend3Labor.Rows.Add();

                object[] strWork = new object[] { "��������", "��ȫ�ල", "�������", "��������", "���ӹ�" };
                for (int i = 0; i < strWork.Length; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text = (string)strWork[i];
                    btnItem.Click += new System.EventHandler(delegate(object sender1, System.EventArgs args)
                    {
                        int RowNum = Dgv_Recommend3Labor.CurrentRow.Index;
                        Dgv_Recommend3Labor.Rows[RowNum].Cells[1].Value = btnItem.Text;
                        Dgv_Recommend3Labor.Refresh();
                    });
                    colWorktypeChoice.SubItems.Add(btnItem);
                }
            }
            #endregion

            #region//3���ʽ���ּܡ����ϰ��ű�
            {
                DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colMaterialChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                colMaterialChoice.HeaderText = "ѡ�����";
                colMaterialChoice.Width = 60;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colMaterialName = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colMaterialName.HeaderText = "����";
                colMaterialName.Width = 80;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colMaterialType = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colMaterialType.HeaderText = "�ͺ�";
                colMaterialType.Width = 80;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colMaterialStandard= new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colMaterialStandard.HeaderText = "���(mm)";
                colMaterialStandard.Width = 110;
                DevComponents.DotNetBar.Controls.DataGridViewDoubleInputColumn  colMarketWeight= new DevComponents.DotNetBar.Controls.DataGridViewDoubleInputColumn();
                colMarketWeight.HeaderText = "�����(kg)";
                colMarketWeight.Width = 75;
                DevComponents.DotNetBar.Controls.DataGridViewDoubleInputColumn colDesignWeight = new DevComponents.DotNetBar.Controls.DataGridViewDoubleInputColumn();
                colDesignWeight.HeaderText = "�������(kg)";
                colDesignWeight.Width = 75;
                DevComponents.DotNetBar.Controls.DataGridViewCheckBoxXColumn colMaterialDelete = new DevComponents.DotNetBar.Controls.DataGridViewCheckBoxXColumn();
                colMaterialDelete.HeaderText = "ɾ����";
                colMaterialDelete.Width = 50;
                Dgv_Recommend3Material.Columns.Add(colMaterialChoice);
                Dgv_Recommend3Material.Columns.Add(colMaterialName);
                Dgv_Recommend3Material.Columns.Add(colMaterialType);
                Dgv_Recommend3Material.Columns.Add(colMaterialStandard);
                Dgv_Recommend3Material.Columns.Add(colMarketWeight);
                Dgv_Recommend3Material.Columns.Add(colDesignWeight);
                Dgv_Recommend3Material.Columns.Add(colMaterialDelete);
                Dgv_Recommend3Material.Rows.Add();
                object[,] material = new object[,]{
                    {"����",new string[]{"LG-120&��48��3.5��1200&7.41&7.05",  "LG-180&��48��3.5��1800&10.67&10.19&", "LG-240&��48��3.5��2400&14.02&13.34&", "LG-300&��48��3.5��3000&17.31&16.48&"}},
                    {"���",new string[]{"HG-30&��48��3.5��300&1.67&1.32", "HG-60&��48��3.5��600&2.82&2.47", "HG-90&��48��3.5��900&3.97&3.63", "HG-120&��48��3.5��1200&5.12&4.78", "HG-150&��48��3.5��1500&6.28&5.93", "HG-180&��48��3.5��180&7.43&7.08"}},
                    {"����",new string[]{"JHG-90&��48��3.5��900&5.28&4.37 ", "JHG-120	&��48��3.5��1200	&6.43&5.52","JHG-120+30&��48��3.5��(1200+300)&7.74	&6.85","JHG-120+60&��48��3.5��(1200+600)&9.69&8.16"}},
                    {"ר��б��",new string[]{"XG-0912&��48��3.5��150&7.11&6.33", "XG-1212&��48��3.5��170&7.87&7.03","XG-1218&��48��3.5��2160&9.66&8.66","XG-1518&��48��3.5��2340&10.34&9.30","XG-1818&��48��3.5��2550	&11.13&10.04"}},
                    {"ר��б��",new string[]{"ZXG-0912	&��48��3.5��1270&0&5.89 ", " ZXG-1212	&��48��3.5��1500&0&6.76"," ZXG-1218	&��48��3.5��1920&0&8.73"}},
                    {"ʮ�ֳ�",new string[]{"XZC-0912&��30��2.5��1390&0&4.72 ", " XZC-1212&��30��2.5��1560&0&5.31"," XZC-1218	&��30��2.5��2060&0&7"}},
                    {"խ����",new string[]{"TL-30	&���300	&1.68	&1.53 "}},
                    {"������",new string[]{" TL-60&���600	&9.30	&8.60" }},
                    {"����������",new string[]{"LLX	&��12	&0&0.18" }},
                    {"�ɵ�����",new string[]{"KTZ-45	&�ɵ���Χ��300	&0&5.82" , " KTZ-60&�ɵ���Χ��450&0&7.12" , "KTZ-75	&�ɵ���Χ��600	&0&8.5"}},
                    {"�ɵ�����",new string[]{"KTC-45	&�ɵ���Χ��300	&0&7.01" , "KTC-60&�ɵ���Χ��450&0&8.31" , "KTC-75	&�ɵ���Χ��600	&0&9.69" }},
                    {"���ְ�",new string[]{"JB-120&1200x270	&0&12.8" , "JB-150&1500x270	&0&15" , "JB-180&1800x270	&	0&17.9" }},
                    {"����",new string[]{"JT-255	&2546��530	&0&34.7"}},
                };
                for (int i = 0; i < 13; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text = (string)material[i, 0];
                    string[] types = (string[])material[i, 1];
                    for (int j = 0; j < types.Length; j++)
                    {
                        DevComponents.DotNetBar.ButtonItem btnChildItem = new DevComponents.DotNetBar.ButtonItem();
                        string[] info = types[j].ToString().Split('&');
                        btnChildItem.Text = info[0];
                        btnChildItem.Click += new System.EventHandler(delegate(object sender1, System.EventArgs args)
                        {
                            int RowNum = Dgv_Recommend3Material.CurrentRow.Index;
                            DevComponents.DotNetBar.ButtonItem item = sender1 as DevComponents.DotNetBar.ButtonItem;
                            Dgv_Recommend3Material.Rows[RowNum].Cells[1].Value = item.Parent.Text;
                            Dgv_Recommend3Material.Rows[RowNum].Cells[2].Value = info[0];
                            Dgv_Recommend3Material.Rows[RowNum].Cells[3].Value = info[1];
                            Dgv_Recommend3Material.Rows[RowNum].Cells[4].Value = info[2];
                            Dgv_Recommend3Material.Rows[RowNum].Cells[5].Value = info[3];
                            Dgv_Recommend3Material.Refresh();
                        });
                        btnItem.SubItems.Add(btnChildItem);
                    }
                    colMaterialChoice.SubItems.Add(btnItem);
                }
            }
            #endregion
        }
Ejemplo n.º 12
0
 public FrmClimateFeature(Framework.Entity.Chapter chapter, object type)
 {
     InitializeComponent();
     @class = type;
     System.Collections.ArrayList templateList = contentService.GetContentTemplateByTitle(chapter.Title);
     foreach (Framework.Entity.Template template in templateList)
     {
         Framework.Class.ComboItem item = new Framework.Class.ComboItem();
         item.Text = template.Title;
         item.Value = template;
         CbxType.Items.Add(item);
     }
     CbxType.SelectedIndex = 0;
     {
         DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
         colChoice.HeaderText = "ѡ�����";
         colChoice.Width = 50;
         DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colCity = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
         colCity.HeaderText = "����";
         colCity.Width = 120;
         DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colYearAvgTemp = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
         colYearAvgTemp.HeaderText = "��ƽ������";
         colYearAvgTemp.Width = 100;
         DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colColdestMonth = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
         colColdestMonth.HeaderText = "�����·�";
         colColdestMonth.Width = 100;
         DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colColdAvgTemp = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
         colColdAvgTemp.HeaderText = "����ƽ������";
         colColdAvgTemp.Width = 120;
         DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colHottestMonth = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
         colHottestMonth.HeaderText = "�����·�";
         colHottestMonth.Width = 100;
         DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colHotAvgTemp = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
         colHotAvgTemp.HeaderText = "����ƽ������";
         colHotAvgTemp.Width = 120;
         DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colAvgMonthPrecipitation = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
         colAvgMonthPrecipitation.HeaderText = "��ƽ����ˮ��";
         colAvgMonthPrecipitation.Width = 120;
         DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colSummerPrecipitationAccounts = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
         colSummerPrecipitationAccounts.HeaderText = "�ļ���ˮ��ռȫ�����";
         colSummerPrecipitationAccounts.Width = 100;
         DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colWinterConstruction = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
         colWinterConstruction.HeaderText = "����ʩ������";
         colWinterConstruction.Width = 100;
         DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colRainConstruction = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
         colRainConstruction.HeaderText = "����ʩ������";
         colRainConstruction.Width = 100;
         DataGridView1.Columns.Add(colChoice);
         DataGridView1.Columns.Add(colCity);
         DataGridView1.Columns.Add(colYearAvgTemp);
         DataGridView1.Columns.Add(colColdestMonth);
         DataGridView1.Columns.Add(colColdAvgTemp);
         DataGridView1.Columns.Add(colHottestMonth);
         DataGridView1.Columns.Add(colHotAvgTemp);
         DataGridView1.Columns.Add(colAvgMonthPrecipitation);
         DataGridView1.Columns.Add(colSummerPrecipitationAccounts);
         DataGridView1.Columns.Add(colWinterConstruction);
         DataGridView1.Columns.Add(colRainConstruction);
         DataGridView1.Rows.Add();
         object[] strCity = new object[] { "����", "���", "�Ϻ�", "����" };
         string[] strYearAvgTemp = new string[] { "1��", "2��", "3��", "4��" };
         string[] strColdestMonth = new string[] { "1��", "2��", "3��", "4��" };
         string[] strColdAvgTemp = new string[] { "1��", "2��", "3��", "4��" };
         string[] strHottestMonth = new string[] { "1��", "2��", "3��", "4��" };
         string[] strHotAvgTemp = new string[] { "1��", "2��", "3��", "4��" };
         string[] strAvgMonthPrecipitation = new string[] { "10ml", "20ml", "30ml", "40ml" };
         string[] strSummerPrecipitationAccounts = new string[] { "10%", "20%", "30%", "40%" };
         string[] strWinterConstruction = new string[] { "1��", "2��", "3��", "4��" };
         string[] strRainConstruction = new string[] { "1��", "2��", "3��", "4��" };
         for (int i = 0; i < strCity.Length; i++)
         {
             DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
             btnItem.Text = (string)strCity[i];
             btnItem.Click += new System.EventHandler(delegate(object sender, System.EventArgs args)
             {
                 DataGridView1.SelectedRows[0].Cells[1].Value = btnItem.Text;
                 for (int j = 0; j < strCity.Length; j++)
                 {
                     if (btnItem.Text == strCity[j].ToString())
                     {
                         DataGridView1.Rows[0].Cells[2].Value = strYearAvgTemp[j];
                         DataGridView1.Rows[0].Cells[3].Value = strColdestMonth[j];
                         DataGridView1.Rows[0].Cells[4].Value = strColdAvgTemp[j];
                         DataGridView1.Rows[0].Cells[5].Value = strHottestMonth[j];
                         DataGridView1.Rows[0].Cells[6].Value = strHotAvgTemp[j];
                         DataGridView1.Rows[0].Cells[7].Value = strAvgMonthPrecipitation[j];
                         DataGridView1.Rows[0].Cells[8].Value = strSummerPrecipitationAccounts[j];
                         DataGridView1.Rows[0].Cells[9].Value = strWinterConstruction[j];
                         DataGridView1.Rows[0].Cells[10].Value = strRainConstruction[j];
                         break;
                     }
                 }
                 DataGridView1.Refresh();
             });
             colChoice.SubItems.Add(btnItem);
         }
     }
 }
Ejemplo n.º 13
0
        private void FrmRecommend6_Load(object sender, EventArgs e)
        {
            #region //Һѹ����ʽ������ּܼ���ָ��
            DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colParaType1 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
            colParaType1.HeaderText = "����ָ��";
            colParaType1.Width = 180;
            DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colParaResult1 = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
            colParaResult1.HeaderText = "ָ��ֵ";
            colParaResult1.Width = 100;
            DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colParaType2 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
            colParaType2.HeaderText = "����ָ��";
            colParaType2.Width = 180;
            DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colParaResult2 = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
            colParaResult2.HeaderText = "ָ��ֵ";
            colParaResult2.Width = 100;

            Dgv_Recommend6Para.Columns.Add(colParaType1);
            Dgv_Recommend6Para.Columns.Add(colParaResult1);
            Dgv_Recommend6Para.Columns.Add(colParaType2);
            Dgv_Recommend6Para.Columns.Add(colParaResult2);
            Dgv_Recommend6Para.Rows.Add(9);
            string[] strParaType1 = new string[] { "����߶�", "�����ݾ�", "���������������", "��������߼����", "����ܼ���ǽ��", "����ͬ����", "��ǧ�ﶥ������", "ʹ�ù�����ƻ����", "�����ٶ�" };
            string[] strParaResult1 = new string[] { "Xm", "Xm", "Xm", "��Xm", "��X��", "��Xmm", "XKN", "XKN/m2", "XM/Сʱ"};
            string[] strParaType2 = new string[] { "������", "���岽��", "�����ֱ�߼����", "����ܼ����ӭ�����", "�õ��ܹ���", "��׹�����", "���������߶�", "����������ƻ����", ""};
            string[] strParaResult2 = new string[] { "Xm", "Xm", "��Xm", "��X�O", "XKW", "��Xcm", "Xm", "XKN/m2","" };

            for (int i = 0; i < strParaType1.Length; i++)
            {
                Dgv_Recommend6Para.Rows[i].Cells[0].Value = strParaType1[i];
                Dgv_Recommend6Para.Rows[i].Cells[1].Value = strParaResult1[i];
                Dgv_Recommend6Para.Rows[i].Cells[2].Value = strParaType2[i];
                Dgv_Recommend6Para.Rows[i].Cells[3].Value = strParaResult2[i];
            }
            #endregion

            #region //6Һѹ����ʽ������ּܡ����ϰ��ű�
            {
                DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colMaterialChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                colMaterialChoice.HeaderText = "ѡ�����";
                colMaterialChoice.Width = 60;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colMaterial = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colMaterial.HeaderText = "��������";
                colMaterial.Width = 140;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colMaterialNumber = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colMaterialNumber.HeaderText = "����";
                colMaterialNumber.Width = 120;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colMaterialStandard = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colMaterialStandard.HeaderText = "���";
                colMaterialStandard.Width = 150;
                DevComponents.DotNetBar.Controls.DataGridViewCheckBoxXColumn colMaterialDelete = new DevComponents.DotNetBar.Controls.DataGridViewCheckBoxXColumn();
                colMaterialDelete.HeaderText = "ɾ����";
                colMaterialDelete.Width = 50;
                Dgv_Recommend6Material.Columns.Add(colMaterialChoice);
                Dgv_Recommend6Material.Columns.Add(colMaterial);
                Dgv_Recommend6Material.Columns.Add(colMaterialNumber);
                Dgv_Recommend6Material.Columns.Add(colMaterialStandard);
                Dgv_Recommend6Material.Columns.Add(colMaterialDelete);
                Dgv_Recommend6Material.Rows.Add();

                object[] strMaterial = new object[] { "�޷�ֹ�", "ľ���ְ�", "��ѹ�ֽ��ְ�", "��Ƭ���ְ�", "��Ž��ְ�", "��Ŀ��ȫ��", "ˮƽ��ȫ��", "ֱ�ǿۼ�", "��ת�ۼ�", "�Խӿۼ�" };
                string[] strStandard = new string[] { "��48.3mm��3.6mm", "0.35 kN/m2", "0.30 kN/m2", "0.35 kN/m2", "0.10 kN/m2", "1.8m��6.0m", " ", " ", " ", " " };
                string[] strNumber = new string[] { "         m", "         m2", "           m2", "           m2", "      m2", "           m2", "           m2", "           ��", "           ��", "          ��" };
                for (int i = 0; i < strMaterial.Length; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text = (string)strMaterial[i];
                    btnItem.Click += new System.EventHandler(delegate(object sender1, System.EventArgs args)
                    {

                        int RowNum = Dgv_Recommend6Material.CurrentRow.Index;
                        Dgv_Recommend6Material.Rows[RowNum].Cells[1].Value = btnItem.Text;
                        for (int j = 0; j < strMaterial.Length; j++)
                        {
                            if (btnItem.Text == strMaterial[j].ToString())
                            {
                                Dgv_Recommend6Material.Rows[RowNum].Cells[2].Value = strNumber[j];
                                Dgv_Recommend6Material.Rows[RowNum].Cells[3].Value = strStandard[j];
                                break;
                            }
                        }
                        Dgv_Recommend6Material.Refresh();
                    });
                    colMaterialChoice.SubItems.Add(btnItem);
                }
            }
            #endregion

            #region //6Һѹ����ʽ������ּܡ���Ա���ű�
            {
                DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colWorktypeChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                colWorktypeChoice.HeaderText = "ѡ��ְ��";
                colWorktypeChoice.Width = 60;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colWorktype = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colWorktype.HeaderText = "ְ������";
                colWorktype.Width = 120;
                DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn colWorkNumber = new DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn();
                colWorkNumber.HeaderText = "����";
                colWorkNumber.Width = 80;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colWorkduty = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colWorkduty.HeaderText = "ְ��";
                colWorkduty.Width = 200;
                DevComponents.DotNetBar.Controls.DataGridViewCheckBoxXColumn colWorkDelete = new DevComponents.DotNetBar.Controls.DataGridViewCheckBoxXColumn();
                colWorkDelete.HeaderText = "ɾ����";
                colWorkDelete.Width = 60;
                Dgv_Recommend6Labor.Columns.Add(colWorktypeChoice);
                Dgv_Recommend6Labor.Columns.Add(colWorktype);
                Dgv_Recommend6Labor.Columns.Add(colWorkNumber);
                Dgv_Recommend6Labor.Columns.Add(colWorkduty);
                Dgv_Recommend6Labor.Columns.Add(colWorkDelete);
                Dgv_Recommend6Labor.Rows.Add();

                object[] strWork = new object[] { "������", "��Ŀ����", "��ȫԱ", "����Ա", "������", "����", "��е��" };
                object[] strDuty = new object[] { "���𵼹�ʽҺѹ�������ּ�ʩ����֯��Ƶı��ơ�Һѹ�������ּܹ�����Э��", "�������ϼ����ֵܵ�λ�йص�Э�������尲����������ȫ���", "�������İ�ȫ��顢ǩ֤", "������Ӧ���ϵ��ռ����ϱ�����", "����������֧��λ�ơ��ճ�����������", "�����ֳ����������Ҫ���ӵĹ�����", "�豸ά������������" };
                for (int i = 0; i < strWork.Length; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text = (string)strWork[i];
                    btnItem.Click += new System.EventHandler(delegate(object sender1, System.EventArgs args)
                    {
                        int RowNum = Dgv_Recommend6Labor.CurrentRow.Index;
                        Dgv_Recommend6Labor.Rows[RowNum].Cells[1].Value = btnItem.Text;
                        for (int j = 0; j < strWork.Length; j++)
                        {
                            if (btnItem.Text == strWork[j].ToString())
                            {
                                Dgv_Recommend6Labor.Rows[RowNum].Cells[3].Value = strDuty[j];
                                break;
                            }
                        }
                        Dgv_Recommend6Labor.Refresh();
                    });
                    colWorktypeChoice.SubItems.Add(btnItem);
                }
            }
            #endregion
        }
Ejemplo n.º 14
0
        public FrmConcreteProject(Framework.Entity.Chapter chapter, object type)
        {
            InitializeComponent();
            @class = type;
            System.Collections.ArrayList templateList = contentService.GetContentTemplateByTitle(chapter.Title);
            foreach (Framework.Entity.Template template in templateList)
            {
                Framework.Class.ComboItem item = new Framework.Class.ComboItem();
                item.Text = template.Title;
                item.Value = template;
                CbxType.Items.Add(item);
            }
            CbxType.SelectedIndex = 0;
            {
                #region /*�Ͷ���׼��*/
                DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                colChoice.HeaderText = "ѡ����";
                colChoice.Width = 100;
                DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colName = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
                colName.HeaderText = "��������";
                colName.Width = 100;
                DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn colNumber = new DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn();
                colNumber.HeaderText = "ÿ������";
                colNumber.Width = 100;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colRemarks = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colRemarks.HeaderText = "��ע";
                colRemarks.Width = 309;
                object[,] machines = new object[,]{
                 {"���鳤" , "�н�ǿʩ����֯��������Ϥ������ʩ��������"},
                 {"����","���񵷾��飬��֤�ϸڡ�"},
                 {"Ĩ��","�������߹��������Ĩ�澭�飬��֤�ϸڡ�"},
                 {"�ӹ�","�нӹܾ��飬����������"},
                 {"�չ�","�ܹ��Կ࣬�����࣬����ָ��"}
                 };
                for (int i = 0; i < 5; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text = (string)machines[i, 0];

                    btnItem.Click += new System.EventHandler(delegate(object sender, System.EventArgs args)
                    {
                        DataGridView1.SelectedRows[0].Cells[1].Value = btnItem.Text;
                        switch (btnItem.Text)
                        {
                            case "���鳤": DataGridView1.SelectedRows[0].Cells[3].Value = (string)machines[0, 1]; break;
                            case "����": DataGridView1.SelectedRows[0].Cells[3].Value = (string)machines[1, 1]; break;
                            case "Ĩ��": DataGridView1.SelectedRows[0].Cells[3].Value = (string)machines[2, 1]; break;
                            case "�ӹ�": DataGridView1.SelectedRows[0].Cells[3].Value = (string)machines[3, 1]; break;
                            case "�չ�": DataGridView1.SelectedRows[0].Cells[3].Value = (string)machines[4, 1]; break;
                        }
                        DataGridView1.Refresh();
                    });
                    colChoice.SubItems.Add(btnItem);
                }
                DataGridView1.Columns.Add(colChoice);
                DataGridView1.Columns.Add(colName);
                DataGridView1.Columns.Add(colNumber);
                DataGridView1.Columns.Add(colRemarks);
                #endregion
            }

            {
                #region/*����׼�� */
                DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                colChoice.HeaderText = "ѡ���е";
                colChoice.Width = 100;
                DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colName = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
                colName.HeaderText = "�����";
                colName.Width = 100;
                DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn colNumber = new DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn();
                colNumber.HeaderText = "����";
                colNumber.Width = 100;
                DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn colPower = new DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn();
                colPower.HeaderText = "���ʣ�KW��";
                colPower.Width = 100;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colRemarks = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colRemarks.HeaderText = "��ע";
                colRemarks.Width = 209;
                object[] machines2 = new object[]{
                "�������ó�","�������񶯰�","BL12���ϸ�","���ӳ�","ľĨ","��Ĩ�θ�","����","�־��","��ˢ"
                 };
                for (int i = 0; i < 9; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text = (string)machines2[i];
                    btnItem.Click += new System.EventHandler(delegate(object sender, System.EventArgs args)
                    {
                        DataGridView2.SelectedRows[0].Cells[1].Value = btnItem.Text;
                        DataGridView2.Refresh();
                    });
                    colChoice.SubItems.Add(btnItem);
                }
                DataGridView2.Columns.Add(colChoice);
                DataGridView2.Columns.Add(colName);
                DataGridView2.Columns.Add(colNumber);
                DataGridView2.Columns.Add(colPower);
                DataGridView2.Columns.Add(colRemarks);
                #endregion
            }

            {
                #region/*������ԭ����Ҫ�� */
                DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                colChoice.HeaderText = "ѡ��ԭ����";
                colChoice.Width = 100;
                DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colName = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
                colName.HeaderText = "ԭ��������";
                colName.Width = 100;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colRemarks = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colRemarks.HeaderText = "��ע";
                colRemarks.Width = 409;
                object[,] machines3 = new object[,]{
                 {"ɰ" , "ѡ���д�ɰ��ƽ������������0.5mm����������1%����ɰ�ӵĺ�ʯ������ˮ���������������ҽ���վ�����ֳ�ȡ��ʵ�⣬��֤�������ϸ���ʩ����ϱ�ʩ����"},
                 {"ʯ��","ѡ����ʯ��Ҫ��������1%����麬����0.5%��ѹ��ָ��ֵ��10�����������ܾ�֮����1��3��1��4֮�䡣"},
                 {"ˮ��","������ͨ������ˮ�࣬ˮ�����������ȡ�����ԣ������Ժϸ�󷽿�ʹ�á�"},
                 {"���ͼ�","�������ͼ�Ӧ���г����ϸ�֤����Ʒ�������ϣ���������Ӧ���ұ�׼��Ҫ�󣬳�����Ч�ڻ��ܳ��ı��ͼ�����ʹ�á�"},
                 {"��ú��","ѡ�â򼶸��Żң��������ϱ�����߳����ϸ�֤"},
                 {"���ͼ�","ѡ��MEA��ʹ���������Բ������������ٻ�����������Ӧ����ǿ�ŵķ�ˮ�������������ϱ�����߳����ϸ�֤����������֤��"},
                 {"ˮ","������ˮ�����ྻ����ˮ"}
                 };
                for (int i = 0; i < 7; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text = (string)machines3[i, 0];
                    btnItem.Click += new System.EventHandler(delegate(object sender, System.EventArgs args)
                    {
                        DataGridView3.SelectedRows[0].Cells[1].Value = btnItem.Text;
                        switch (btnItem.Text)
                        {
                            case "ɰ": DataGridView3.SelectedRows[0].Cells[2].Value = (string)machines3[0, 1]; break;
                            case "ʯ��": DataGridView3.SelectedRows[0].Cells[2].Value = (string)machines3[1, 1]; break;
                            case "ˮ��": DataGridView3.SelectedRows[0].Cells[2].Value = (string)machines3[2, 1]; break;
                            case "���ͼ�": DataGridView3.SelectedRows[0].Cells[2].Value = (string)machines3[3, 1]; break;
                            case "��ú��": DataGridView3.SelectedRows[0].Cells[2].Value = (string)machines3[4, 1]; break;
                            case "���ͼ�": DataGridView3.SelectedRows[0].Cells[2].Value = (string)machines3[5, 1]; break;
                            case "ˮ": DataGridView3.SelectedRows[0].Cells[2].Value = (string)machines3[6, 1]; break;
                        }
                        DataGridView3.Refresh();
                    });
                    colChoice.SubItems.Add(btnItem);
                }
                DataGridView3.Columns.Add(colChoice);
                DataGridView3.Columns.Add(colName);
                DataGridView3.Columns.Add(colRemarks);
                #endregion
            }
        }
Ejemplo n.º 15
0
 public FrmClimateFeature(Framework.Entity.Chapter chapter, object type)
 {
     InitializeComponent();
     @class = type;
     System.Collections.ArrayList templateList = contentService.GetContentTemplateByTitle(chapter.Title);
     foreach (Framework.Entity.Template template in templateList)
     {
         Framework.Class.ComboItem item = new Framework.Class.ComboItem();
         item.Text  = template.Title;
         item.Value = template;
         CbxType.Items.Add(item);
     }
     CbxType.SelectedIndex = 0;
     {
         DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
         colChoice.HeaderText = "选择城市";
         colChoice.Width      = 50;
         DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colCity = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
         colCity.HeaderText = "城市";
         colCity.Width      = 120;
         DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colYearAvgTemp = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
         colYearAvgTemp.HeaderText = "年平均气温";
         colYearAvgTemp.Width      = 100;
         DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colColdestMonth = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
         colColdestMonth.HeaderText = "最冷月份";
         colColdestMonth.Width      = 100;
         DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colColdAvgTemp = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
         colColdAvgTemp.HeaderText = "冷月平均气温";
         colColdAvgTemp.Width      = 120;
         DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colHottestMonth = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
         colHottestMonth.HeaderText = "最热月份";
         colHottestMonth.Width      = 100;
         DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colHotAvgTemp = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
         colHotAvgTemp.HeaderText = "热月平均气温";
         colHotAvgTemp.Width      = 120;
         DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colAvgMonthPrecipitation = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
         colAvgMonthPrecipitation.HeaderText = "月平均降水量";
         colAvgMonthPrecipitation.Width      = 120;
         DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colSummerPrecipitationAccounts = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
         colSummerPrecipitationAccounts.HeaderText = "夏季降水量占全年比例";
         colSummerPrecipitationAccounts.Width      = 100;
         DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colWinterConstruction = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
         colWinterConstruction.HeaderText = "冬期施工日期";
         colWinterConstruction.Width      = 100;
         DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colRainConstruction = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
         colRainConstruction.HeaderText = "雨期施工日期";
         colRainConstruction.Width      = 100;
         DataGridView1.Columns.Add(colChoice);
         DataGridView1.Columns.Add(colCity);
         DataGridView1.Columns.Add(colYearAvgTemp);
         DataGridView1.Columns.Add(colColdestMonth);
         DataGridView1.Columns.Add(colColdAvgTemp);
         DataGridView1.Columns.Add(colHottestMonth);
         DataGridView1.Columns.Add(colHotAvgTemp);
         DataGridView1.Columns.Add(colAvgMonthPrecipitation);
         DataGridView1.Columns.Add(colSummerPrecipitationAccounts);
         DataGridView1.Columns.Add(colWinterConstruction);
         DataGridView1.Columns.Add(colRainConstruction);
         DataGridView1.Rows.Add();
         object[] strCity                        = new object[] { "北京", "天津", "上海", "广州" };
         string[] strYearAvgTemp                 = new string[] { "1℃", "2℃", "3℃", "4℃" };
         string[] strColdestMonth                = new string[] { "1月", "2月", "3月", "4月" };
         string[] strColdAvgTemp                 = new string[] { "1℃", "2℃", "3℃", "4℃" };
         string[] strHottestMonth                = new string[] { "1月", "2月", "3月", "4月" };
         string[] strHotAvgTemp                  = new string[] { "1℃", "2℃", "3℃", "4℃" };
         string[] strAvgMonthPrecipitation       = new string[] { "10ml", "20ml", "30ml", "40ml" };
         string[] strSummerPrecipitationAccounts = new string[] { "10%", "20%", "30%", "40%" };
         string[] strWinterConstruction          = new string[] { "1月", "2月", "3月", "4月" };
         string[] strRainConstruction            = new string[] { "1月", "2月", "3月", "4月" };
         for (int i = 0; i < strCity.Length; i++)
         {
             DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
             btnItem.Text   = (string)strCity[i];
             btnItem.Click += new System.EventHandler(delegate(object sender, System.EventArgs args)
             {
                 DataGridView1.SelectedRows[0].Cells[1].Value = btnItem.Text;
                 for (int j = 0; j < strCity.Length; j++)
                 {
                     if (btnItem.Text == strCity[j].ToString())
                     {
                         DataGridView1.Rows[0].Cells[2].Value  = strYearAvgTemp[j];
                         DataGridView1.Rows[0].Cells[3].Value  = strColdestMonth[j];
                         DataGridView1.Rows[0].Cells[4].Value  = strColdAvgTemp[j];
                         DataGridView1.Rows[0].Cells[5].Value  = strHottestMonth[j];
                         DataGridView1.Rows[0].Cells[6].Value  = strHotAvgTemp[j];
                         DataGridView1.Rows[0].Cells[7].Value  = strAvgMonthPrecipitation[j];
                         DataGridView1.Rows[0].Cells[8].Value  = strSummerPrecipitationAccounts[j];
                         DataGridView1.Rows[0].Cells[9].Value  = strWinterConstruction[j];
                         DataGridView1.Rows[0].Cells[10].Value = strRainConstruction[j];
                         break;
                     }
                 }
                 DataGridView1.Refresh();
             });
             colChoice.SubItems.Add(btnItem);
         }
     }
 }
Ejemplo n.º 16
0
        public FrmArrayList(Framework.Entity.Chapter chapter, object type)
        {
            InitializeComponent();
            @class = type;
            System.Collections.ArrayList templateList = contentService.GetContentTemplateByTitle(chapter.Title);
            foreach (Framework.Entity.Template template in templateList)
            {
                Framework.Class.ComboItem item = new Framework.Class.ComboItem();
                item.Text = template.Title;
                item.Value = template;
                CbxType.Items.Add(item);
            }
            CbxType.SelectedIndex = 0;
            if (@class.GetType().Equals(new Framework.Model.PlanLabor().GetType()))
            {
                System.Windows.Forms.DataGridViewCheckBoxColumn colState = new System.Windows.Forms.DataGridViewCheckBoxColumn(true);
                colState.ThreeState = false;
                colState.Width = 30;
                DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colType = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
                colType.HeaderText = "工种";
                colType.Width = 80;
                DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn colBase = new DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn();
                colBase.HeaderText = "基础施工阶段";
                colBase.Width = 100;
                DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn colMain = new DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn();
                colMain.HeaderText = "主体施工阶段";
                colMain.Width = 100;
                DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn colFitup = new DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn();
                colFitup.HeaderText = "基础施工阶段";
                colFitup.Width = 100;
                DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn colLast = new DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn();
                colLast.HeaderText = "收尾阶段";
                colLast.Width = 100;
                DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn colPrepare = new DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn();
                colPrepare.HeaderText = "准备阶段";
                colPrepare.Width = 100;
                DataGridView.Columns.Add(colState);
                DataGridView.Columns.Add(colType);
                DataGridView.Columns.Add(colBase);
                DataGridView.Columns.Add(colMain);
                DataGridView.Columns.Add(colFitup);
                DataGridView.Columns.Add(colLast);
                DataGridView.Columns.Add(colPrepare);
            }
            else if (@class.GetType().Equals(new Framework.Model.PlanMachine().GetType()))
            {
                DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                colChoice.HeaderText = "选择设备";
                colChoice.Width = 70;
                DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colName = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
                colName.HeaderText = "设备名称";
                colName.Width = 180;
                DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colType = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
                colType.HeaderText = "设备型号";
                colType.Width = 180;
                DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colFunction = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
                colFunction.HeaderText = "性能";
                colFunction.Width = 180;
                object[,] machines = new object[,]{
                    {"塔吊",new string[]{"QTZ31.5&315-KN·m","QTZ40&400KN·m","QTZ50&500KN·m","QTZ63&630KN·m"}},
                    {"施工电梯",new string[]{"SCD200/200&100m/200m"}},
                    {"砼搅拌机",new string[]{"JDC350&350L/560L","JS500&500L/800L","JS75&750L/1200L"}},
                    {"挖掘机(反铲)",new string[]{"Atlas3306LC&31500&1.90","Atlas2606LC&25000&1.50","Atlas2006LC&18000&1.00","Atlas2306LC&22000&1.20","BonnyCE400-6&40000&2.00","BonnyCE650-6&66000&4.00"}}
                };
                for (int i = 0; i < 4; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text = (string)machines[i, 0];
                    string[] types = (string[])machines[i, 1];
                    for (int j = 0; j < types.Length; j++)
                    {
                        DevComponents.DotNetBar.ButtonItem btnChildItem = new DevComponents.DotNetBar.ButtonItem();
                        string[] info = types[j].ToString().Split('&');
                        btnChildItem.Text = info[0];
                        btnChildItem.Click += new System.EventHandler(delegate(object sender, System.EventArgs args)
                        {
                            DevComponents.DotNetBar.ButtonItem item = sender as DevComponents.DotNetBar.ButtonItem;
                            DataGridView.SelectedRows[0].Cells[1].Value = item.Parent.Text;
                            DataGridView.SelectedRows[0].Cells[2].Value = info[0];
                            DataGridView.SelectedRows[0].Cells[3].Value = info[1];
                            DataGridView.Refresh();
                        });
                        btnItem.SubItems.Add(btnChildItem);
                    }
                    colChoice.SubItems.Add(btnItem);
                }
                DataGridView.Columns.Add(colChoice);
                DataGridView.Columns.Add(colName);
                DataGridView.Columns.Add(colType);
                DataGridView.Columns.Add(colFunction);
            }
            else if (@class.GetType().Equals(new Framework.Model.PlanMaterial().GetType()))
            {
                // DevComponents.DotNetBar.Controls.DataGridViewComboBoxExColumn colName = new DevComponents.DotNetBar.Controls.DataGridViewComboBoxExColumn();
                System.Windows.Forms.DataGridViewComboBoxColumn colName = new System.Windows.Forms.DataGridViewComboBoxColumn();
                colName.HeaderText = "材料名称";
                colName.Width = 120;
                DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn colNumber = new DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn();
                colNumber.HeaderText = "进场数量";
                colNumber.Width = 100;
                DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colUnit = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
                colUnit.HeaderText = "单位";
                colUnit.Width = 80;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colPlan = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colPlan.HeaderText = "进场计划";
                colPlan.Width = 160;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colRemarks = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colRemarks.HeaderText = "备注";
                colRemarks.Width = 150;
                DataGridView.Columns.Add(colName);
                DataGridView.Columns.Add(colNumber);
                DataGridView.Columns.Add(colUnit);
                DataGridView.Columns.Add(colPlan);
                DataGridView.Columns.Add(colRemarks);
            }
            else if (@class.GetType().Equals(new Framework.Model.ManageMember().GetType()))
            {
                System.Windows.Forms.DataGridViewCheckBoxColumn colState = new System.Windows.Forms.DataGridViewCheckBoxColumn(true);
                colState.ThreeState = false;
                colState.Width = 30;
                System.Windows.Forms.DataGridViewTextBoxColumn colName = new System.Windows.Forms.DataGridViewTextBoxColumn();
                colName.HeaderText = "姓名";
                colName.Width = 100;
                DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colWork = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
                colWork.HeaderText = "职务";
                colWork.Width = 120;
                System.Windows.Forms.DataGridViewComboBoxColumn colTitle = new System.Windows.Forms.DataGridViewComboBoxColumn();
                colTitle.HeaderText = "职称";
                colTitle.Width = 120;
                colTitle.Items.Add("高级工程师");
                colTitle.Items.Add("工程师");
                colTitle.Items.Add("助理工程师");
                colTitle.Items.Add("经济师");
                colTitle.Items.Add("会计师");
                System.Windows.Forms.DataGridViewTextBoxColumn colDuty = new System.Windows.Forms.DataGridViewTextBoxColumn();
                colDuty.HeaderText = "工作责任";
                colDuty.Width = 120;
                System.Windows.Forms.DataGridViewTextBoxColumn colRemarks = new System.Windows.Forms.DataGridViewTextBoxColumn();
                colRemarks.HeaderText = "备注";
                colRemarks.Width = 120;
                DataGridView.Columns.Add(colState);
                DataGridView.Columns.Add(colName);
                DataGridView.Columns.Add(colWork);
                DataGridView.Columns.Add(colTitle);
                DataGridView.Columns.Add(colDuty);
                DataGridView.Columns.Add(colRemarks);
            }
            else if (@class.GetType().Equals(new Framework.Model.PrepareMaterial().GetType()))
            {
                DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                colChoice.HeaderText = "选择材料";
                colChoice.Width = 150;
                DevComponents.DotNetBar.Controls.DataGridViewMaskedTextBoxAdvColumn colName = new DevComponents.DotNetBar.Controls.DataGridViewMaskedTextBoxAdvColumn();
                colName.HeaderText = "材料名称";
                colName.Width = 460;
                object[] machines = new object[]{
                 "发泡陶瓷保温板" ,
                 "复合水泥发泡保温板",
                 "加气混凝土板",
                 "岩棉板(条)",
                 "蓝海板",
                 "其它"};
                for (int i = 0; i < 6; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text = (string)machines[i];
                    btnItem.Click += new System.EventHandler(delegate(object sender, System.EventArgs args)
                    {
                        DataGridView.SelectedRows[0].Cells[1].Value = btnItem.Text;
                        DataGridView.Refresh();
                    });
                    colChoice.SubItems.Add(btnItem);
                }
                DataGridView.Columns.Add(colChoice);
                DataGridView.Columns.Add(colName);
            }
            else if (@class.GetType().Equals(new Framework.Model.PrepareMachineTool().GetType()))
            {
                DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                colChoice.HeaderText = "选择机具";
                colChoice.Width = 150;
                DevComponents.DotNetBar.Controls.DataGridViewMaskedTextBoxAdvColumn colName = new DevComponents.DotNetBar.Controls.DataGridViewMaskedTextBoxAdvColumn();
                colName.HeaderText = "机具名称";
                colName.Width = 460;

                object[] machines = new object[]{
                "抹子","砂纸","2m靠尺","弹线墨盒","多用刀","铲刀","阴阳角抿子","电动搅拌机","角磨机","其它"};
                for (int i = 0; i < 10; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text = (string)machines[i];
                    btnItem.Click += new System.EventHandler(delegate(object sender, System.EventArgs args)
                    {
                        DataGridView.SelectedRows[0].Cells[1].Value = btnItem.Text;
                        DataGridView.Refresh();
                    });
                    colChoice.SubItems.Add(btnItem);
                }
                DataGridView.Columns.Add(colChoice);
                DataGridView.Columns.Add(colName);
            }
            else if (@class.GetType().Equals(new Framework.Model.PrepareMaterial().GetType()))
            {
                DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                colChoice.HeaderText = "选择屋面做法";
                colChoice.Width = 150;
                DevComponents.DotNetBar.Controls.DataGridViewMaskedTextBoxAdvColumn colName = new DevComponents.DotNetBar.Controls.DataGridViewMaskedTextBoxAdvColumn();
                colName.HeaderText = "屋面做法";
                colName.Width = 460;
                object[] machines = new object[]{
                 "发泡陶瓷保温板" ,
                 "复合水泥发泡保温板",
                 "加气混凝土板",
                 "岩棉板(条)",
                 "蓝海板",
                 "其它"};
                for (int i = 0; i < 6; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text = (string)machines[i];
                    btnItem.Click += new System.EventHandler(delegate(object sender, System.EventArgs args)
                    {
                        DataGridView.SelectedRows[0].Cells[1].Value = btnItem.Text;
                        DataGridView.Refresh();
                    });
                    colChoice.SubItems.Add(btnItem);
                }
                DataGridView.Columns.Add(colChoice);
                DataGridView.Columns.Add(colName);
            }
        }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
     this.nudSchoolYear = new System.Windows.Forms.NumericUpDown();
     this.lblSchoolYear = new DevComponents.DotNetBar.LabelX();
     this.btnPrint = new DevComponents.DotNetBar.ButtonX();
     this.grdSchool = new DevComponents.DotNetBar.Controls.DataGridViewX();
     this.colSchoolName = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
     ((System.ComponentModel.ISupportInitialize)(this.nudSchoolYear)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.grdSchool)).BeginInit();
     this.SuspendLayout();
     //
     // nudSchoolYear
     //
     this.nudSchoolYear.Location = new System.Drawing.Point(90, 12);
     this.nudSchoolYear.Maximum = new decimal(new int[] {
     999,
     0,
     0,
     0});
     this.nudSchoolYear.Name = "nudSchoolYear";
     this.nudSchoolYear.Size = new System.Drawing.Size(66, 25);
     this.nudSchoolYear.TabIndex = 38;
     this.nudSchoolYear.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
     //
     // lblSchoolYear
     //
     this.lblSchoolYear.AutoSize = true;
     this.lblSchoolYear.BackColor = System.Drawing.Color.Transparent;
     //
     //
     //
     this.lblSchoolYear.BackgroundStyle.Class = "";
     this.lblSchoolYear.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
     this.lblSchoolYear.Location = new System.Drawing.Point(13, 14);
     this.lblSchoolYear.Name = "lblSchoolYear";
     this.lblSchoolYear.Size = new System.Drawing.Size(74, 21);
     this.lblSchoolYear.TabIndex = 37;
     this.lblSchoolYear.Text = "填報學年度";
     //
     // btnPrint
     //
     this.btnPrint.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
     this.btnPrint.AutoExpandOnClick = true;
     this.btnPrint.BackColor = System.Drawing.Color.Transparent;
     this.btnPrint.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
     this.btnPrint.Location = new System.Drawing.Point(173, 12);
     this.btnPrint.Name = "btnPrint";
     this.btnPrint.Size = new System.Drawing.Size(80, 25);
     this.btnPrint.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
     this.btnPrint.TabIndex = 83;
     this.btnPrint.Text = "檢  查";
     this.btnPrint.Click += new System.EventHandler(this.btnPrint_Click);
     //
     // grdSchool
     //
     this.grdSchool.AllowUserToAddRows = false;
     this.grdSchool.AllowUserToDeleteRows = false;
     this.grdSchool.AllowUserToResizeColumns = false;
     this.grdSchool.AllowUserToResizeRows = false;
     this.grdSchool.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     | System.Windows.Forms.AnchorStyles.Left)
     | System.Windows.Forms.AnchorStyles.Right)));
     this.grdSchool.BackgroundColor = System.Drawing.Color.White;
     dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
     dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
     dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft JhengHei", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(136)));
     dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
     dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
     dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
     dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
     this.grdSchool.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
     this.grdSchool.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
     this.grdSchool.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
     this.colSchoolName});
     dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
     dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
     dataGridViewCellStyle2.Font = new System.Drawing.Font("Microsoft JhengHei", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(136)));
     dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText;
     dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
     dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.ControlText;
     dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
     this.grdSchool.DefaultCellStyle = dataGridViewCellStyle2;
     this.grdSchool.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229)))));
     this.grdSchool.Location = new System.Drawing.Point(12, 54);
     this.grdSchool.Name = "grdSchool";
     this.grdSchool.ReadOnly = true;
     this.grdSchool.RowHeadersVisible = false;
     this.grdSchool.RowTemplate.Height = 24;
     this.grdSchool.Size = new System.Drawing.Size(250, 337);
     this.grdSchool.TabIndex = 85;
     //
     // colSchoolName
     //
     this.colSchoolName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
     this.colSchoolName.HeaderText = "學校名稱";
     this.colSchoolName.Name = "colSchoolName";
     this.colSchoolName.ReadOnly = true;
     this.colSchoolName.TextAlignment = System.Drawing.StringAlignment.Center;
     //
     // UnApproach_Check
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 17F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize = new System.Drawing.Size(277, 403);
     this.Controls.Add(this.grdSchool);
     this.Controls.Add(this.btnPrint);
     this.Controls.Add(this.nudSchoolYear);
     this.Controls.Add(this.lblSchoolYear);
     this.MaximumSize = new System.Drawing.Size(285, 430);
     this.MinimumSize = new System.Drawing.Size(285, 430);
     this.Name = "UnApproach_Check";
     this.Text = "";
     this.TitleText = "未上傳國中檢查";
     ((System.ComponentModel.ISupportInitialize)(this.nudSchoolYear)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.grdSchool)).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
Ejemplo n.º 18
0
 public FrmInsertText(Framework.Entity.Chapter chapter, object type)
 {
     InitializeComponent();
     @class = type;
     templateList = contentService.GetContentTemplateByTitle(chapter.Title);
     foreach (Framework.Entity.Template template in templateList)
     {
         if (template.Title == "����ʩ����ʩ" | template.Title == "Խ�����̵�ά��" | template.Title == "׮������" | template.Title == "���漰��ˮʩ������")
         {
             tempInsertText = template;
         }
     }
     if (@class.GetType().Equals(new Framework.Model.InsertTextWinterMeasure().GetType()))
     {
         this.Text = "����ʩ����ʩ";
         System.Windows.Forms.DataGridViewCheckBoxColumn colState = new System.Windows.Forms.DataGridViewCheckBoxColumn(true);
         colState.ThreeState = false;
         colState.Width = 30;
         DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colName = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
         colName.HeaderText = "����ʩ����ʩ";
         colName.Width = 475;
         DataGridView.Columns.Add(colState);
         DataGridView.Columns.Add(colName);
     }
     else if (@class.GetType().Equals(new Framework.Model.InsertTextWinterMaintain().GetType()))
     {
         this.Text = "Խ�����̵�ά��";
         System.Windows.Forms.DataGridViewCheckBoxColumn colState = new System.Windows.Forms.DataGridViewCheckBoxColumn(true);
         colState.ThreeState = false;
         colState.Width = 30;
         DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colName = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
         colName.HeaderText = "Խ�����̵�ά��";
         colName.Width = 475;
         DataGridView.Columns.Add(colState);
         DataGridView.Columns.Add(colName);
     }
     else if (@class.GetType().Equals(new Framework.Model.InsertTextPileProject().GetType()))
     {
         this.Text = "����׮����ʩ������";
         System.Windows.Forms.DataGridViewCheckBoxColumn colState = new System.Windows.Forms.DataGridViewCheckBoxColumn(true);
         colState.ThreeState = false;
         colState.Width = 30;
         DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colName = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
         colName.HeaderText = "׮��ʩ������";
         colName.Width = 475;
         DataGridView.Columns.Add(colState);
         DataGridView.Columns.Add(colName);
     }
     else if (@class.GetType().Equals(new Framework.Model.InsertTextRoof().GetType()))
     {
         this.Text = "���漰��ˮʩ������";
         System.Windows.Forms.DataGridViewCheckBoxColumn colState = new System.Windows.Forms.DataGridViewCheckBoxColumn(true);
         colState.ThreeState = false;
         colState.Width = 30;
         DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colName = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
         colName.HeaderText = "���������";
         colName.Width = 475;
         DataGridView.Columns.Add(colState);
         DataGridView.Columns.Add(colName);
     }
 }
Ejemplo n.º 19
0
        public FrmConstructPrepare(Framework.Entity.Chapter chapter, object type)
        {
            InitializeComponent();
            @class = type;
            templateList = contentService.GetContentTemplateByTitle(chapter.Title);
            foreach (Framework.Entity.Template template in templateList)
            {
                if (template.Title == "���ּܹ���")
                {
                    tempInsertText = template;
                }
            }

            {
                #region/*��е׼��*/
                object[,] machines = new object[,]{
                 {"���Ӱ���" , "���ӹ�����Ͳ��������"},
                 {"���ذ���","�����ӿۼ�š�������Ƿ�ﵽҪ��"},
                 {"����","��������ˮƽ������"},
                 };
                for (int i = 0; i < 3; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text = (string)machines[i, 0];

                    btnItem.Click += new System.EventHandler(delegate(object sender, System.EventArgs args)
                    {
                        DataGridView1.SelectedRows[0].Cells[1].Value = btnItem.Text;
                        switch (btnItem.Text)
                        {
                            case "���Ӱ���": DataGridView1.SelectedRows[0].Cells[3].Value = (string)machines[0, 1]; break;
                            case "���ذ���": DataGridView1.SelectedRows[0].Cells[3].Value = (string)machines[1, 1]; break;
                            case "����": DataGridView1.SelectedRows[0].Cells[3].Value = (string)machines[2, 1]; break;
                        }
                        DataGridView1.Refresh();
                    });
                    colChoice.SubItems.Add(btnItem);
                }
                #endregion
            }

            {
                #region /*����׼��*/
                DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                colChoice.HeaderText = "ѡ����ּ�";
                colChoice.Width = 100;
                DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colName = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
                colName.HeaderText = "���ּ�����";
                colName.Width = 150;
                DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colType = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
                colType.HeaderText = "�������";
                colType.Width = 100;
                DevComponents.DotNetBar.Controls.DataGridViewMaskedTextBoxAdvColumn colFunction = new DevComponents.DotNetBar.Controls.DataGridViewMaskedTextBoxAdvColumn();
                colFunction.HeaderText = "����˵��";
                colFunction.Width = 250;
                object[,] machines = new object[,]{
                    {"�ֹ���ؽ��ּ�_�ڽ��ּ�",new string[]{"�ֹ�&��48 �� 3.5","�ۼ�&����","��ǽ��&�������磬�ۼ�����","���ְ�&ľ���ְ�","��ȫ��&��Ŀ��ȫ��"}},
                    {"�ֹ���ؽ��ּ�_����ּ�",new string[]{"�ֹ�&��48 �� 3.5","�ۼ�&����","��ǽ��&�������磬�ۼ�����","���ְ�&ľ���ְ�","��ȫ��&��Ŀ��ȫ��"}},
                    {"�ֹ���ؽ��ּ�_����������",new string[]{"�ֹ�&��48 �� 3.5","�ۼ�&����","��ǽ��&�������磬�ۼ�����","���ְ�&ľ���ְ�","��ȫ��&��Ŀ��ȫ��"}},
                    {"���ʽ�ֹܽ��ּ�",new string[]{"�ֹ�&��48 �� 3.5","�ۼ�&����","��ǽ��&�������磬�ۼ�����","���ְ�&ľ���ְ�","��ȫ��&��Ŀ��ȫ��"}},
                    {"��ʽ�ֹܽ��ּ�",new string[]{"�ֹ�&��48 �� 3.5","�ۼ�&����","��ǽ��&�������磬�ۼ�����","���ְ�&ľ���ְ�","��ȫ��&��Ŀ��ȫ��"}},
                    {"��ʽ���ּ�",new string[]{"�ֹ�&��48 �� 3.5","�ۼ�&����","��ǽ��&�������磬�ۼ�����","���ְ�&ľ���ְ�","��ȫ��&��Ŀ��ȫ��"}},
                    {"�ۼ�ʽ�ֹܽ��ּ�",new string[]{"�ֹ�&��48 �� 3.5","�ۼ�&����","��ǽ��&�������磬�ۼ�����","���ְ�&ľ���ְ�","��ȫ��&��Ŀ��ȫ��"}},
                    {"��ǽ�������ּ�",new string[]{"�ֹ�&��48 �� 3.5","�ۼ�&����","��ǽ��&�������磬�ۼ�����","���ְ�&ľ���ְ�","��ȫ��&��Ŀ��ȫ��"}},
                    {"�����������ּ�",new string[]{"�ֹ�&��48 �� 3.5","�ۼ�&����","��ǽ��&�������磬�ۼ�����","���ְ�&ľ���ְ�","��ȫ��&��Ŀ��ȫ��"}},
                    {"������������ּ�",new string[]{"�ֹ�&��48 �� 3.5","�ۼ�&����","��ǽ��&�������磬�ۼ�����","���ְ�&ľ���ְ�","��ȫ��&��Ŀ��ȫ��"}},
                    {"�ֹܿۼ����ý��ּ�",new string[]{"�ֹ�&��48 �� 3.5","�ۼ�&����","��ǽ��&�������磬�ۼ�����","���ְ�&ľ���ְ�","��ȫ��&��Ŀ��ȫ��"}},
                };
                for (int i = 0; i < 11; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text = (string)machines[i, 0];
                    string[] types = (string[])machines[i, 1];
                    for (int j = 0; j < types.Length; j++)
                    {
                        DevComponents.DotNetBar.ButtonItem btnChildItem = new DevComponents.DotNetBar.ButtonItem();
                        string[] info = types[j].ToString().Split('&');
                        btnChildItem.Text = info[0];
                        btnChildItem.Click += new System.EventHandler(delegate(object sender, System.EventArgs args)
                        {
                            DevComponents.DotNetBar.ButtonItem item = sender as DevComponents.DotNetBar.ButtonItem;
                            DataGridView2.SelectedRows[0].Cells[1].Value = item.Parent.Text;
                            DataGridView2.SelectedRows[0].Cells[2].Value = info[0];
                            DataGridView2.SelectedRows[0].Cells[3].Value = info[1];
                            DataGridView2.Refresh();
                        });
                        btnItem.SubItems.Add(btnChildItem);
                    }
                    colChoice.SubItems.Add(btnItem);
                }
                DataGridView2.Columns.Add(colChoice);
                DataGridView2.Columns.Add(colName);
                DataGridView2.Columns.Add(colType);
                DataGridView2.Columns.Add(colFunction);
                #endregion
            }

            {
                #region /*�Ͷ�������*/
                DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                colChoice.HeaderText = "ѡ����";
                colChoice.Width = 100;
                DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colName = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
                colName.HeaderText = "��������";
                colName.Width = 250;
                DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn colNumber = new DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn();
                colNumber.HeaderText = "ÿ������";
                colNumber.Width = 250;
                object[] labor = new object[]{
                    "��������",
                    "��ȫ�ල",
                    "�������",
                    "��������",
                    "���ӹ�"
                 };
                for (int i = 0; i < 5; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text = (string)labor[i];

                    btnItem.Click += new System.EventHandler(delegate(object sender, System.EventArgs args)
                    {
                        DataGridView3.SelectedRows[0].Cells[1].Value = btnItem.Text;
                        DataGridView3.Refresh();
                    });
                    colChoice.SubItems.Add(btnItem);
                }
                DataGridView3.Columns.Add(colChoice);
                DataGridView3.Columns.Add(colName);
                DataGridView3.Columns.Add(colNumber);
                #endregion
            }

            {
                #region/*���ּ�ʩ������*/
                //DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                //colChoice.HeaderText = "ѡ����ּ�ʩ������";
                //colChoice.Width = 200;
                //DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colName = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
                //colName.HeaderText = "���ּ�ʩ������";
                //colName.Width = 400;
                //object[,] machines = new object[,]{
                // {"���ʽ�ֹܽ��ּ�",new string[] {"�ڽ��ּ�","����������","����ּ�"}},
                // {"����ˮ�෢�ݱ��°�",new string[]{}},
                // };
                //for (int i = 0; i < 2; i++)
                //{
                //    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                //    btnItem.Text = (string)machines[i, 0];
                //    string[] types = (string[])machines[0, 1];
                //    btnItem.Click += new System.EventHandler(delegate(object sender, System.EventArgs args)
                //    {
                //        if (int i = 0)
                //        {
                //            for (int j = 0; j < types.Length; j++)
                //            {
                //                DevComponents.DotNetBar.ButtonItem btnChildItem = new DevComponents.DotNetBar.ButtonItem();
                //                //btnChildItem.Text = types[j].ToString();
                //                //btnChildItem.Click += new System.EventHandler(delegate(object sender, System.EventArgs args)
                //                //{
                //                //    DevComponents.DotNetBar.ButtonItem item = sender as DevComponents.DotNetBar.ButtonItem;
                //                DataGridView2.SelectedRows[0].Cells[1].Value = types[j].ToString();
                //                    //DataGridView2.SelectedRows[0].Cells[2].Value = info[0];
                //                    //DataGridView2.SelectedRows[0].Cells[3].Value = info[1];
                //                    //DataGridView2.Refresh();
                //                //});
                //                btnItem.SubItems.Add(btnChildItem);
                //            }

                //        }
                //        else
                //        {
                //            DataGridView4.SelectedRows[0].Cells[1].Value = btnItem.Text;
                //            DataGridView4.Refresh();

                //        }
                //    });
                //    colChoice.SubItems.Add(btnItem);
                //}
                //DataGridView4.Columns.Add(colChoice);
                //DataGridView4.Columns.Add(colName);
                #endregion
            }
        }
Ejemplo n.º 20
0
        private void FrmRecommend6_Load(object sender, EventArgs e)
        {
            #region //液压升降式整体脚手架技术指标
            DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colParaType1 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
            colParaType1.HeaderText = "技术指标";
            colParaType1.Width      = 180;
            DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colParaResult1 = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
            colParaResult1.HeaderText = "指标值";
            colParaResult1.Width      = 100;
            DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn colParaType2 = new DevComponents.DotNetBar.Controls.DataGridViewLabelXColumn();
            colParaType2.HeaderText = "技术指标";
            colParaType2.Width      = 180;
            DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colParaResult2 = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
            colParaResult2.HeaderText = "指标值";
            colParaResult2.Width      = 100;

            Dgv_Recommend6Para.Columns.Add(colParaType1);
            Dgv_Recommend6Para.Columns.Add(colParaResult1);
            Dgv_Recommend6Para.Columns.Add(colParaType2);
            Dgv_Recommend6Para.Columns.Add(colParaResult2);
            Dgv_Recommend6Para.Rows.Add(9);
            string[] strParaType1   = new string[] { "架体高度", "立杆纵距", "架体允许悬挑长度", "主框架曲线间距离", "主框架间连墙点", "升降同步差", "单千斤顶提升力", "使用工况设计活荷载", "提升速度" };
            string[] strParaResult1 = new string[] { "Xm", "Xm", "Xm", "≤Xm", "≮X个", "≯Xmm", "XKN", "XKN/m2", "XM/小时" };
            string[] strParaType2   = new string[] { "架体宽度", "架体步距", "主框架直线间距离", "主框架间架体迎风面积", "用电总功率", "防坠落距离", "单层提升高度", "提升工况设计活荷载", "" };
            string[] strParaResult2 = new string[] { "Xm", "Xm", "≤Xm", "≯X㎡", "XKW", "≯Xcm", "Xm", "XKN/m2", "" };

            for (int i = 0; i < strParaType1.Length; i++)
            {
                Dgv_Recommend6Para.Rows[i].Cells[0].Value = strParaType1[i];
                Dgv_Recommend6Para.Rows[i].Cells[1].Value = strParaResult1[i];
                Dgv_Recommend6Para.Rows[i].Cells[2].Value = strParaType2[i];
                Dgv_Recommend6Para.Rows[i].Cells[3].Value = strParaResult2[i];
            }
            #endregion

            #region //6液压升降式整体脚手架—材料安排表
            {
                DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colMaterialChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                colMaterialChoice.HeaderText = "选择材料";
                colMaterialChoice.Width      = 60;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colMaterial = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colMaterial.HeaderText = "材料名称";
                colMaterial.Width      = 140;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colMaterialNumber = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colMaterialNumber.HeaderText = "数量";
                colMaterialNumber.Width      = 120;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colMaterialStandard = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colMaterialStandard.HeaderText = "规格";
                colMaterialStandard.Width      = 150;
                DevComponents.DotNetBar.Controls.DataGridViewCheckBoxXColumn colMaterialDelete = new DevComponents.DotNetBar.Controls.DataGridViewCheckBoxXColumn();
                colMaterialDelete.HeaderText = "删除行";
                colMaterialDelete.Width      = 50;
                Dgv_Recommend6Material.Columns.Add(colMaterialChoice);
                Dgv_Recommend6Material.Columns.Add(colMaterial);
                Dgv_Recommend6Material.Columns.Add(colMaterialNumber);
                Dgv_Recommend6Material.Columns.Add(colMaterialStandard);
                Dgv_Recommend6Material.Columns.Add(colMaterialDelete);
                Dgv_Recommend6Material.Rows.Add();

                object[] strMaterial = new object[] { "无缝钢管", "木脚手板", "冲压钢脚手板", "竹串片脚手板", "竹芭脚手板", "密目安全网", "水平安全网", "直角扣件", "旋转扣件", "对接扣件" };
                string[] strStandard = new string[] { "ф48.3mm×3.6mm", "0.35 kN/m2", "0.30 kN/m2", "0.35 kN/m2", "0.10 kN/m2", "1.8m×6.0m", " ", " ", " ", " " };
                string[] strNumber   = new string[] { "         m", "         m2", "           m2", "           m2", "      m2", "           m2", "           m2", "           个", "           个", "          个" };
                for (int i = 0; i < strMaterial.Length; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text   = (string)strMaterial[i];
                    btnItem.Click += new System.EventHandler(delegate(object sender1, System.EventArgs args)
                    {
                        int RowNum = Dgv_Recommend6Material.CurrentRow.Index;
                        Dgv_Recommend6Material.Rows[RowNum].Cells[1].Value = btnItem.Text;
                        for (int j = 0; j < strMaterial.Length; j++)
                        {
                            if (btnItem.Text == strMaterial[j].ToString())
                            {
                                Dgv_Recommend6Material.Rows[RowNum].Cells[2].Value = strNumber[j];
                                Dgv_Recommend6Material.Rows[RowNum].Cells[3].Value = strStandard[j];
                                break;
                            }
                        }
                        Dgv_Recommend6Material.Refresh();
                    });
                    colMaterialChoice.SubItems.Add(btnItem);
                }
            }
            #endregion

            #region //6液压升降式整体脚手架—人员安排表
            {
                DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn colWorktypeChoice = new DevComponents.DotNetBar.Controls.DataGridViewButtonXColumn();
                colWorktypeChoice.HeaderText = "选择职务";
                colWorktypeChoice.Width      = 60;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colWorktype = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colWorktype.HeaderText = "职务名称";
                colWorktype.Width      = 120;
                DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn colWorkNumber = new DevComponents.DotNetBar.Controls.DataGridViewIntegerInputColumn();
                colWorkNumber.HeaderText = "人数";
                colWorkNumber.Width      = 80;
                DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn colWorkduty = new DevComponents.DotNetBar.Controls.DataGridViewTextBoxDropDownColumn();
                colWorkduty.HeaderText = "职责";
                colWorkduty.Width      = 200;
                DevComponents.DotNetBar.Controls.DataGridViewCheckBoxXColumn colWorkDelete = new DevComponents.DotNetBar.Controls.DataGridViewCheckBoxXColumn();
                colWorkDelete.HeaderText = "删除行";
                colWorkDelete.Width      = 60;
                Dgv_Recommend6Labor.Columns.Add(colWorktypeChoice);
                Dgv_Recommend6Labor.Columns.Add(colWorktype);
                Dgv_Recommend6Labor.Columns.Add(colWorkNumber);
                Dgv_Recommend6Labor.Columns.Add(colWorkduty);
                Dgv_Recommend6Labor.Columns.Add(colWorkDelete);
                Dgv_Recommend6Labor.Rows.Add();

                object[] strWork = new object[] { "负责人", "项目经理", "安全员", "资料员", "操作工", "焊工", "机械工" };
                object[] strDuty = new object[] { "负责导轨式液压升降脚手架施工组织设计的编制、液压升降脚手架工程总协调", "负责与上级、兄弟单位有关的协调,架体安拆、升降、安全检查", "负责架体的安全检查、签证", "负责相应资料的收集和上报工作", "负责升降、支座位移、日常保养工作。", "负责现场特殊情况需要焊接的工作。", "设备维护保养工作。" };
                for (int i = 0; i < strWork.Length; i++)
                {
                    DevComponents.DotNetBar.ButtonItem btnItem = new DevComponents.DotNetBar.ButtonItem();
                    btnItem.Text   = (string)strWork[i];
                    btnItem.Click += new System.EventHandler(delegate(object sender1, System.EventArgs args)
                    {
                        int RowNum = Dgv_Recommend6Labor.CurrentRow.Index;
                        Dgv_Recommend6Labor.Rows[RowNum].Cells[1].Value = btnItem.Text;
                        for (int j = 0; j < strWork.Length; j++)
                        {
                            if (btnItem.Text == strWork[j].ToString())
                            {
                                Dgv_Recommend6Labor.Rows[RowNum].Cells[3].Value = strDuty[j];
                                break;
                            }
                        }
                        Dgv_Recommend6Labor.Refresh();
                    });
                    colWorktypeChoice.SubItems.Add(btnItem);
                }
            }
            #endregion
        }