Exemplo n.º 1
0
        private void searc()
        {
            //On Error Resume Next
            conn = new SqlConnection(ConnString);
            string Sql = "SELECT slno,jdid as 'Judgement ID',crid as 'Charge Sheet ID',firid as 'FIR No.',comid as 'Complaint ID',sname as 'Suspect Name',jdate as 'Date',courtname as 'Court Name',jdstatus as 'Status',pgiven as 'Punishment Given' from tbl_judgmentdetails where jdid like '%" + TextBox1.Text + "%' order by jdid";

            da2 = new SqlDataAdapter(Sql, conn);
            conn.Open();
            ds2 = new DataSet();
            SqlCommandBuilder commandBuilder1 = new SqlCommandBuilder(da2);

            da2.Fill(ds2, "Pub");
            dsource2.DataSource = ds2.Tables["Pub"];
            conn.Close();
            DataGridView3.DataSource = dsource2;
            DataGridView3.Refresh();
            DataGridView3.Columns[0].Visible = false;
            DataGridView3.Columns[1].Width   = 150;
            DataGridView3.Columns[2].Width   = 150;
            DataGridView3.Columns[3].Width   = 100;
            DataGridView3.Columns[4].Width   = 100;
            DataGridView3.Columns[5].Width   = 100;
            DataGridView3.Columns[6].Width   = 100;
            DataGridView3.Columns[7].Width   = 100;
            DataGridView3.Columns[8].Width   = 100;
            DataGridView3.Columns[9].Width   = 100;
        }
Exemplo n.º 2
0
        private void searc()
        {
            //On Error Resume Next
            conn = new SqlConnection(ConnString);
            string Sql = "SELECT slno,prid as 'Prisoner ID',ciid as 'Criminal ID',sname as 'Suspect Name',sgender as 'Gender',occupation as 'Occupation',pgiven as 'P Given',adate as 'Date',prno as 'Prisoner No.' from tbl_prisonerdetails where prid like '%" + TextBox1.Text + "%' order by prid";

            da2 = new SqlDataAdapter(Sql, conn);
            conn.Open();
            ds2 = new DataSet();
            SqlCommandBuilder commandBuilder1 = new SqlCommandBuilder(da2);

            da2.Fill(ds2, "Pub");
            dsource2.DataSource = ds2.Tables["Pub"];
            conn.Close();
            DataGridView3.DataSource = dsource2;
            DataGridView3.Refresh();
            DataGridView3.Columns[0].Visible = false;
            DataGridView3.Columns[1].Width   = 150;
            DataGridView3.Columns[2].Width   = 150;
            DataGridView3.Columns[3].Width   = 100;
            DataGridView3.Columns[4].Width   = 100;
            DataGridView3.Columns[5].Width   = 100;
            DataGridView3.Columns[6].Width   = 100;
            DataGridView3.Columns[7].Width   = 100;
            DataGridView3.Columns[8].Width   = 100;
        }
Exemplo n.º 3
0
        private void searc()
        {
            //On Error Resume Next
            conn = new SqlConnection(ConnString);
            string Sql = "SELECT slno,ciid as 'Criminal ID',jdid as 'Judgement ID',firid as 'FIR No.',comid as 'Complaint ID',sname as 'Suspect Name',sgender as 'Gender',saddress as 'Address',adate as 'Date',Occupation as 'Occupation' from tbl_criminaldetails where ciid like '%" + TextBox1.Text + "%' order by ciid";

            da2 = new SqlDataAdapter(Sql, conn);
            conn.Open();
            ds2 = new DataSet();
            SqlCommandBuilder commandBuilder1 = new SqlCommandBuilder(da2);

            da2.Fill(ds2, "Pub");
            dsource2.DataSource = ds2.Tables["Pub"];
            conn.Close();
            DataGridView3.DataSource = dsource2;
            DataGridView3.Refresh();
            DataGridView3.Columns[0].Visible = false;
            DataGridView3.Columns[1].Width   = 150;
            DataGridView3.Columns[2].Width   = 150;
            DataGridView3.Columns[3].Width   = 100;
            DataGridView3.Columns[4].Width   = 100;
            DataGridView3.Columns[5].Width   = 100;
            DataGridView3.Columns[6].Width   = 100;
            DataGridView3.Columns[7].Width   = 100;
            DataGridView3.Columns[8].Width   = 100;
            DataGridView3.Columns[9].Width   = 100;
        }
Exemplo n.º 4
0
        private void searc()
        {
            //On Error Resume Next
            conn = new SqlConnection(ConnString);
            string Sql = "SELECT slno,firid as 'FIR No.',comid as 'Complaint ID',comdate as 'Date',commatter as 'Matter',comtype as 'Type',cbyname as 'C BY Name',cbyage as 'C BY Age',cbygender as 'C BY Gender',cbypno as 'C BY Contact',cbyaddress as 'C BY Address',conname as 'C ON Name',conage as 'C ON Age',congender as 'C ON Gender',conpno as 'C ON Contact',conaddress as 'C ON Address',remarks from firdetails_view where firid like '%" + TextBox1.Text + "%' order by firid";

            da2 = new SqlDataAdapter(Sql, conn);
            conn.Open();
            ds2 = new DataSet();
            SqlCommandBuilder commandBuilder1 = new SqlCommandBuilder(da2);

            da2.Fill(ds2, "Pub");
            dsource2.DataSource = ds2.Tables["Pub"];
            conn.Close();
            DataGridView3.DataSource = dsource2;
            DataGridView3.Refresh();
            DataGridView3.Columns[0].Visible = false;
            DataGridView3.Columns[1].Width   = 150;
            DataGridView3.Columns[2].Width   = 150;
            DataGridView3.Columns[3].Width   = 100;
            DataGridView3.Columns[4].Width   = 100;
            DataGridView3.Columns[5].Width   = 100;
            DataGridView3.Columns[6].Width   = 100;
            DataGridView3.Columns[7].Width   = 100;
            DataGridView3.Columns[8].Width   = 100;
            DataGridView3.Columns[9].Width   = 100;
            DataGridView3.Columns[10].Width  = 100;
            DataGridView3.Columns[11].Width  = 100;
            DataGridView3.Columns[12].Width  = 100;
            DataGridView3.Columns[13].Width  = 100;
            DataGridView3.Columns[14].Width  = 100;
            DataGridView3.Columns[15].Width  = 100;
            DataGridView3.Columns[16].Width  = 100;
        }
Exemplo n.º 5
0
        private void searc()
        {
            //On Error Resume Next
            conn = new SqlConnection(ConnString);
            string Sql = "SELECT slno,ename as 'Empoyee Name',gender as 'Gender',pno as 'Phone No.',dob as 'DOB',doj as 'DOJ',address as 'Address',designation as 'Designation',salary as 'Salary' from tbl_employee where ename like '%" + TextBox1.Text + "%' order by ename";

            da2 = new SqlDataAdapter(Sql, conn);
            conn.Open();
            ds2 = new DataSet();
            SqlCommandBuilder commandBuilder1 = new SqlCommandBuilder(da2);

            da2.Fill(ds2, "Pub");
            dsource2.DataSource = ds2.Tables["Pub"];
            conn.Close();
            DataGridView3.DataSource = dsource2;
            DataGridView3.Refresh();
            DataGridView3.Columns[0].Visible = false;
            DataGridView3.Columns[1].Width   = 150;
            DataGridView3.Columns[2].Width   = 150;
            DataGridView3.Columns[3].Width   = 100;
            DataGridView3.Columns[4].Width   = 100;
            DataGridView3.Columns[5].Width   = 100;
            DataGridView3.Columns[6].Width   = 100;
            DataGridView3.Columns[7].Width   = 100;
            DataGridView3.Columns[8].Width   = 100;
        }
Exemplo n.º 6
0
        private void btnParseTextFiles_Click(object sender, EventArgs e)
        {
            using (TextFieldParser myReader = new TextFieldParser("test.txt"))
            {
                // 定义三种格式之各栏的宽度与分隔字符。
                int[]    FirstFormat  = { 5, 10, -1 };
                int[]    SecondFormat = { 6, 10, 17, -1 };
                string[] ThirdFormat  = { "," };
                this.DataGridView1.Rows.Clear();
                this.DataGridView2.Rows.Clear();
                this.DataGridView3.Rows.Clear();
                string[] CurrentRow;
                while (!myReader.EndOfData)
                {
                    try
                    {
                        string RowType = myReader.PeekChars(2);
                        switch (RowType)
                        {
                        case "CK":
                            myReader.TextFieldType = FieldType.FixedWidth;
                            myReader.FieldWidths   = FirstFormat;   // 或是 myReader.SetFieldWidths(FirstFormat);
                            CurrentRow             = myReader.ReadFields();
                            this.DataGridView1.Rows.Add(CurrentRow);
                            break;

                        case "PB":
                            myReader.TextFieldType = FieldType.FixedWidth;
                            myReader.FieldWidths   = SecondFormat;   // 或是 myReader.SetFieldWidths(SecondFormat);
                            CurrentRow             = myReader.ReadFields();
                            this.DataGridView2.Rows.Add(CurrentRow);
                            break;

                        case "SP":
                            myReader.TextFieldType = FieldType.Delimited;
                            myReader.Delimiters    = ThirdFormat;  // 或是 myReader.SetDelimiters(ThirdFormat);
                            CurrentRow             = myReader.ReadFields();
                            this.DataGridView3.Rows.Add(CurrentRow);
                            break;
                        }
                    }
                    catch (MalformedLineException ex)
                    {
                        MessageBox.Show("行 " + ex.Message + " 是无效的。略过。");
                    }
                }
                // 排序各个 DataGridView 控件的内容。
                DataGridView1.Sort(DataGridView1.Columns[0], System.ComponentModel.ListSortDirection.Ascending);
                DataGridView2.Sort(DataGridView2.Columns[0], System.ComponentModel.ListSortDirection.Ascending);
                DataGridView3.Sort(DataGridView3.Columns[0], System.ComponentModel.ListSortDirection.Ascending);
            }
        }
Exemplo n.º 7
0
        private void dytm()
        {
            //On Error Resume Next
            conn = new SqlConnection(ConnString);
            string Sql = "SELECT slno,usertype as 'User Type',username as 'User Name',password as 'Password' from tbl_user order by username";

            da2 = new SqlDataAdapter(Sql, conn);
            conn.Open();
            ds2 = new DataSet();
            SqlCommandBuilder commandBuilder1 = new SqlCommandBuilder(da2);

            da2.Fill(ds2, "Pub");
            dsource2.DataSource = ds2.Tables["Pub"];
            conn.Close();
            DataGridView3.DataSource = dsource2;
            DataGridView3.Refresh();
            DataGridView3.Columns[0].Visible = false;
            DataGridView3.Columns[1].Width   = 150;
            DataGridView3.Columns[2].Width   = 150;
            DataGridView3.Columns[3].Width   = 100;
        }
Exemplo n.º 8
0
        private void dytm()
        {
            //On Error Resume Next
            conn = new SqlConnection(ConnString);
            string Sql = "SELECT slno,crid as 'Charge Sheet ID',firid as 'FIR No.',comid as 'Complaint ID',sname as 'Suspect Name',crdate as 'Date',charges as 'Charges' from tbl_chargesheet order by crid";

            da2 = new SqlDataAdapter(Sql, conn);
            conn.Open();
            ds2 = new DataSet();
            SqlCommandBuilder commandBuilder1 = new SqlCommandBuilder(da2);

            da2.Fill(ds2, "Pub");
            dsource2.DataSource = ds2.Tables["Pub"];
            conn.Close();
            DataGridView3.DataSource = dsource2;
            DataGridView3.Refresh();
            DataGridView3.Columns[0].Visible = false;
            DataGridView3.Columns[1].Width   = 150;
            DataGridView3.Columns[2].Width   = 150;
            DataGridView3.Columns[3].Width   = 100;
            DataGridView3.Columns[4].Width   = 100;
            DataGridView3.Columns[5].Width   = 100;
            DataGridView3.Columns[6].Width   = 100;
        }
Exemplo n.º 9
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
            }
        }
Exemplo n.º 10
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
            }
        }