Пример #1
0
 private void CreateModule(object obj, Framework.Entity.Template template)
 {
     System.Reflection.MethodInfo[] methods = obj.GetType().GetMethods();
     if (template.Type == Framework.Entity.Template.RTF)
     {
         RichTextBoxEx.SetContent(Framework.Class.ConvertTool.ConvertStringToRtf(""));
         string content = System.Text.Encoding.Default.GetString(template.Content);
         for (int i = 0, index = 0; i < methods.Length; i++)
         {
             if (methods[i].Name.StartsWith("get"))
             {
                 content = content.Replace("@" + index + "@", Framework.Class.ConvertTool.FormatRtf(Framework.Class.ConvertTool.ConvertStringToRtf(methods[i].Invoke(obj, null) + "")));
                 index++;
             }
         }
         RichTextBoxEx.Visible    = true;
         WinWordControlEx.Visible = false;
         RichTextBoxEx.SetContent(content);
     }
     else
     {
         RichTextBoxEx.Visible    = false;
         WinWordControlEx.Visible = true;
         path = WinWordControlEx.RandomPath;
         WinWordControlEx.SetWordStream(template.Content, path);
         for (int i = 0, index = 0; i < methods.Length; i++)
         {
             if (methods[i].Name.StartsWith("get"))
             {
                 WinWordControlEx.Replace("@" + index + "@", methods[i].Invoke(obj, null) + "");
                 index++;
             }
         }
     }
 }
Пример #2
0
 public FrmExcel(Framework.Entity.Chapter chapter)
 {
     InitializeComponent();
     System.Reflection.Assembly   ass          = System.Reflection.Assembly.LoadFrom(System.Windows.Forms.Application.ExecutablePath.Replace("\\" + System.Windows.Forms.Application.StartupPath, ""));
     System.Collections.ArrayList templateList = contentService.GetContentTemplateByTitle(chapter.Title);
     Framework.Entity.Template    template     = (Framework.Entity.Template)templateList[0];
     WinExcelControlEx.ShowExcel(template.Content, WinExcelControlEx.RandomPath);
 }
Пример #3
0
        private void BtnSubmit_Click(object sender, System.EventArgs e)
        {
            System.Collections.ArrayList array  = new System.Collections.ArrayList();
            System.Collections.ArrayList array2 = new System.Collections.ArrayList();
            for (int i = 0; i < DataGridView2.RowCount; i++)
            {
                if (DataGridView2.Rows[i].Cells[0].Value.ToString().Equals("True"))
                {
                    for (int j = 1; j < 5; j++)
                    {
                        FormatValue(DataGridView2.Rows[i].Cells[j], "");
                    }
                    array2.Add(new object[] { i + 1, DataGridView2.Rows[i].Cells[1].Value, DataGridView2.Rows[i].Cells[2].Value, DataGridView2.Rows[i].Cells[3].Value, DataGridView2.Rows[i].Cells[4].Value });
                }
            }
            array.Add(array2);
            object[] data = new object[15];
            //int[] selectState = new int[11];
            //System.Collections.ArrayList templateList;
            for (int i = 0; i < 11; i++)
            {
                selectState[i] = 0;
            }
            int count = 0;

            for (int i = 0; i < DataGridViewX3.RowCount; i++)
            {
                if (DataGridViewX3.Rows[i].Cells[0].Value.ToString().Equals("True"))
                {
                    //array.Add(new object[] { DataGridViewX3.Rows[i].Cells[1].Value });
                    selectState[i + 1] = 1;
                    count++;
                }
            }
            int dataNum = 0;

            for (int i = 1; i <= 11; i++)
            {
                Framework.Entity.Template b = new Framework.Entity.Template();
                b = (Framework.Entity.Template)templateList[i];

                if (selectState[i] == 1)
                {
                    data[dataNum] = b.Title;
                    dataNum++;
                }
            }
            data[11] = count;
            //array.Add(new object[] { count });
            data[12] = DataGridView1.Rows[0].Cells[0].Value;
            data[13] = DataGridView1.Rows[0].Cells[1].Value;
            data[14] = DataGridView1.Rows[0].Cells[2].Value;
            //object[] data = new object[] { DataGridView1.Rows[0].Cells[0].Value, DataGridView1.Rows[0].Cells[1].Value, DataGridView1.Rows[0].Cells[2].Value };
            //Framework.Class.ComboItem item = (Framework.Class.ComboItem)CbxType.SelectedItem;
            CreateModuleIntance(tempInsertText, array, @class, data);
            this.Close();
        }
Пример #4
0
        private void MnModify_Click(object sender, System.EventArgs e)
        {
            Framework.Entity.Template template = (Framework.Entity.Template)TreeTemplate.SelectedNode.Tag;
            FrmTemplate win = new FrmTemplate(true, template);

            win.RefreshIntance += new Framework.Interface.Content.FrmTemplate.RefreshHandle(RefreshList);
            win.Show();
            win.InitForm();
        }
Пример #5
0
        private void CreateModule(Framework.Entity.Template template, System.Collections.ArrayList array, object @class)
        {
            path = WinWordControlEx.RandomPath;
            WinWordControlEx.SetWordStream(template.Content, path);
            if (@class.GetType().Equals(new Framework.Model.PlanLabor().GetType()))
            {
                WinWordControlEx.InsertTable(1, 3, array);
            }
            else if (@class.GetType().Equals(new Framework.Model.PlanMachine().GetType()))
            {
                WinWordControlEx.InsertTable(1, 3, array);
            }
            else if (@class.GetType().Equals(new Framework.Model.PlanMaterial().GetType()))
            {
                WinWordControlEx.InsertTable(1, 2, array);
            }
            else if (@class.GetType().Equals(new Framework.Model.ManageMember().GetType()))
            {
                WinWordControlEx.InsertTable(1, 2, array);
            }

            else if (@class.GetType().Equals(new Framework.Model.PrepareMaterial().GetType()))
            {
                //WinWordControlEx.InsertTable(1, 3, array);//表显示,括号内三项含义依次为“文档中第1个表;从该表的第3行开始插入;向表中插入的数据”
                for (int i = 0; i < array.Count; i++)
                {
                    object[] obj = (object[])array[i];
                    if (i == (array.Count - 1))
                    {
                        WinWordControlEx.Replace("@1@", obj[1].ToString());
                    }
                    else
                    {
                        WinWordControlEx.Replace("@1@", obj[1].ToString() + "、@1@");
                    }
                }
            }

            else if (@class.GetType().Equals(new Framework.Model.PrepareMachineTool().GetType()))
            {
                //WinWordControlEx.InsertTable(1, 3, array);//表显示,括号内三项含义依次为“文档中第1个表;从该表的第3行开始插入;向表中插入的数据”
                for (int i = 0; i < array.Count; i++)
                {
                    object[] obj = (object[])array[i];

                    if (i == (array.Count - 1))
                    {
                        WinWordControlEx.Replace("@1@", obj[1].ToString());
                    }
                    else
                    {
                        WinWordControlEx.Replace("@1@", obj[1].ToString() + "、@1@");
                    }
                }
            }
        }
Пример #6
0
 private void MnAdd_Click(object sender, System.EventArgs e)
 {
     Framework.Entity.Template template = new Framework.Entity.Template();
     Framework.Entity.Chapter chapter = (Framework.Entity.Chapter)TreeChapter.SelectedNode.Tag;
     template.Chapter = chapter.Id;
     FrmTemplate win = new FrmTemplate(false, template);
     win.RefreshIntance += new Framework.Interface.Content.FrmTemplate.RefreshHandle(RefreshList);
     win.Show();
     win.InitForm();
 }
Пример #7
0
        private void BtnSubmit_Click(object sender, System.EventArgs e)
        {
            System.Collections.ArrayList array = new System.Collections.ArrayList();
            System.Collections.ArrayList array2 = new System.Collections.ArrayList();
            for (int i = 0; i < DataGridView2.RowCount; i++)
            {
                if (DataGridView2.Rows[i].Cells[0].Value.ToString().Equals("True"))
                {
                    for (int j = 1; j < 5; j++)
                    {
                        FormatValue(DataGridView2.Rows[i].Cells[j], "");
                    }
                    array2.Add(new object[] { i + 1, DataGridView2.Rows[i].Cells[1].Value, DataGridView2.Rows[i].Cells[2].Value, DataGridView2.Rows[i].Cells[3].Value, DataGridView2.Rows[i].Cells[4].Value });
                }
            }
            array.Add(array2);
            object[] data = new object[15];
            //int[] selectState = new int[11];
            //System.Collections.ArrayList templateList;
            for (int i = 0; i < 11; i++)
            {
                selectState[i] = 0;
            }
            int count = 0;
            for (int i = 0; i < DataGridViewX3.RowCount; i++)
            {
                if (DataGridViewX3.Rows[i].Cells[0].Value.ToString().Equals("True"))
                {
                    //array.Add(new object[] { DataGridViewX3.Rows[i].Cells[1].Value });
                    selectState[i + 1] = 1;
                    count++;
                }
            }
            int dataNum = 0;
            for (int i = 1; i <= 11; i++)
            {
                Framework.Entity.Template b = new Framework.Entity.Template();
                b = (Framework.Entity.Template)templateList[i];

                if (selectState[i] == 1)
                {
                    data[dataNum] = b.Title;
                    dataNum++;
                }
            }
            data[11] = count;
            //array.Add(new object[] { count });
            data[12] = DataGridView1.Rows[0].Cells[0].Value;
            data[13] = DataGridView1.Rows[0].Cells[1].Value;
            data[14] = DataGridView1.Rows[0].Cells[2].Value;
            //object[] data = new object[] { DataGridView1.Rows[0].Cells[0].Value, DataGridView1.Rows[0].Cells[1].Value, DataGridView1.Rows[0].Cells[2].Value };
            //Framework.Class.ComboItem item = (Framework.Class.ComboItem)CbxType.SelectedItem;
            CreateModuleIntance(tempInsertText, array, @class, data);
            this.Close();
        }
Пример #8
0
        private void MnAdd_Click(object sender, System.EventArgs e)
        {
            Framework.Entity.Template template = new Framework.Entity.Template();
            Framework.Entity.Chapter  chapter  = (Framework.Entity.Chapter)TreeChapter.SelectedNode.Tag;
            template.Chapter = chapter.Id;
            FrmTemplate win = new FrmTemplate(false, template);

            win.RefreshIntance += new Framework.Interface.Content.FrmTemplate.RefreshHandle(RefreshList);
            win.Show();
            win.InitForm();
        }
Пример #9
0
 public FrmRainConstruct(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;
         }
     }
 }
Пример #10
0
 public FrmRainConstruct(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;
         }
     }
 }
Пример #11
0
        private void BtnSubmit_Click(object sender, EventArgs e)
        {
            object[] obj = new object[] { };
            Framework.Entity.Template item = new Framework.Entity.Template();
            string itemtext = "混凝土试块的制作与养护";
            string str1 = " ", str2 = " ", str3 = " ", str4 = " ", str6 = " ", str7 = " ", str8 =" ", str5 = " ";

            if (checkBox1.Checked == true)
            {
                str1="用振动台振实制作试件\r\n"+"1.取样或拌制好的混凝土拌合物应至少用铁锨再来回拌合三次。\r\n"+"2.将混凝土拌合物一次装入试模,装料时应用抹刀沿各试模壁插捣,并使混凝土拌合物高出试模口。\r\n"
                + "3.试模应附着或固定在符合要求的振动台上,振动时试模不得有任何跳动,振动应持续到表面出浆为止,不得过振。\r\n"
                + "4.刮除试模口上多余的混凝土,待混凝土临近初凝时用抹刀抹平。\r\n";;
            }
            if (checkBox2.Checked == true)
            {
                str2 = "用人工插捣制作试件\r\n" + "1.取样或拌制好的混凝土拌合物应至少用铁锨再来回拌合三次。\r\n"
                    + "2.混凝土拌合物应分两层装入模内每层的装料" + "厚度大致相等插捣应按螺旋方向从边缘向中心均匀进行。" + "在插捣底层混凝土时,捣棒应达到试模底部。" + "插捣上层时,捣棒应贯穿上层后插入下层20-30mm;插捣时,捣棒应保持垂直,不得倾斜。然后应用抹刀沿试模内壁插拔数次。\r\n";
                str6 = "3.每层插捣次数按在10000mm²截面积内不得少于12次。\r\n" + "4.插捣后应用橡皮锤轻轻敲击试模四周直至插捣棒留下的空洞消失为止。\r\n"+"5.刮除试模口上多余的混凝土,待混凝土临近初凝时用抹刀抹平。\r\n";

            }
            if (checkBox3.Checked == true)
            {
                str3 = "用插入式振捣棒振实制作试件\r\n" + "1.取样或拌制好的混凝土拌合物应至少用铁锨再来回拌合三次。\r\n" + "2.将混凝土拌合物一次装入试模,装料时应用抹刀沿各试模壁插捣,并使混凝土拌合物高出试模口。\r\n";
                str7= "3.宜用直径为Φ25mm的插入式振捣棒,插入试模振捣时,振捣棒距试模底板10-20mm且不得触及试模底板,"+"振动应持续到表面出浆为止,且应避免过振,以防止混凝土离析;"+"一般振捣时间为20s。振捣棒拔出时要缓慢拔出后,不得留有孔洞。\r\n"
                    + "4.刮除试模口上多余的混凝土,待混凝土临近初凝时用抹刀抹平。\r\n";

            }
            if (checkBox4.Checked == true)
            {
                str4 = "标准养护\r\n" + "1.试件成型后应立即用不透水的薄膜覆盖表。\r\n" + "2.采用标准养护的试件,应在温度为20±5℃的环境中静置一昼夜至二昼夜,然后编号、拆模。" + "拆模后应立即放入温度为20±2℃,相对湿度为95%以上的标准养护室中养护," + "或在温度为20±2℃的不流动的Ca(OH)2饱和溶液中养护。" + "标准养护室内的试件应放在支架上,彼此间隔10-20mm,试件表面应保持潮湿,并不得被水直接冲淋。\r\n";
                str8= "3.标准养护龄期为28d(从搅拌加水开始计时)。\r\n" + "4.由专人负责检查每日的温度、湿度,每日记录两次,保证箱内符合规定的温度和湿度。"+"控制仪器也由专人负责操作使用,其他人员不得擅自开启温、湿度控制装置或改变已有的设置。"+"每个试件都必须有样本编号标签,如发现温、湿度异常,应立即采取措施,并上报负责人,并作好记录。\r\n";

            }
            if (checkBox5.Checked == true)
            {
                str5 = "同条件养护\r\n" + "1.试件成型后应立即用不透水的薄膜覆盖表。\r\n" + "2.同条件养护试件的拆模时间可与实际构件的拆模时间相同,拆模后试件应放置在靠近相应结构构件或结构部位的适当位置,并采用相同的养护方法。\r\n"
                    + "3.按规定养护天数不少于14d,不多于60d,以控制试件累计600℃养护为界的条件(0℃以下不计)。\r\n" + "4.由混凝土工长负责试块养护工作。为防止试块在楼面施工过程中受到破坏(如拆模),"+"影响到结构的评定,可以采取焊一个钢筋笼保护试块的办法。\r\n";
            }
            obj = new object[] { str1,str2,str3,str4,str5,str6,str7,str8 };
            foreach (Framework.Entity.Template template in templateList)
            {
                if (itemtext == template.Title)
                {
                    item = template;
                    break;
                }
            }
            CreateModuleIntance(item, null, @class, obj);
            this.Close();
        }
 private void btnSubmit_Click(object sender, EventArgs e)
 {
     object[] obj = new object[] { };
     Framework.Entity.Template item = new Framework.Entity.Template();
     string itemtext = "������ʩ����еѡ��";
     foreach (Framework.Entity.Template template in templateList)
     {
         if (itemtext == template.Title)
         {
             item = template;
             break;
         }
     }
     CreateModuleIntance(item, null, @class, obj);
     this.Close();
 }
Пример #13
0
 private void buttonX13_Click(object sender, System.EventArgs e)
 {
     object[] obj = new object[] { };
     Framework.Entity.Template item = new Framework.Entity.Template();
     string itemtext = "»ìÄýÍÁ»ù´¡½½Öþ";
     foreach (Framework.Entity.Template template in templateList)
     {
         if (itemtext == template.Title)
         {
             item = template;
             break;
         }
     }
     CreateModuleIntance(item, null, @class, obj);
     this.Close();
 }
Пример #14
0
        private void BtnSubmit_Click(object sender, EventArgs e)
        {
            object[] obj = new object[] { };
            Framework.Entity.Template item = new Framework.Entity.Template();
            string itemtext = "混凝土试块的制作与养护";
            string str1 = " ", str2 = " ", str3 = " ", str4 = " ", str6 = " ", str7 = " ", str8 = " ", str5 = " ";

            if (checkBox1.Checked == true)
            {
                str1 = "用振动台振实制作试件\r\n" + "1.取样或拌制好的混凝土拌合物应至少用铁锨再来回拌合三次。\r\n" + "2.将混凝土拌合物一次装入试模,装料时应用抹刀沿各试模壁插捣,并使混凝土拌合物高出试模口。\r\n"
                       + "3.试模应附着或固定在符合要求的振动台上,振动时试模不得有任何跳动,振动应持续到表面出浆为止,不得过振。\r\n"
                       + "4.刮除试模口上多余的混凝土,待混凝土临近初凝时用抹刀抹平。\r\n";;
            }
            if (checkBox2.Checked == true)
            {
                str2 = "用人工插捣制作试件\r\n" + "1.取样或拌制好的混凝土拌合物应至少用铁锨再来回拌合三次。\r\n"
                       + "2.混凝土拌合物应分两层装入模内每层的装料" + "厚度大致相等插捣应按螺旋方向从边缘向中心均匀进行。" + "在插捣底层混凝土时,捣棒应达到试模底部。" + "插捣上层时,捣棒应贯穿上层后插入下层20-30mm;插捣时,捣棒应保持垂直,不得倾斜。然后应用抹刀沿试模内壁插拔数次。\r\n";
                str6 = "3.每层插捣次数按在10000mm²截面积内不得少于12次。\r\n" + "4.插捣后应用橡皮锤轻轻敲击试模四周直至插捣棒留下的空洞消失为止。\r\n" + "5.刮除试模口上多余的混凝土,待混凝土临近初凝时用抹刀抹平。\r\n";
            }
            if (checkBox3.Checked == true)
            {
                str3 = "用插入式振捣棒振实制作试件\r\n" + "1.取样或拌制好的混凝土拌合物应至少用铁锨再来回拌合三次。\r\n" + "2.将混凝土拌合物一次装入试模,装料时应用抹刀沿各试模壁插捣,并使混凝土拌合物高出试模口。\r\n";
                str7 = "3.宜用直径为Φ25mm的插入式振捣棒,插入试模振捣时,振捣棒距试模底板10-20mm且不得触及试模底板," + "振动应持续到表面出浆为止,且应避免过振,以防止混凝土离析;" + "一般振捣时间为20s。振捣棒拔出时要缓慢拔出后,不得留有孔洞。\r\n"
                       + "4.刮除试模口上多余的混凝土,待混凝土临近初凝时用抹刀抹平。\r\n";
            }
            if (checkBox4.Checked == true)
            {
                str4 = "标准养护\r\n" + "1.试件成型后应立即用不透水的薄膜覆盖表。\r\n" + "2.采用标准养护的试件,应在温度为20±5℃的环境中静置一昼夜至二昼夜,然后编号、拆模。" + "拆模后应立即放入温度为20±2℃,相对湿度为95%以上的标准养护室中养护," + "或在温度为20±2℃的不流动的Ca(OH)2饱和溶液中养护。" + "标准养护室内的试件应放在支架上,彼此间隔10-20mm,试件表面应保持潮湿,并不得被水直接冲淋。\r\n";
                str8 = "3.标准养护龄期为28d(从搅拌加水开始计时)。\r\n" + "4.由专人负责检查每日的温度、湿度,每日记录两次,保证箱内符合规定的温度和湿度。" + "控制仪器也由专人负责操作使用,其他人员不得擅自开启温、湿度控制装置或改变已有的设置。" + "每个试件都必须有样本编号标签,如发现温、湿度异常,应立即采取措施,并上报负责人,并作好记录。\r\n";
            }
            if (checkBox5.Checked == true)
            {
                str5 = "同条件养护\r\n" + "1.试件成型后应立即用不透水的薄膜覆盖表。\r\n" + "2.同条件养护试件的拆模时间可与实际构件的拆模时间相同,拆模后试件应放置在靠近相应结构构件或结构部位的适当位置,并采用相同的养护方法。\r\n"
                       + "3.按规定养护天数不少于14d,不多于60d,以控制试件累计600℃养护为界的条件(0℃以下不计)。\r\n" + "4.由混凝土工长负责试块养护工作。为防止试块在楼面施工过程中受到破坏(如拆模)," + "影响到结构的评定,可以采取焊一个钢筋笼保护试块的办法。\r\n";
            }
            obj = new object[] { str1, str2, str3, str4, str5, str6, str7, str8 };
            foreach (Framework.Entity.Template template in templateList)
            {
                if (itemtext == template.Title)
                {
                    item = template;
                    break;
                }
            }
            CreateModuleIntance(item, null, @class, obj);
            this.Close();
        }
Пример #15
0
        private void InitProjectPanel()
        {
            System.Xml.XmlElement element = Framework.Class.XmlTool.FindChapterByCid(chapter.Id);
            string content = Framework.Class.ConvertTool.ConvertRtfToString(element.GetAttribute("RTF"));

            string[] contentLines = content.Split(new string[] { "\n" }, System.StringSplitOptions.RemoveEmptyEntries);
            for (int i = 0; i < contentLines.Length; i++)
            {
                Framework.Entity.Template            template = contentService.GetTemplateByTitle(contentLines[i]);
                DevComponents.DotNetBar.CheckBoxItem item     = new DevComponents.DotNetBar.CheckBoxItem();
                //z自动生成的checkbox,所涉及的代码是从元数据,是微软自带的不能修改,所以改字体

                item.Text = template.Title;
                item.Tag  = template;
                IpnProject.Items.Add(item);
            }
        }
Пример #16
0
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            object[] obj = new object[] { };
            Framework.Entity.Template item = new Framework.Entity.Template();
            string itemtext = "混凝土施工机械选择";

            foreach (Framework.Entity.Template template in templateList)
            {
                if (itemtext == template.Title)
                {
                    item = template;
                    break;
                }
            }
            CreateModuleIntance(item, null, @class, obj);
            this.Close();
        }
Пример #17
0
        private void buttonX13_Click(object sender, System.EventArgs e)
        {
            object[] obj = new object[] { };
            Framework.Entity.Template item = new Framework.Entity.Template();
            string itemtext = "»ìÄýÍÁ»ù´¡½½Öþ";

            foreach (Framework.Entity.Template template in templateList)
            {
                if (itemtext == template.Title)
                {
                    item = template;
                    break;
                }
            }
            CreateModuleIntance(item, null, @class, obj);
            this.Close();
        }
Пример #18
0
        public void Delete(object entity)
        {
            using (this.getConnection)
            {
                this.getConnection.Open();
                System.Data.IDbCommand cmd = this.getConnection.CreateCommand();
                cmd.CommandType = System.Data.CommandType.Text;
                switch (Framework.Class.PackageEntity.Dispatcher(entity))
                {
                case 1:
                    Framework.Entity.Module module = (Framework.Entity.Module)entity;
                    cmd.CommandText = "DELETE FROM FW_Module WHERE M_Id = " + module.Id;
                    break;

                case 2:
                    Framework.Entity.Role role = (Framework.Entity.Role)entity;
                    cmd.CommandText = "DELETE FROM FW_Role WHERE R_Id = " + role.Id;
                    break;

                case 3:
                    Framework.Entity.User user = (Framework.Entity.User)entity;
                    cmd.CommandText = "DELETE FROM FW_User WHERE U_Id = " + user.Id;
                    break;

                case 4:
                    Framework.Entity.Chapter chapter = (Framework.Entity.Chapter)entity;
                    cmd.CommandText = "DELETE FROM CB_Chapter WHERE C_Id = " + chapter.Id;
                    break;

                case 5:
                    Framework.Entity.Template template = (Framework.Entity.Template)entity;
                    cmd.CommandText = "DELETE FROM CB_Template WHERE T_Id = " + template.Id;
                    break;

                case 6:
                    Framework.Entity.Model model = (Framework.Entity.Model)entity;
                    cmd.CommandText = "DELETE FROM CB_Model WHERE D_Id = " + model.Id;
                    break;
                }
                cmd.ExecuteReader();
                this.getConnection.Close();
            }
        }
Пример #19
0
 private void btnSubmit_Click(object sender, EventArgs e)
 {
     #region  //��ȡģ�������
     string templatename = "�в����̿�ʽ�ֹܽ��ּ�";
     Framework.Entity.Template templatetemp = new Framework.Entity.Template();
     System.Collections.ArrayList templateList = contentService.GetContentTemplateByTitle(chaptertemp.Title);
     foreach (Framework.Entity.Template template in templateList)
     {
         if (template.Title == templatename)
         {
             templatetemp = template;
             break;
         }
     }
     #endregion
     System.Collections.ArrayList array = new System.Collections.ArrayList();
     System.Collections.ArrayList array1 = new System.Collections.ArrayList();
     System.Collections.ArrayList array2 = new System.Collections.ArrayList();
     System.Collections.ArrayList array3 = new System.Collections.ArrayList();
     for (int i = 0; i < Dgv_Recommend4Para.RowCount; i++)
     {
         array1.Add(new object[] { Dgv_Recommend4Para.Rows[i].Cells[0].Value, Dgv_Recommend4Para.Rows[i].Cells[1].Value, Dgv_Recommend4Para.Rows[i].Cells[2].Value, Dgv_Recommend4Para.Rows[i].Cells[3].Value });
     }
     for (int i = 0; i < Dgv_Recommend4Material.Rows.Count; i++)
     {
         if (Dgv_Recommend4Material.Rows[i].Cells[1].Value != null)
         {
             array2.Add(new object[] { i + 1, Dgv_Recommend4Material.Rows[i].Cells[1].Value, Dgv_Recommend4Material.Rows[i].Cells[2].Value, Dgv_Recommend4Material.Rows[i].Cells[3].Value, Dgv_Recommend4Material.Rows[i].Cells[4].Value, Dgv_Recommend4Material.Rows[i].Cells[5].Value });
         }
     }
     for (int i = 0; i < Dgv_Recommend4Labor.Rows.Count; i++)
     {
         if (Dgv_Recommend4Labor.Rows[i].Cells[1].Value != null)
         {
             array3.Add(new object[] { i + 1, Dgv_Recommend4Labor.Rows[i].Cells[1].Value, Dgv_Recommend4Labor.Rows[i].Cells[2].Value });
         }
     }
     array.Add(array1);
     array.Add(array2);
     array.Add(array3);
     CreateModuleIntance(templatetemp, array, @class, null);
     this.Close();
 }
Пример #20
0
 private void btnSubmit_Click(object sender, EventArgs e)
 {
     #region  //获取模板的内容
     string templatename = "承插型盘扣式钢管脚手架";
     Framework.Entity.Template    templatetemp = new Framework.Entity.Template();
     System.Collections.ArrayList templateList = contentService.GetContentTemplateByTitle(chaptertemp.Title);
     foreach (Framework.Entity.Template template in templateList)
     {
         if (template.Title == templatename)
         {
             templatetemp = template;
             break;
         }
     }
     #endregion
     System.Collections.ArrayList array  = new System.Collections.ArrayList();
     System.Collections.ArrayList array1 = new System.Collections.ArrayList();
     System.Collections.ArrayList array2 = new System.Collections.ArrayList();
     System.Collections.ArrayList array3 = new System.Collections.ArrayList();
     for (int i = 0; i < Dgv_Recommend4Para.RowCount; i++)
     {
         array1.Add(new object[] { Dgv_Recommend4Para.Rows[i].Cells[0].Value, Dgv_Recommend4Para.Rows[i].Cells[1].Value, Dgv_Recommend4Para.Rows[i].Cells[2].Value, Dgv_Recommend4Para.Rows[i].Cells[3].Value });
     }
     for (int i = 0; i < Dgv_Recommend4Material.Rows.Count; i++)
     {
         if (Dgv_Recommend4Material.Rows[i].Cells[1].Value != null)
         {
             array2.Add(new object[] { i + 1, Dgv_Recommend4Material.Rows[i].Cells[1].Value, Dgv_Recommend4Material.Rows[i].Cells[2].Value, Dgv_Recommend4Material.Rows[i].Cells[3].Value, Dgv_Recommend4Material.Rows[i].Cells[4].Value, Dgv_Recommend4Material.Rows[i].Cells[5].Value });
         }
     }
     for (int i = 0; i < Dgv_Recommend4Labor.Rows.Count; i++)
     {
         if (Dgv_Recommend4Labor.Rows[i].Cells[1].Value != null)
         {
             array3.Add(new object[] { i + 1, Dgv_Recommend4Labor.Rows[i].Cells[1].Value, Dgv_Recommend4Labor.Rows[i].Cells[2].Value });
         }
     }
     array.Add(array1);
     array.Add(array2);
     array.Add(array3);
     CreateModuleIntance(templatetemp, array, @class, null);
     this.Close();
 }
Пример #21
0
        private void CreateTemplateList()
        {
            DevComponents.AdvTree.Node rootNode = new DevComponents.AdvTree.Node(chapter.Title);
            rootNode.Expanded = true;
            AdvTree.Nodes.Add(rootNode);
            System.Collections.ArrayList templateList = contentService.GetTemplateByChapter(chapter.Id);
            foreach (Framework.Entity.Template template in templateList)
            {
                DevComponents.AdvTree.Node node = new DevComponents.AdvTree.Node(template.Title);
                node.Tag = template;

                node.Expanded         = true;
                node.NodeDoubleClick += new System.EventHandler(delegate(object o, System.EventArgs a)
                {
                    foreach (Framework.Entity.Template template1 in templateList) //这层foreeach用于双击节点时,重新的到所有的节点
                    {
                        if (template1.Title == node.Text)                         //如果
                        {
                            DevComponents.AdvTree.Node nd = (DevComponents.AdvTree.Node)o;
                            Framework.Entity.Template tmp = (Framework.Entity.Template)nd.Tag;
                            if (template1.Type == Framework.Entity.Template.RTF)
                            {
                                RichTextBoxEx.Visible    = true;
                                WinWordControlEx.Visible = false;
                                RichTextBoxEx.SetContent(System.Text.Encoding.Default.GetString(template1.Content));
                            }
                            else
                            {
                                RichTextBoxEx.Visible    = false;
                                WinWordControlEx.Visible = true;
                                path = WinWordControlEx.RandomPath;
                                WinWordControlEx.SetWordStream(template1.Content, path);
                            }
                            break;
                        }
                    }
                });
                rootNode.Nodes.Add(node);
            }
        }
Пример #22
0
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            #region  //��ȡģ�������
            string templatename="";
            if (Rdo_Item1DP.Checked)
            { templatename = "�ۼ�ʽ�ֹܽ��ּܣ���أ�����"; }
            else if(Rdo_Item1SP.Checked)
            { templatename = "�ۼ�ʽ�ֹܽ��ּܣ���أ�˫��"; }
            Framework.Entity.Template templatetemp=new Framework.Entity.Template();
            System.Collections.ArrayList templateList = contentService.GetContentTemplateByTitle(chaptertemp.Title);
            foreach (Framework.Entity.Template template in templateList)
            {
                if (template.Title == templatename)
                {
                    templatetemp = template;
                    break;
                }
            }
            #endregion

            System.Collections.ArrayList array = new System.Collections.ArrayList();
            System.Collections.ArrayList array1 = new System.Collections.ArrayList();
            System.Collections.ArrayList array2 = new System.Collections.ArrayList();
            System.Collections.ArrayList array3 = new System.Collections.ArrayList();
            for (int i = 0; i < Dgv_Recommend1Material.Rows.Count; i++)
            {
                if (Dgv_Recommend1Material.Rows[i].Cells[1].Value != null)
                {
                    array1.Add(new object[] { i + 1, Dgv_Recommend1Material.Rows[i].Cells[1].Value, Dgv_Recommend1Material.Rows[i].Cells[2].Value, Dgv_Recommend1Material.Rows[i].Cells[3].Value });
                }
            }
            for (int i = 0; i < Dgv_Recommend1Labor.Rows.Count; i++)
            {
                if (Dgv_Recommend1Labor.Rows[i].Cells[1].Value != null)
                {
                    array2.Add(new object[] { i + 1, Dgv_Recommend1Labor.Rows[i].Cells[1].Value, Dgv_Recommend1Labor.Rows[i].Cells[2].Value });
                }
            }
            for (int i = 0; i < Dgv_Recommend1Tool.Rows.Count; i++)
            {
                if (Dgv_Recommend1Tool.Rows[i].Cells[1].Value != null)
                {
                    array3.Add(new object[] { i + 1, Dgv_Recommend1Tool.Rows[i].Cells[1].Value, Dgv_Recommend1Tool.Rows[i].Cells[2].Value, Dgv_Recommend1Tool.Rows[i].Cells[3].Value });
                }
            }
            array.Add(array1);
            array.Add(array2);
            array.Add(array3);

             string textDxhg = "";
             string textLqj = "";
             object[] data = new object[] { };
             if (Rdo_Item1DHG.Checked) { textDxhg = Rdo_Item1DHG.Text; }
             else if (Rdo_Item1XHG.Checked) { textDxhg = Rdo_Item1XHG.Text; }
             if (Rdo_Item1LBSK.Checked) { textLqj = Rdo_Item1LBSK.Text; }
             else if (Rdo_Item1SBSK.Checked) { textLqj = Rdo_Item1SBSK.Text; }

             if (Rdo_Item1DP.Checked)
             {
                data =new object[] { Tb_Item1DSGD.Text, Tb_Item1HJ.Text, Tb_Item1ZJ.Text, Tb_Item1BJ.Text, textLqj ,textDxhg };
             }
             if (Rdo_Item1SP.Checked)
             {
                  data = new object[] { Tb_Item1DSGD.Text, Tb_Item1HJ.Text, Tb_Item1ZJ.Text, Tb_Item1BJ.Text, Tb_Item1NLGJWQ.Text, Tb_Item1XHGLDJQ.Text, textLqj ,textDxhg};
             }

             CreateModuleIntance(templatetemp, array, @class, data);//4.ͨ��delegate���ݱ���ִ��ʵ������
             this.Close();
        }
Пример #23
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);
     }
 }
Пример #24
0
        private void BtnSubmit_Click(object sender, System.EventArgs e)
        {
            System.Collections.ArrayList array = new System.Collections.ArrayList();
            if (@class.GetType().Equals(new Framework.Model.ConstructPrepare().GetType()))
            {
                System.Collections.ArrayList array1 = new System.Collections.ArrayList();
                System.Collections.ArrayList array2 = new System.Collections.ArrayList();
                System.Collections.ArrayList array3 = new System.Collections.ArrayList();
                for (int i = 0; i < DataGridView1.Rows.Count; i++)
                {
                    array1.Add(new object[] { i + 1, DataGridView1.Rows[i].Cells[1].Value, DataGridView1.Rows[i].Cells[2].Value, DataGridView1.Rows[i].Cells[3].Value });
                }
                for (int i = 0; i < DataGridView2.Rows.Count; i++)
                {
                    array2.Add(new object[] { i + 1, DataGridView2.Rows[i].Cells[1].Value, DataGridView2.Rows[i].Cells[2].Value, DataGridView2.Rows[i].Cells[3].Value });
                }
                for (int i = 0; i < DataGridView3.Rows.Count; i++)
                {
                    array3.Add(new object[] { i + 1, DataGridView3.Rows[i].Cells[1].Value, DataGridView3.Rows[i].Cells[2].Value });
                }
                array.Add(array1);
                array.Add(array2);
                array.Add(array3);
            }

            #region//将选中的冬雨季施工工程添加到文档的相应位置
            object[] data = new object[12];
            for (int i = 1; i <= 11; i++)
            {
                selectState[i] = 0;
            }
            int numLength = 0;//用于确定一共选择了几种类型的脚手架
            for (int i = 0; i < DataGridView2.Rows.Count; i++)
            {
                switch (DataGridView2.Rows[i].Cells[1].Value.ToString())
                {
                case "钢管落地脚手架_内脚手架": if (selectState[1] == 0)
                    {
                        selectState[1] = 1; numLength++;
                    }
                    break;

                case "钢管落地脚手架_外脚手架": if (selectState[2] == 0)
                    {
                        selectState[2] = 1; numLength++;
                    }
                    break;

                case "钢管落地脚手架_物料提升架": if (selectState[3] == 0)
                    {
                        selectState[3] = 1; numLength++;
                    }
                    break;

                case "腕扣式钢管脚手架": if (selectState[4] == 0)
                    {
                        selectState[4] = 1; numLength++;
                    }
                    break;

                case "门式钢管脚手架": if (selectState[5] == 0)
                    {
                        selectState[5] = 1; numLength++;
                    }
                    break;

                case "门式脚手架": if (selectState[6] == 0)
                    {
                        selectState[6] = 1; numLength++;
                    }
                    break;

                case "扣件式钢管脚手架": if (selectState[7] == 0)
                    {
                        selectState[7] = 1; numLength++;
                    }
                    break;

                case "附墙升降脚手架": if (selectState[8] == 0)
                    {
                        selectState[8] = 1; numLength++;
                    }
                    break;

                case "整体提升脚手架": if (selectState[9] == 0)
                    {
                        selectState[9] = 1; numLength++;
                    }
                    break;

                case "整体提升外脚手架": if (selectState[10] == 0)
                    {
                        selectState[10] = 1; numLength++;
                    }
                    break;

                case "钢管扣件满堂脚手架": if (selectState[11] == 0)
                    {
                        selectState[11] = 1; numLength++;
                    }
                    break;
                }
            }
            int dataNum = 0;//用此变量实现将 data[] 数组中的数据依次存放
            for (int i = 1; i <= 11; i++)
            {
                Framework.Entity.Template b = new Framework.Entity.Template(); //定义一个“模板”类型的变量
                b = (Framework.Entity.Template)templateList[i];
                if (selectState[i] == 1)                                       //如果选中了某一脚手架,则其“selectState[i]==1”,
                {
                    data[dataNum] = b.Title;
                    dataNum++;//每选中一个脚手架,,dataNum的值就加一
                    //object adata = b.Title;
                }
            }
            data[11] = numLength;//numLength最后的值,表示的是选中的脚手架的类型的总数
            #endregion

            CreateModuleIntance(tempInsertText, array, @class, data);
            this.Close();
        }
Пример #25
0
 public static System.Collections.ArrayList Package(object entity, System.Data.DataTable dt)
 {
     System.Collections.ArrayList result = new System.Collections.ArrayList();
     switch (Dispatcher(entity))
     {
         case 1:
             for (int i = 0; i < dt.Rows.Count; i++)
             {
                 Framework.Entity.Module module = new Framework.Entity.Module();
                 module.Id = System.Convert.ToInt32(dt.Rows[i][0]);
                 module.Title = System.Convert.ToString(dt.Rows[i][1]);
                 module.Class = System.Convert.ToString(dt.Rows[i][2]);
                 module.Pid = System.Convert.ToInt32(dt.Rows[i][3]);
                 module.Level = System.Convert.ToInt32(dt.Rows[i][4]);
                 module.Order = System.Convert.ToInt32(dt.Rows[i][5]);
                 module.Image = System.Convert.ToInt32(dt.Rows[i][6]);
                 module.Position = System.Convert.ToInt32(dt.Rows[i][7]);
                 result.Add(module);
             }
             break;
         case 2:
             for (int i = 0; i < dt.Rows.Count; i++)
             {
                 Framework.Entity.Role role = new Framework.Entity.Role();
                 role.Id = System.Convert.ToInt32(dt.Rows[i][0]);
                 role.Name = System.Convert.ToString(dt.Rows[i][1]);
                 role.Mark = System.Convert.ToString(dt.Rows[i][2]);
                 role.Modules = System.Convert.ToString(dt.Rows[i][3]);
                 result.Add(role);
             }
             break;
         case 3:
             for (int i = 0; i < dt.Rows.Count; i++)
             {
                 Framework.Entity.User user = new Framework.Entity.User();
                 user.Id = System.Convert.ToInt32(dt.Rows[i][0]);
                 user.Name = System.Convert.ToString(dt.Rows[i][1]);
                 user.Password = System.Convert.ToString(dt.Rows[i][2]);
                 user.Roles = System.Convert.ToString(dt.Rows[i][3]);
                 result.Add(user);
             }
             break;
         case 4:
             for (int i = 0; i < dt.Rows.Count; i++)
             {
                 Framework.Entity.Chapter chapter = new Framework.Entity.Chapter();
                 chapter.Id = System.Convert.ToInt32(dt.Rows[i][0]);
                 chapter.Pid = System.Convert.ToInt32(dt.Rows[i][1]);
                 chapter.Title = System.Convert.ToString(dt.Rows[i][2]);
                 chapter.Description = System.Convert.ToString(dt.Rows[i][3]);
                 chapter.State = System.Convert.ToInt32(dt.Rows[i][4]);
                 chapter.Module = System.Convert.ToInt32(dt.Rows[i][5]);
                 chapter.Model = System.Convert.ToInt32(dt.Rows[i][6]);
                 chapter.Type = System.Convert.ToInt32(dt.Rows[i][7]);
                 result.Add(chapter);
             }
             break;
         case 5:
             for (int i = 0; i < dt.Rows.Count; i++)
             {
                 Framework.Entity.Template template = new Framework.Entity.Template();
                 template.Id = System.Convert.ToInt32(dt.Rows[i][0]);
                 template.Title = System.Convert.ToString(dt.Rows[i][1]);
                 template.Key = System.Convert.ToString(dt.Rows[i][2]);
                 template.Chapter = System.Convert.ToInt32(dt.Rows[i][3]);
                 template.Content = (byte[])dt.Rows[i][4];
                 template.State = System.Convert.ToInt32(dt.Rows[i][5]);
                 template.Type = System.Convert.ToInt32(dt.Rows[i][6]);
                 result.Add(template);
             }
             break;
         case 6:
             for (int i = 0; i < dt.Rows.Count; i++)
             {
                 Framework.Entity.Model model = new Framework.Entity.Model();
                 model.Id = System.Convert.ToInt32(dt.Rows[i][0]);
                 model.Name = System.Convert.ToString(dt.Rows[i][1]);
                 model.Class = System.Convert.ToString(dt.Rows[i][2]);
                 model.Description = System.Convert.ToString(dt.Rows[i][3]);
                 model.State = System.Convert.ToInt32(dt.Rows[i][4]);
                 result.Add(model);
             }
             break;
     }
     return result;
 }
Пример #26
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
            }
        }
Пример #27
0
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            #region  //»ñÈ¡Ä£°åµÄÄÚÈÝ
            object[] obj          = new object[] { };
            string   templatename = "Ä£°åÑ¡Ôñ";
            Framework.Entity.Template    templatetemp = new Framework.Entity.Template();
            System.Collections.ArrayList templateList = contentService.GetContentTemplateByTitle(chaptertemp.Title);

            #endregion
            System.Collections.ArrayList array  = new System.Collections.ArrayList();
            System.Collections.ArrayList array1 = new System.Collections.ArrayList();
            System.Collections.ArrayList array2 = new System.Collections.ArrayList();

            for (int i = 0; i < Dgv_FS_Machine.Rows.Count; i++)
            {
                if (Dgv_FS_Machine.Rows[i].Cells[1].Value != null)
                {
                    array2.Add(new object[] { i + 1, Dgv_FS_Machine.Rows[i].Cells[1].Value, Dgv_FS_Machine.Rows[i].Cells[2].Value });
                }
            }
            for (int i = 0; i < Dgv_FS_Staff.Rows.Count; i++)
            {
                if (Dgv_FS_Staff.Rows[i].Cells[1].Value != null)
                {
                    array1.Add(new object[] { i + 1, Dgv_FS_Staff.Rows[i].Cells[1].Value, Dgv_FS_Staff.Rows[i].Cells[2].Value });
                }
            }

            array.Add(array1);
            array.Add(array2);

            string data1_1, data1_2, data1_3, data1_5, data1_6;
            double data1_4, data1_7, data1_8;
            string str1_1;

            //Áº
            data1_1 = cB_FS_1CZJ.Text;
            data1_2 = cB_FS_1GGLX.Text;
            data1_3 = cB_FS_1MBLX.Text;
            data1_4 = dI_FS_1MBHD.Value;
            data1_5 = cB_FS_1DBZC.Text;
            data1_6 = cB_FS_1JMLX.Text;
            data1_7 = dI_FS_1FMK.Value;
            data1_8 = dI_FS_1FMG.Value;

            if (cB_FS_1DBZC.SelectedIndex != 0)
            {
                str1_1 = data1_6 + data1_5;
            }
            else
            {
                str1_1 = data1_7 + "mm" + "¡Á" + data1_8 + "mm" + data1_5;
            }

            //°å
            string data2_1, data2_2, data2_3, data2_5, data2_6;
            double data2_4, data2_7, data2_8;
            string str2_1;

            data2_1 = cB_FS_2CZJ.Text;
            data2_2 = cB_FS_2GGLX.Text;
            data2_3 = cB_FS_2MBLX.Text;
            data2_4 = dI_FS_2MBHD.Value;
            data2_5 = cB_FS_2DBZC.Text;
            data2_6 = cB_FS_2JMLX.Text;
            data2_7 = dI_FS_2FMK.Value;
            data2_8 = dI_FS_2FMG.Value;

            if (cB_FS_2DBZC.SelectedIndex != 0)
            {
                str2_1 = data2_6 + data2_5;
            }
            else
            {
                str2_1 = data2_7 + "mm" + "¡Á" + data2_8 + "mm" + data2_5;
            }

            obj = new object[] { data1_1, data1_2, data1_3, data1_4, str1_1, data2_1, data2_2, data2_3, data2_4, str2_1 };

            foreach (Framework.Entity.Template template in templateList)
            {
                if (template.Title == templatename)
                {
                    templatetemp = template;
                    break;
                }
            }

            CreateModuleIntance(templatetemp, array, @class, obj);
            this.Close();
        }
Пример #28
0
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            #region  //获取模板的内容
            string templatename = "扣件式钢管脚手架(落地+悬挑)";
            Framework.Entity.Template    templatetemp = new Framework.Entity.Template();
            System.Collections.ArrayList templateList = contentService.GetContentTemplateByTitle(chaptertemp.Title);
            foreach (Framework.Entity.Template template in templateList)
            {
                if (template.Title == templatename)
                {
                    templatetemp = template;
                    break;
                }
            }
            #endregion

            System.Collections.ArrayList array  = new System.Collections.ArrayList();
            System.Collections.ArrayList array1 = new System.Collections.ArrayList();
            System.Collections.ArrayList array2 = new System.Collections.ArrayList();
            System.Collections.ArrayList array3 = new System.Collections.ArrayList();
            System.Collections.ArrayList array4 = new System.Collections.ArrayList();
            for (int i = 0; i < Dgv_Recommend2Task.Rows.Count; i++)
            {
                if (Dgv_Recommend2Task.Rows[i].Cells[1].Value != null)
                {
                    array1.Add(new object[] { i + 1, Dgv_Recommend2Task.Rows[i].Cells[1].Value, Dgv_Recommend2Task.Rows[i].Cells[2].Value, Dgv_Recommend2Task.Rows[i].Cells[3].Value });
                }
            }
            for (int i = 0; i < Dgv_Recommend2Material.Rows.Count; i++)
            {
                if (Dgv_Recommend2Material.Rows[i].Cells[1].Value != null)
                {
                    array2.Add(new object[] { i + 1, Dgv_Recommend2Material.Rows[i].Cells[1].Value, Dgv_Recommend2Material.Rows[i].Cells[2].Value, Dgv_Recommend2Material.Rows[i].Cells[3].Value });
                }
            }
            for (int i = 0; i < Dgv_Recommend2Labor.Rows.Count; i++)
            {
                if (Dgv_Recommend2Labor.Rows[i].Cells[1].Value != null)
                {
                    array3.Add(new object[] { i + 1, Dgv_Recommend2Labor.Rows[i].Cells[1].Value, Dgv_Recommend2Labor.Rows[i].Cells[2].Value });
                }
            }
            for (int i = 0; i < Dgv_Recommend2Tool.Rows.Count; i++)
            {
                if (Dgv_Recommend2Tool.Rows[i].Cells[1].Value != null)
                {
                    array4.Add(new object[] { i + 1, Dgv_Recommend2Tool.Rows[i].Cells[1].Value, Dgv_Recommend2Tool.Rows[i].Cells[2].Value, Dgv_Recommend2Tool.Rows[i].Cells[3].Value });
                }
            }
            array.Add(array1);
            array.Add(array2);
            array.Add(array3);
            array.Add(array4);

            string textDxhg2 = "", textDxhg3 = "";
            string textLqj2 = "", textLqj3 = "";
            if (Rdo_Item2DHG.Checked)
            {
                textDxhg2 = Rdo_Item2DHG.Text;
            }
            else if (Rdo_Item2XHG.Checked)
            {
                textDxhg2 = Rdo_Item2XHG.Text;
            }
            if (Rdo_Item2LBSK.Checked)
            {
                textLqj2 = Rdo_Item2LBSK.Text;
            }
            else if (Rdo_Item2SBSK.Checked)
            {
                textLqj2 = Rdo_Item2SBSK.Text;
            }
            if (Rdo_Item3DHG.Checked)
            {
                textDxhg3 = Rdo_Item3DHG.Text;
            }
            else if (Rdo_Item3XHG.Checked)
            {
                textDxhg3 = Rdo_Item3XHG.Text;
            }
            if (Rdo_Item3LBSK.Checked)
            {
                textLqj3 = Rdo_Item3LBSK.Text;
            }
            else if (Rdo_Item3SBSK.Checked)
            {
                textLqj3 = Rdo_Item3SBSK.Text;
            }

            object[] data = new object[] { IntInput_Item1DSBW1.Value, IntInput_Item1DSBW2.Value, IntInput_Item1DSGD.Value, Tb_Item2HJ.Text, Tb_Item2ZJ.Text, Tb_Item2BJ.Text, Tb_Item2NLGJWQ.Text, Tb_Item2XHGLDJQ.Text, textLqj2, textDxhg2,
                                           Cbx_Item3XGSPXTG.Text, Tb_Item3HJ.Text, Tb_Item3ZJ.Text, Tb_Item3BJ.Text, Tb_Item3NLGJWQ.Text, Tb_Item3XHGLDJQ.Text, textLqj3, textDxhg3 };

            CreateModuleIntance(templatetemp, array, @class, data);
            this.Close();
        }
Пример #29
0
        public static System.Collections.ArrayList Package(object entity, System.Data.DataTable dt)
        {
            System.Collections.ArrayList result = new System.Collections.ArrayList();
            switch (Dispatcher(entity))
            {
            case 1:
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    Framework.Entity.Module module = new Framework.Entity.Module();
                    module.Id       = System.Convert.ToInt32(dt.Rows[i][0]);
                    module.Title    = System.Convert.ToString(dt.Rows[i][1]);
                    module.Class    = System.Convert.ToString(dt.Rows[i][2]);
                    module.Pid      = System.Convert.ToInt32(dt.Rows[i][3]);
                    module.Level    = System.Convert.ToInt32(dt.Rows[i][4]);
                    module.Order    = System.Convert.ToInt32(dt.Rows[i][5]);
                    module.Image    = System.Convert.ToInt32(dt.Rows[i][6]);
                    module.Position = System.Convert.ToInt32(dt.Rows[i][7]);
                    result.Add(module);
                }
                break;

            case 2:
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    Framework.Entity.Role role = new Framework.Entity.Role();
                    role.Id      = System.Convert.ToInt32(dt.Rows[i][0]);
                    role.Name    = System.Convert.ToString(dt.Rows[i][1]);
                    role.Mark    = System.Convert.ToString(dt.Rows[i][2]);
                    role.Modules = System.Convert.ToString(dt.Rows[i][3]);
                    result.Add(role);
                }
                break;

            case 3:
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    Framework.Entity.User user = new Framework.Entity.User();
                    user.Id       = System.Convert.ToInt32(dt.Rows[i][0]);
                    user.Name     = System.Convert.ToString(dt.Rows[i][1]);
                    user.Password = System.Convert.ToString(dt.Rows[i][2]);
                    user.Roles    = System.Convert.ToString(dt.Rows[i][3]);
                    result.Add(user);
                }
                break;

            case 4:
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    Framework.Entity.Chapter chapter = new Framework.Entity.Chapter();
                    chapter.Id          = System.Convert.ToInt32(dt.Rows[i][0]);
                    chapter.Pid         = System.Convert.ToInt32(dt.Rows[i][1]);
                    chapter.Title       = System.Convert.ToString(dt.Rows[i][2]);
                    chapter.Description = System.Convert.ToString(dt.Rows[i][3]);
                    chapter.State       = System.Convert.ToInt32(dt.Rows[i][4]);
                    chapter.Module      = System.Convert.ToInt32(dt.Rows[i][5]);
                    chapter.Model       = System.Convert.ToInt32(dt.Rows[i][6]);
                    chapter.Type        = System.Convert.ToInt32(dt.Rows[i][7]);
                    result.Add(chapter);
                }
                break;

            case 5:
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    Framework.Entity.Template template = new Framework.Entity.Template();
                    template.Id      = System.Convert.ToInt32(dt.Rows[i][0]);
                    template.Title   = System.Convert.ToString(dt.Rows[i][1]);
                    template.Key     = System.Convert.ToString(dt.Rows[i][2]);
                    template.Chapter = System.Convert.ToInt32(dt.Rows[i][3]);
                    template.Content = (byte[])dt.Rows[i][4];
                    template.State   = System.Convert.ToInt32(dt.Rows[i][5]);
                    template.Type    = System.Convert.ToInt32(dt.Rows[i][6]);
                    result.Add(template);
                }
                break;

            case 6:
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    Framework.Entity.Model model = new Framework.Entity.Model();
                    model.Id          = System.Convert.ToInt32(dt.Rows[i][0]);
                    model.Name        = System.Convert.ToString(dt.Rows[i][1]);
                    model.Class       = System.Convert.ToString(dt.Rows[i][2]);
                    model.Description = System.Convert.ToString(dt.Rows[i][3]);
                    model.State       = System.Convert.ToInt32(dt.Rows[i][4]);
                    result.Add(model);
                }
                break;
            }
            return(result);
        }
Пример #30
0
        //2.定义Delegate将引用的静态方法或引用类实例及该类的实例方法
        private void CreateModule(Framework.Entity.Template template, System.Collections.ArrayList array, object @class, object[] data)
        {
            path = WinWordControlEx.RandomPath;

            WinWordControlEx.CreateTempFile(template.Content, path);
            WinWordControlEx.LoadWord(path);
            if (@class.GetType().Equals(new Framework.Model.UseWater().GetType()))
            {
                for (int i = 0; i < array.Count; i++)
                {
                    System.Collections.ArrayList arraylist = (System.Collections.ArrayList)array[i];
                    WinWordControlEx.InsertTable(i + 1, 2, arraylist);// //WinWordControlEx.InsertTable(1, 3, array);//表显示,括号内三项含义依次为“文档中第1个表;从该表的第3行开始插入;向表中插入的数据”
                }
                string[] keys = new string[] { "&K1", "&K2", "&K3", "&K4", "&K5", "&K6", "&T1", "&B1", "&B2", "&SUM1", "&SUM2", "&SUM3", "&SUM4", "&Q1", "&Q2", "&Q3", "&Q4", "&Q5", "&QSUM", "&V", "&D1", "&D2" };
                ReplaceString(keys, data);
            }
            else if (@class.GetType().Equals(new Framework.Model.UsePower().GetType()))
            {
                string[] keys = new string[] { "&P1", "&P2", "&P3", "&P4", "&Cos", "&K1", "&K2", "&K3", "&K4", "&SUM" };
                ReplaceString(keys, data);
            }

            else if (@class.GetType().Equals(new Framework.Model.ConcreteProject().GetType()))
            {
                for (int i = 0; i < array.Count; i++)
                {
                    System.Collections.ArrayList arraylist = (System.Collections.ArrayList)array[i];
                    WinWordControlEx.InsertTable(i + 1, 2, arraylist);
                }
                string[] keys = new string[] { "&D1", "&D2", "&D3" };
                ReplaceString(keys, data);
            }
            else if (@class.GetType().Equals(new Framework.Model.ConstructPrepare().GetType()))
            {
                #region //选出“工序措施”后,与其对应的内容自动生成在文档中的相应位置。
                string NewWord = "$1$";
                for (int i = 0; i < System.Convert.ToInt16(data[11].ToString()) - 1; i++) //data[11] = numLength,通过data[11].ToString()确定选择的脚手架类型的数目,从而确定需要几个“$1$”符
                {
                    NewWord += "\n$1$"; //每添加一种脚手架类型,模板文档中就多添加一个“$1$”符号
                }
                WinWordControlEx.Replace("$1$", NewWord, path);
                for (int i = 0; i < System.Convert.ToInt16(data[11].ToString()); i++) //用文字图标等内容,把文档中的“$1$”替换掉
                {
                    tempInsertText = contentService.GetTemplateByTitle(data[i].ToString());
                    WinWordControlEx.Replace(tempInsertText.Content, "$1$"); //调用的是Replace(byte[] buffByte, string strOldText, string path)
                }
                #endregion

                WinWordControlEx.InsertTable(1, 2, (System.Collections.ArrayList)array[0]);
                WinWordControlEx.InsertTable(3, 2, (System.Collections.ArrayList)array[1]);
                WinWordControlEx.InsertTable(4, 2, (System.Collections.ArrayList)array[2]);
            }
            else if (@class.GetType().Equals(new Framework.Model.ClimateFeature().GetType()))
            {
                #region //将选中的冬雨季施工工程添加到文档的相应位置
                object[] obj = (object[])array[array.Count - 1];
                int num1; //标示DatGridview3表的中选中的个数
                num1 = System.Convert.ToInt16(obj[0].ToString());
                for (int i = 0; i < num1; i++)
                {
                    object[] obj1 = (object[])array[i];
                    if (i == (num1 - 1))
                    {
                        WinWordControlEx.Replace("@1@", obj1[0].ToString());
                    }
                    else
                    {
                        WinWordControlEx.Replace("@1@", obj1[0].ToString() + "、@1@");
                    }
                }
                for (int i = num1; i < array.Count - 1; i++)
                {
                    object[] obj2 = (object[])array[i];
                    if (i == (array.Count - 2))
                    {
                        WinWordControlEx.Replace("@2@", obj2[0].ToString());
                    }
                    else
                    {
                        WinWordControlEx.Replace("@2@", obj2[0].ToString() + "、@2@");
                    }
                }
                #endregion

                string[] keys = new string[] { "&XX", "&aa", "&bb", "&cc", "&dd", "&ee", "&ff", "&gg", "&qq", "&ww", "&sY", "&sM", "&sD", "&endY", "&endM", "&endD" };
                ReplaceString(keys, data);

            }
            else if (@class.GetType().Equals(new Framework.Model.RainConstruct().GetType()))
            {
                #region //选出“工序措施”后,与其对应的内容自动生成在文档中的相应位置。
                string NewWord = "$1$";
                for (int i = 0; i < System.Convert.ToInt16(data[11].ToString()) - 1; i++) //data[11] = numLength,通过data[11].ToString()确定选择的脚手架类型的数目,从而确定需要几个“$1$”符
                {
                    NewWord += "\n$1$"; //每添加一种脚手架类型,模板文档中就多添加一个“$1$”符号
                }
                WinWordControlEx.Replace("$1$", NewWord, path);

                for (int i = 0; i < System.Convert.ToInt16(data[11].ToString()); i++) //用文字图标等内容,把文档中的“$1$”替换掉
                {
                    tempInsertText = contentService.GetTemplateByTitle(data[i].ToString());
                    WinWordControlEx.Replace(tempInsertText.Content, "$1$");
                }
                #endregion

                #region //以“表格版”“文字版”形式向文档中插入信息
                for (int i = 0; i < array.Count; i++) //雨季施工防雨材料以表格形式插入到文档中
                {
                    System.Collections.ArrayList arraylist = (System.Collections.ArrayList)array[i];
                    WinWordControlEx.InsertTable(i + 1, 2, arraylist);
                }

                string[] keys = new string[] { "&D1", "&D2", "&D3" };
                for (int i = 12; i < 15; i++) //工作组成员,以文字形式插入到文档中
                {
                    object[] dataNew = new object[] { data[12].ToString(), data[13].ToString(), data[14].ToString() };
                    ReplaceString(keys, dataNew);
                }
                #endregion
            }
            else if (@class.GetType().Equals(new Framework.Model.ScaffoldMaterialCalculate().GetType()))//4.2脚手架用料计算
            {
                #region
                if (template.Title == "双排脚手架用料计算")
                {
                    string[] keys = new string[] { "@DbInput_MaterialDSGD@", "@DbInput_MaterialDSCD@", "@DbInput_MaterialLGZJ@",
                                                            "@DbInput_MaterialLGHJ@", "@DbInput_MaterialBJ@", "@DbInput_MaterialLQJL@",
                                                            "@Tb_MaterialWCDHGQZ@", "@Cb_MaterialJDCSZ@", "@IntInput_MaterialJDCKYBJ@",
                                                            "@IntInput_MaterialJDCKYLGZJ@", "@IntInput_MaterialJDCJGLGZJ@", "@DBIput_MaterialCLYLXS@",
                                                            "@LySum1" , "@LySum2" , "@LySum3" , "@LySum4" , "@LySum5" , "@LySum6" , "@LySum7" , "@LySum8" , "@LySum9"
                                                          };
                    ReplaceString(keys, data);
                }
                else if (template.Title == "单排脚手架用料计算")
                {
                    string[] keys = new string[] { "@DbInput_MaterialDSGD@", "@DbInput_MaterialDSCD@", "@DbInput_MaterialLGZJ@",
                                                            "@DbInput_MaterialLGHJ@", "@DbInput_MaterialBJ@", "@DbInput_MaterialLQJL@",
                                                            "@Tb_MaterialWCDHGQZ@", "@Cb_MaterialJDCSZ@", "@IntInput_MaterialJDCKYBJ@",
                                                            "@IntInput_MaterialJDCKYLGZJ@", "@IntInput_MaterialJDCJGLGZJ@", "@DBIput_MaterialCLYLXS@",
                                                            "@LySum1" , "@LySum2" , "@LySum3" , "@LySum4" , "@LySum5" , "@LySum6" , "@LySum7" , "@LySum8" , "@LySum9"
                                                          };
                    ReplaceString(keys, data);
                }
                else if (template.Title == "碗扣式脚手架用料计算")
                {
                    string[] keys = new string[] { "@Ly2_1@", "@Ly2_2@", "@Ly2_3@", "@Ly2_4@", "@Ly2_5@", "@Gkzg@", "@Ly2_6@", "@Gkhg@", "@Gkjhg@", "@Ly2_7@", "@Gkl@", "@Gkl3@", "@Ly2_8@", "@Gkwg@", "@Ly2_9@", "@Gksg@", "@Ly2_10@", "@Gklg@", "@Ly2_11@", "@Gkdz@",
                                                                "@Ly2_12@", "@Ly2_13@", "@Ly2_14@", "@Ly2_15@", "@Ly2_16@", "@Ly2_17@", "@Ly2_18@", "@Ly2_19@", "@Ly2_20@",
                                                                "@Ly2Sum1@", "@Ly2Sum2@", "@Ly2Sum3@", "@Ly2Sum4@", "@Ly2Sum5@", "@Ly2Sum6@", "@Ly2Sum7@", "@Ly2Sum8@", "@Ly2Sum9@", "@Ly2Sum10@", "@Ly2Sum11@", "@Ly2Sum12@","Cbx_Item2JHG"
                                                              };
                    ReplaceString(keys, data);
                }
                else if (template.Title == "吊篮脚手架用料计算")
                {
                    string[] keys = new string[] { "@Ly4_1@", "@Ly4_2@", "@Ly4_3@", "@Ly4_4@", "@Ly4_5@", "@Ly4_6@", "@Ly4_7@", "@Ly4_8@", "@Ly4_9@", "@Ly4_10@", "@Ly4_11@",
                                                                "@Ly4_12@", "@Ly4_13@", "@Ly4_14@", "@Ly4_15@", "@Ly4_16@", "@Ly4_17@", "@Ly4_18@", "@Ly4_19@", "@Ly4_20@","@Ly4_21@","@Ly4_22@","@Ly4_23@","@Ly4_24@","@Ly4_25@",
                                                                "@Ly4Sum1@", "@Ly4Sum2@", "@Ly4Sum3@", "@Ly4Sum4@", "@Ly4Sum5@", "@Ly4Sum6@", "@Ly4Sum7@", "@Ly4Sum8@", "@Ly4Sum9@", "@Ly4Sum10@", "@Ly4Sum11@", "@Ly4Sum12@","@Ly4Sum13@","@Ly4Sum14@","@Ly4Sum15@","@Ly4Sum16@",
                                                                "@compare1@","@compare2@","@compare3@","@compare4@","@compare5@"
                                                              };
                    ReplaceString(keys, data);
                }
                #endregion
            }
            else if (@class.GetType().Equals(new Framework.Model.ScaffoldPowerCalculate().GetType()))//4.1脚手架力学计算
            {
                #region 双排
                if (template.Title == "双排大横杆在上")
                {
                    //WinWordControlEx.LoadWord(path);
                    string[] keys = new string[] {
                                                                    "@pc1_1@" , "@pc1_2@" , "@pc1_3@" ,"@pc1_4@", "@pc1_5@", "@pc1_6@", "@pc1_7@", "@pc1_8@", "@pc1_9@", "@pc1_10@",
                                                                    "@pc2_2@","@pc2_7@",
                                                                    "@pc3_1@","@pc3_2@","@pc3_3@",
                                                                    "@pc4_1@","@pc4_2@","@pc4_3@","@pc4_4@","@pc4_5@","@pc4_6@","@gk@",
                                                                    "@pc5_1@","@pc5_2@","@pc5_3@",
                                                                    "@pc6_1@","@pc6_2@","@pc6_4@",
                                                                    "@pc7_1@","@μz@",
                                                                    "@pc8_1@","@pc8_2@","@pc8_3@","@pc8_12@","@pc8_13@","@μs@",
                                                                    "@pc9_1@","@pc9_2@","@pc9_3@","@pc9_4@","@pc9_5@",
                                                                     "@Sum1D1P2@",  "@Sum1D1Q@",  "@Sum1D1q1@",  "@Sum1D1q2@",  "@Sum1D2M1@",  "@Sum1D2M2@",  "@Sum1D2δ@", "@CompareD2δ@",  "@Sum1D3q1@",  "@Sum1D3V@", "@CompareD3V@",
                                                                     "@Sum1X1P1@",  "@Sum1X1P2@",  "@Sum1X1Q@",  "@Sum1X1P@",  "@Sum1X1M@",  "@Sum1X2δ@",  "@CompareX2δ@", "@Sum1X3V1@",  "@Sum1X3P@",  "@Sum1X3V2@",  "@Sum1X3V@", "@CompareX3V1@",
                                                                     "@Sum1K1P1@", "@Sum1K1P2@" , "@Sum1K1Q@" ,  "@Sum1K1R@", "@CompareK1R@",
                                                                     "@Sum1NG1@",  "@Sum1NG2@",  "@Sum1NG3@",  "@Sum1NG4@",  "@Sum1NG@",  "@Sum1NQ@",  "@Sum1Wk@",  "@Sum1YesN@",  "@Sum1NoN@",  "@Sum1MW@",
                                                                     "@LgU@",  "@LgL0@",  "@LgΦ@",  "@Sum1Noδ@", "@CompareNoδ@", "@Sum1Yesδ@", "@CompareYesδ@",
                                                                     "@Sum1NG2K@",  "@Sum1Mwk@" , "@Sum1NoHs@",  "@Sum1YesHs@", "@CompareHs@",
                                                                     "@Sum1Aw@",  "@Sum1Nlw@",  "@Sum1Nl@" , "@Sum1Lqjδ@", "@CompareF1@",  "@Sum1NlΦA@",  "@LqjΦ@", "@CompareF2@",
                                                                     "@Sum1NK@",  "@Sum1A@",  "@Sum1Pk@", "@Sum1fg@", "@Comparefg@"
                                                              };
                    ReplaceString(keys, data);
                }
                else if (template.Title == "双排小横杆在上立杆纵距la2")
                {
                    //WinWordControlEx.LoadWord(path);
                    string[] keys = new string[] {
                                                                "@pc1_1@" , "@pc1_2@" , "@pc1_3@" ,"@pc1_4@", "@pc1_5@", "@pc1_6@", "@pc1_7@", "@pc1_8@", "@pc1_9@", "@pc1_10@",
                                                                "@pc2_1@","@pc2_4@","@pc2_5@",
                                                                "@pc3_1@","@pc3_2@","@pc3_3@",
                                                                "@pc4_1@","@pc4_2@","@pc4_3@","@pc4_4@","@pc4_5@","@pc4_6@","@gk@",
                                                                "@pc5_1@","@pc5_2@","@pc5_3@",
                                                                "@pc6_1@","@pc6_2@","@pc6_4@",
                                                                "@pc7_1@","@μz@",
                                                                "@pc8_1@","@pc8_2@","@pc8_3@","@pc8_12@","@pc8_13@","@μs@",
                                                                "@pc9_1@","@pc9_2@","@pc9_3@","@pc9_4@","@pc9_5@",
                                                                 "@Sum2X1q2@" ,  "@Sum2X1dQ@",  "@Sum2X1xq@",  "@Sum2X2M@",  "@Sum2X2δ@",  "@Sum2X3V1@", "@Compare2X2δ@", "@Compare2X3V1@",
                                                                 "@Sum2D1Fk@",  "@Sum2D1F@",  "@Sum2D2Mmax@",  "@Sum2D2δ@",  "@Sum2D3V@", "@Compare2D2δ@", "@Compare2D3V@",
                                                                 "@Sum2KR@", "@Compare2K1R@",
                                                                 "@Sum1NG1@",  "@Sum1NG2@",  "@Sum1NG3@",  "@Sum1NG4@",  "@Sum1NG@",  "@Sum1NQ@",  "@Sum1Wk@",  "@Sum1YesN@",  "@Sum1NoN@",  "@Sum1MW@",
                                                                 "@LgU@",  "@LgL0@",  "@LgΦ@",  "@Sum1Noδ@", "@CompareNoδ@", "@Sum1Yesδ@", "@CompareYesδ@",
                                                                 "@Sum1NG2K@",  "@Sum1Mwk@" , "@Sum1NoHs@",  "@Sum1YesHs@", "@CompareHs@",
                                                                 "@Sum1Aw@",  "@Sum1Nlw@",  "@Sum1Nl@" , "@Sum1Lqjδ@", "@CompareF1@",  "@Sum1NlΦA@",  "@LqjΦ@", "@CompareF2@",
                                                                 "@Sum1NK@",  "@Sum1A@",  "@Sum1Pk@", "@Sum1fg@", "@Comparefg@"
                                                              };
                    ReplaceString(keys, data);
                }
                else if (template.Title == "双排小横杆在上立杆纵距la")
                {
                    //WinWordControlEx.LoadWord(path);
                    string[] keys = new string[] {
                                                                "@pc1_1@" , "@pc1_2@" , "@pc1_3@" ,"@pc1_4@", "@pc1_5@", "@pc1_6@", "@pc1_7@", "@pc1_8@", "@pc1_9@", "@pc1_10@",
                                                                "@pc2_1@","@pc2_4@","@pc2_5@",
                                                                "@pc3_1@","@pc3_2@","@pc3_3@",
                                                                "@pc4_1@","@pc4_2@","@pc4_3@","@pc4_4@","@pc4_5@","@pc4_6@","@gk@",
                                                                "@pc5_1@","@pc5_2@","@pc5_3@",
                                                                "@pc6_1@","@pc6_2@","@pc6_4@",
                                                                "@pc7_1@","@μz@",
                                                                "@pc8_1@","@pc8_2@","@pc8_3@","@pc8_12@","@pc8_13@","@μs@",
                                                                "@pc9_1@","@pc9_2@","@pc9_3@","@pc9_4@","@pc9_5@",
                                                                 "@Sum2X1q2@" ,  "@Sum2X1dQ@",  "@Sum2X1xq@",  "@Sum2X2M@",  "@Sum2X2δ@",  "@Sum2X3V1@", "@Compare2X2δ@", "@Compare2X3V1@",
                                                                 "@Sum2D1Fk@",  "@Sum2D1F@",  "@Sum2D2Mmax@",  "@Sum2D2δ@",  "@Sum2D3V@", "@Compare2D2δ@", "@Compare2D3V@",
                                                                 "@Sum2KR@", "@Compare2K1R@",
                                                                 "@Sum1NG1@",  "@Sum1NG2@",  "@Sum1NG3@",  "@Sum1NG4@",  "@Sum1NG@",  "@Sum1NQ@",  "@Sum1Wk@",  "@Sum1YesN@",  "@Sum1NoN@",  "@Sum1MW@",
                                                                 "@LgU@",  "@LgL0@",  "@LgΦ@",  "@Sum1Noδ@", "@CompareNoδ@", "@Sum1Yesδ@", "@CompareYesδ@",
                                                                 "@Sum1NG2K@",  "@Sum1Mwk@" , "@Sum1NoHs@",  "@Sum1YesHs@", "@CompareHs@",
                                                                 "@Sum1Aw@",  "@Sum1Nlw@",  "@Sum1Nl@" , "@Sum1Lqjδ@", "@CompareF1@",  "@Sum1NlΦA@",  "@LqjΦ@", "@CompareF2@",
                                                                 "@Sum1NK@",  "@Sum1A@",  "@Sum1Pk@", "@Sum1fg@", "@Comparefg@"
                                                              };
                    ReplaceString(keys, data);
                }
                #endregion
                #region 悬挑
                else if (template.Title == "悬挑大横杆在上")
                {
                    //WinWordControlEx.LoadWord(path);
                    string[] keys = new string[] {
                                                                    "@pc1_1@" , "@pc1_2@" , "@pc1_3@" ,"@pc1_4@", "@pc1_5@", "@pc1_6@", "@pc1_7@", "@pc1_8@", "@pc1_9@", "@pc1_10@",
                                                                    "@pc2_2@","@pc2_7@",
                                                                    "@pc3_1@","@pc3_2@","@pc3_3@",
                                                                    "@pc4_1@","@pc4_2@","@pc4_3@","@pc4_4@","@pc4_5@","@pc4_6@","@gk@",
                                                                    "@pc5_1@","@pc5_2@","@pc5_3@",
                                                                    "@pc6_1@","@pc6_2@","@pc6_4@",
                                                                    "@pc7_1@","@μz@",
                                                                    "@pc8_1@","@pc8_2@","@pc8_3@","@pc8_12@","@pc8_13@","@μs@",
                                                                    "@pc10_1@","@pc10_2@","@pc10_3@","@pc10_4@","@pc10_5@" ,
                                                                     "@pc11_1@","@pc11_2@","@pc11_3@",
                                                                     "@Sum1D1P2@",  "@Sum1D1Q@",  "@Sum1D1q1@",  "@Sum1D1q2@",  "@Sum1D2M1@",  "@Sum1D2M2@",  "@Sum1D2δ@", "@CompareD2δ@",  "@Sum1D3q1@",  "@Sum1D3V@", "@CompareD3V@",
                                                                     "@Sum1X1P1@",  "@Sum1X1P2@",  "@Sum1X1Q@",  "@Sum1X1P@",  "@Sum1X1M@",  "@Sum1X2δ@",  "@CompareX2δ@", "@Sum1X3V1@",  "@Sum1X3P@",  "@Sum1X3V2@",  "@Sum1X3V@", "@CompareX3V1@",
                                                                     "@Sum1K1P1@", "@Sum1K1P2@" , "@Sum1K1Q@" ,  "@Sum1K1R@", "@CompareK1R@",
                                                                     "@Sum1NG1@",  "@Sum1NG2@",  "@Sum1NG3@",  "@Sum1NG4@",  "@Sum1NG@",  "@Sum1NQ@",  "@Sum1Wk@",  "@Sum1YesN@",  "@Sum1NoN@",  "@Sum1MW@",
                                                                     "@LgU@",  "@LgL0@",  "@LgΦ@",  "@Sum1Noδ@", "@CompareNoδ@", "@Sum1Yesδ@", "@CompareYesδ@",
                                                                     "@Sum1NG2K@",  "@Sum1Mwk@" , "@Sum1NoHs@",  "@Sum1YesHs@", "@CompareHs@",
                                                                     "@Sum1Aw@",  "@Sum1Nlw@",  "@Sum1Nl@" , "@Sum1Lqjδ@", "@CompareF1@",  "@Sum1NlΦA@",  "@LqjΦ@", "@CompareF2@",
                                                                      "@weightParam@",  "@wxParam@", "@Sum4N1@",  "@Sum4q1@",  "@Sum4k@",  "@Sum4k1@",  "@Sum4k2@",  "@Sum4RA@",  "@Sum4RB@",  "@Sum4MA@",  "@Sum4f@",  "@Sum4N2@",  "@Sum4q2@",  "@Sum4Vmax@",  "@CompareXgf@","@CompareVmax@",
                                                                      "@Sum4Φb1@","@Sum4Φb@",  "@Sum4σ1@" ,"@strSum4Φb@",  "@CompareΦbσ@",
                                                                      "@Sum4σ2@", "@Sum4Mgd@", "@Sum4d@",  "@fc@" , "@Sum4fc@", "@Sum4Lsll@" , "@CompareLhsl@" , "@CompareLsll@"
                                                              };
                    ReplaceString(keys, data);
                }
                else if (template.Title == "悬挑小横杆在上立杆纵距la2")
                {
                    //WinWordControlEx.LoadWord(path);
                    string[] keys = new string[] {
                                                                "@pc1_1@" , "@pc1_2@" , "@pc1_3@" ,"@pc1_4@", "@pc1_5@", "@pc1_6@", "@pc1_7@", "@pc1_8@", "@pc1_9@", "@pc1_10@",
                                                                "@pc2_1@","@pc2_4@","@pc2_5@",
                                                                "@pc3_1@","@pc3_2@","@pc3_3@",
                                                                "@pc4_1@","@pc4_2@","@pc4_3@","@pc4_4@","@pc4_5@","@pc4_6@","@gk@",
                                                                "@pc5_1@","@pc5_2@","@pc5_3@",
                                                                "@pc6_1@","@pc6_2@","@pc6_4@",
                                                                "@pc7_1@","@μz@",
                                                                "@pc8_1@","@pc8_2@","@pc8_3@","@pc8_12@","@pc8_13@","@μs@",
                                                                "@pc10_1@","@pc10_2@","@pc10_3@","@pc10_4@","@pc10_5@" ,
                                                                "@pc11_1@","@pc11_2@","@pc11_3@",
                                                                 "@Sum2X1q2@" ,  "@Sum2X1dQ@",  "@Sum2X1xq@",  "@Sum2X2M@",  "@Sum2X2δ@",  "@Sum2X3V1@", "@Compare2X2δ@", "@Compare2X3V1@",
                                                                 "@Sum2D1Fk@",  "@Sum2D1F@",  "@Sum2D2Mmax@",  "@Sum2D2δ@",  "@Sum2D3V@", "@Compare2D2δ@", "@Compare2D3V@",
                                                                 "@Sum2KR@", "@Compare2K1R@",
                                                                 "@Sum1NG1@",  "@Sum1NG2@",  "@Sum1NG3@",  "@Sum1NG4@",  "@Sum1NG@",  "@Sum1NQ@",  "@Sum1Wk@",  "@Sum1YesN@",  "@Sum1NoN@",  "@Sum1MW@",
                                                                 "@LgU@",  "@LgL0@",  "@LgΦ@",  "@Sum1Noδ@", "@CompareNoδ@", "@Sum1Yesδ@", "@CompareYesδ@",
                                                                 "@Sum1NG2K@",  "@Sum1Mwk@" , "@Sum1NoHs@",  "@Sum1YesHs@", "@CompareHs@",
                                                                 "@Sum1Aw@",  "@Sum1Nlw@",  "@Sum1Nl@" , "@Sum1Lqjδ@", "@CompareF1@",  "@Sum1NlΦA@",  "@LqjΦ@", "@CompareF2@",
                                                                 "@weightParam@",  "@wxParam@", "@Sum4N1@",  "@Sum4q1@",  "@Sum4k@",  "@Sum4k1@",  "@Sum4k2@",  "@Sum4RA@",  "@Sum4RB@",  "@Sum4MA@",  "@Sum4f@",  "@Sum4N2@",  "@Sum4q2@",  "@Sum4Vmax@",   "@CompareXgf@", "@CompareVmax@",
                                                                  "@Sum4Φb1@","@Sum4Φb@",  "@Sum4σ1@" ,"@strSum4Φb@",  "@CompareΦbσ@",
                                                                  "@Sum4σ2@", "@Sum4Mgd@", "@Sum4d@",  "@fc@" , "@Sum4fc@", "@Sum4Lsll@" , "@CompareLhsl@" , "@CompareLsll@"
                                                              };
                    ReplaceString(keys, data);
                }
                else if (template.Title == "悬挑小横杆在上立杆纵距la")
                {
                    //WinWordControlEx.LoadWord(path);
                    string[] keys = new string[] {
                                                                "@pc1_1@" , "@pc1_2@" , "@pc1_3@" ,"@pc1_4@", "@pc1_5@", "@pc1_6@", "@pc1_7@", "@pc1_8@", "@pc1_9@", "@pc1_10@",
                                                                "@pc2_1@","@pc2_4@","@pc2_5@",
                                                                "@pc3_1@","@pc3_2@","@pc3_3@",
                                                                "@pc4_1@","@pc4_2@","@pc4_3@","@pc4_4@","@pc4_5@","@pc4_6@","@gk@",
                                                                "@pc5_1@","@pc5_2@","@pc5_3@",
                                                                "@pc6_1@","@pc6_2@","@pc6_4@",
                                                                "@pc7_1@","@μz@",
                                                                "@pc8_1@","@pc8_2@","@pc8_3@","@pc8_12@","@pc8_13@","@μs@",
                                                                "@pc10_1@","@pc10_2@","@pc10_3@","@pc10_4@","@pc10_5@" ,
                                                                "@pc11_1@","@pc11_2@","@pc11_3@",
                                                                 "@Sum2X1q2@" ,  "@Sum2X1dQ@",  "@Sum2X1xq@",  "@Sum2X2M@",  "@Sum2X2δ@",  "@Sum2X3V1@", "@Compare2X2δ@", "@Compare2X3V1@",
                                                                 "@Sum2D1Fk@",  "@Sum2D1F@",  "@Sum2D2Mmax@",  "@Sum2D2δ@",  "@Sum2D3V@", "@Compare2D2δ@", "@Compare2D3V@",
                                                                 "@Sum2KR@", "@Compare2K1R@",
                                                                 "@Sum1NG1@",  "@Sum1NG2@",  "@Sum1NG3@",  "@Sum1NG4@",  "@Sum1NG@",  "@Sum1NQ@",  "@Sum1Wk@",  "@Sum1YesN@",  "@Sum1NoN@",  "@Sum1MW@",
                                                                 "@LgU@",  "@LgL0@",  "@LgΦ@",  "@Sum1Noδ@", "@CompareNoδ@", "@Sum1Yesδ@", "@CompareYesδ@",
                                                                 "@Sum1NG2K@",  "@Sum1Mwk@" , "@Sum1NoHs@",  "@Sum1YesHs@", "@CompareHs@",
                                                                 "@Sum1Aw@",  "@Sum1Nlw@",  "@Sum1Nl@" , "@Sum1Lqjδ@", "@CompareF1@",  "@Sum1NlΦA@",  "@LqjΦ@", "@CompareF2@",
                                                                 "@weightParam@",  "@wxParam@", "@Sum4N1@",  "@Sum4q1@",  "@Sum4k@",  "@Sum4k1@",  "@Sum4k2@",  "@Sum4RA@",  "@Sum4RB@",  "@Sum4MA@",  "@Sum4f@",  "@Sum4N2@",  "@Sum4q2@",  "@Sum4Vmax@",  "@CompareXgf@", "@CompareVmax@",
                                                                 "@Sum4Φb1@","@Sum4Φb@",  "@Sum4σ1@" ,"@strSum4Φb@",  "@CompareΦbσ@",
                                                                  "@Sum4σ2@", "@Sum4Mgd@", "@Sum4d@",  "@fc@" , "@Sum4fc@", "@Sum4Lsll@" , "@CompareLhsl@" , "@CompareLsll@"
                                                              };
                    ReplaceString(keys, data);
                }
                #endregion
                #region 单排
                else if (template.Title == "单排大横杆在上")
                {
                    //WinWordControlEx.LoadWord(path);
                    string[] keys = new string[] {
                                                                    "@pc1_1@" , "@pc1_2@" , "@pc1_3@" ,"@pc1_4@", "@pc1_5@", "@pc1_6@", "@pc1_7@", "@pc1_8@", "@pc1_9@", "@pc1_10@",
                                                                    "@pc2_2@","@pc2_7@",
                                                                    "@pc3_1@","@pc3_2@","@pc3_3@",
                                                                    "@pc4_1@","@pc4_2@","@pc4_3@","@pc4_4@","@pc4_5@","@pc4_6@","@gk@",
                                                                    "@pc5_1@","@pc5_2@","@pc5_3@",
                                                                    "@pc6_1@","@pc6_2@","@pc6_4@",
                                                                    "@pc7_1@","@μz@",
                                                                    "@pc8_1@","@pc8_2@","@pc8_3@","@pc8_12@","@pc8_13@","@μs@",
                                                                    "@pc9_1@","@pc9_2@","@pc9_3@","@pc9_4@","@pc9_5@",
                                                                     "@Sum1D1P2@",  "@Sum1D1Q@",  "@Sum1D1q1@",  "@Sum1D1q2@",  "@Sum1D2M1@",  "@Sum1D2M2@",  "@Sum1D2δ@", "@CompareD2δ@",  "@Sum1D3q1@",  "@Sum1D3V@", "@CompareD3V@",
                                                                     "@Sum1X1P1@",  "@Sum1X1P2@",  "@Sum1X1Q@",  "@Sum1X1P@",  "@Sum1X1M@",  "@Sum1X2δ@",  "@CompareX2δ@", "@Sum1X3V1@",  "@Sum1X3P@",  "@Sum1X3V2@",  "@Sum1X3V@", "@CompareX3V1@",
                                                                     "@Sum1K1P1@", "@Sum1K1P2@" , "@Sum1K1Q@" ,  "@Sum1K1R@", "@CompareK1R@",
                                                                     "@Sum1NG1@",  "@Sum1NG2@",  "@Sum1NG3@",  "@Sum1NG4@",  "@Sum1NG@",  "@Sum1NQ@",  "@Sum1Wk@",  "@Sum1YesN@",  "@Sum1NoN@",  "@Sum1MW@",
                                                                     "@LgU@",  "@LgL0@",  "@LgΦ@",  "@Sum1Noδ@", "@CompareNoδ@", "@Sum1Yesδ@", "@CompareYesδ@",
                                                                     "@Sum1NG2K@",  "@Sum1Mwk@" , "@Sum1NoHs@",  "@Sum1YesHs@", "@CompareHs@",
                                                                     "@Sum1Aw@",  "@Sum1Nlw@",  "@Sum1Nl@" , "@Sum1Lqjδ@", "@CompareF1@",  "@Sum1NlΦA@",  "@LqjΦ@", "@CompareF2@",
                                                                     "@Sum1NK@",  "@Sum1A@",  "@Sum1Pk@", "@Sum1fg@", "@Comparefg@"
                                                              };
                    ReplaceString(keys, data);
                }
                else if (template.Title == "单排小横杆在上立杆纵距la2")
                {
                    //WinWordControlEx.LoadWord(path);
                    string[] keys = new string[] {
                                                                "@pc1_1@" , "@pc1_2@" , "@pc1_3@" ,"@pc1_4@", "@pc1_5@", "@pc1_6@", "@pc1_7@", "@pc1_8@", "@pc1_9@", "@pc1_10@",
                                                                "@pc2_1@","@pc2_4@","@pc2_5@",
                                                                "@pc3_1@","@pc3_2@","@pc3_3@",
                                                                "@pc4_1@","@pc4_2@","@pc4_3@","@pc4_4@","@pc4_5@","@pc4_6@","@gk@",
                                                                "@pc5_1@","@pc5_2@","@pc5_3@",
                                                                "@pc6_1@","@pc6_2@","@pc6_4@",
                                                                "@pc7_1@","@μz@",
                                                                "@pc8_1@","@pc8_2@","@pc8_3@","@pc8_12@","@pc8_13@","@μs@",
                                                                "@pc9_1@","@pc9_2@","@pc9_3@","@pc9_4@","@pc9_5@",
                                                                 "@Sum2X1q2@" ,  "@Sum2X1dQ@",  "@Sum2X1xq@",  "@Sum2X2M@",  "@Sum2X2δ@",  "@Sum2X3V1@", "@Compare2X2δ@", "@Compare2X3V1@",
                                                                 "@Sum2D1Fk@",  "@Sum2D1F@",  "@Sum2D2Mmax@",  "@Sum2D2δ@",  "@Sum2D3V@", "@Compare2D2δ@", "@Compare2D3V@",
                                                                 "@Sum2KR@", "@Compare2K1R@",
                                                                 "@Sum1NG1@",  "@Sum1NG2@",  "@Sum1NG3@",  "@Sum1NG4@",  "@Sum1NG@",  "@Sum1NQ@",  "@Sum1Wk@",  "@Sum1YesN@",  "@Sum1NoN@",  "@Sum1MW@",
                                                                 "@LgU@",  "@LgL0@",  "@LgΦ@",  "@Sum1Noδ@", "@CompareNoδ@", "@Sum1Yesδ@", "@CompareYesδ@",
                                                                 "@Sum1NG2K@",  "@Sum1Mwk@" , "@Sum1NoHs@",  "@Sum1YesHs@", "@CompareHs@",
                                                                 "@Sum1Aw@",  "@Sum1Nlw@",  "@Sum1Nl@" , "@Sum1Lqjδ@", "@CompareF1@",  "@Sum1NlΦA@",  "@LqjΦ@", "@CompareF2@",
                                                                 "@Sum1NK@",  "@Sum1A@",  "@Sum1Pk@", "@Sum1fg@", "@Comparefg@"
                                                              };
                    ReplaceString(keys, data);
                }
                else if (template.Title == "单排小横杆在上立杆纵距la")
                {
                    WinWordControlEx.LoadWord(path);
                    string[] keys = new string[] {
                                                                "@pc1_1@" , "@pc1_2@" , "@pc1_3@" ,"@pc1_4@", "@pc1_5@", "@pc1_6@", "@pc1_7@", "@pc1_8@", "@pc1_9@", "@pc1_10@",
                                                                "@pc2_1@","@pc2_4@","@pc2_5@",
                                                                "@pc3_1@","@pc3_2@","@pc3_3@",
                                                                "@pc4_1@","@pc4_2@","@pc4_3@","@pc4_4@","@pc4_5@","@pc4_6@","@gk@",
                                                                "@pc5_1@","@pc5_2@","@pc5_3@",
                                                                "@pc6_1@","@pc6_2@","@pc6_4@",
                                                                "@pc7_1@","@μz@",
                                                                "@pc8_1@","@pc8_2@","@pc8_3@","@pc8_12@","@pc8_13@","@μs@",
                                                                "@pc9_1@","@pc9_2@","@pc9_3@","@pc9_4@","@pc9_5@",
                                                                 "@Sum2X1q2@" ,  "@Sum2X1dQ@",  "@Sum2X1xq@",  "@Sum2X2M@",  "@Sum2X2δ@",  "@Sum2X3V1@", "@Compare2X2δ@", "@Compare2X3V1@",
                                                                 "@Sum2D1Fk@",  "@Sum2D1F@",  "@Sum2D2Mmax@",  "@Sum2D2δ@",  "@Sum2D3V@", "@Compare2D2δ@", "@Compare2D3V@",
                                                                 "@Sum2KR@", "@Compare2K1R@",
                                                                 "@Sum1NG1@",  "@Sum1NG2@",  "@Sum1NG3@",  "@Sum1NG4@",  "@Sum1NG@",  "@Sum1NQ@",  "@Sum1Wk@",  "@Sum1YesN@",  "@Sum1NoN@",  "@Sum1MW@",
                                                                 "@LgU@",  "@LgL0@",  "@LgΦ@",  "@Sum1Noδ@", "@CompareNoδ@", "@Sum1Yesδ@", "@CompareYesδ@",
                                                                 "@Sum1NG2K@",  "@Sum1Mwk@" , "@Sum1NoHs@",  "@Sum1YesHs@", "@CompareHs@",
                                                                 "@Sum1Aw@",  "@Sum1Nlw@",  "@Sum1Nl@" , "@Sum1Lqjδ@", "@CompareF1@",  "@Sum1NlΦA@",  "@LqjΦ@", "@CompareF2@",
                                                                 "@Sum1NK@",  "@Sum1A@",  "@Sum1Pk@", "@Sum1fg@", "@Comparefg@"
                                                              };
                    ReplaceString(keys, data);
                }
                #endregion
                #region 门式
                else if (template.Title == "门式钢管脚手架(扣件连接)")
                {
                    //WinWordControlEx.LoadWord(path);
                    string[] keys = new string[] {"@k@",  "@MF@","@weightMF@", "@h0@", "@h1@", "@h2@", "@b@", "@b1@", "@r1@", "@r2@", "@r3@", "@r4@", "@i1@", "@I2@" , "@A@", "@A1@",
                                                                 "@pc12_5@", "@pc12_6@", "@pc12_7@", "@pc12_5@", "@pc12_8@", "@pc12_92" ,
                                                                 "@pc13_1@",  "@pc13_2@",  "@pc13_3@",  "@pc13_4@",  "@pc13_7@", "@pc13_8@",
                                                                  "@pc14_1@", "@pc14_2@", "@weightSPJ@", "@pc14_3@", "@weightJSB@", "@NG1@", "@pc14_4@", "@pc14_5@", "@pc14_6@", "@NG2@", "@NG@",  "@pc14_7@", "@pc14_8@", "@pc14_9@",
                                                                  "@pc6_1@", "@pc6_2@", "@pc6_4@",  "@pc7_1@", "@μz@",
                                                                  "@μs@", "@pc15_5@", "@pc15_6@", "@pc15_7@", "@pc15_8@", "@pc15_9@",
                                                                   "@SumNQ@", "@SumN1@" ,"@SumWk@", "@SumQk@", "@SumN2@", "@maxN@", "@SumΦ1@", "@SumNd@", "@ComparerNdN@",
                                                                    "@SumHd@", "@SumHdw@", "@SumHs@", "@ComparerHsH@",
                                                                    "@SumA@", "@SumP@", "@SumFg@", "@ComparerFgP@",
                                                                     "@SumNw@", "@SumNc@", "@SumΦ2@", "@SumNf@", "@ComparerLQJ@"
                                                                };
                    ReplaceString(keys, data);
                }
                else if (template.Title == "门式钢管脚手架(焊缝连接)")
                {
                    //WinWordControlEx.LoadWord(path);
                    string[] keys = new string[] { "@k@",  "@MF@", "@weightMF@", "@h0@", "@h1@", "@h2@", "@b@", "@b1@", "@r1@", "@r2@", "@r3@", "@r4@", "@i1@", "@I2@" , "@A@", "@A1@",
                                                                 "@pc12_5@", "@pc12_6@", "@pc12_7@", "@pc12_5@", "@pc12_8@", "@pc12_92" ,
                                                                 "@pc13_1@",  "@pc13_2@",  "@pc13_3@",  "@pc13_4@",  "@pc13_7@", "@pc13_8@",
                                                                  "@pc14_1@", "@pc14_2@", "@weightSPJ@", "@pc14_3@", "@weightJSB@", "@NG1@", "@pc14_4@", "@pc14_5@", "@pc14_6@", "@NG2@", "@NG@",  "@pc14_7@", "@pc14_8@", "@pc14_9@",
                                                                  "@pc6_1@", "@pc6_2@", "@pc6_4@",  "@pc7_1@", "@μz@",
                                                                  "@μs@", "@pc15_5@", "@pc15_6@", "@pc15_7@", "@pc15_8@", "@pc15_9@",
                                                                   "@SumNQ@", "@SumN1@" ,"@SumWk@", "@SumQk@", "@SumN2@", "@maxN@", "@SumΦ1@", "@SumNd@", "@ComparerNdN@",
                                                                    "@SumHd@", "@SumHdw@", "@SumHs@", "@ComparerHsH@",
                                                                    "@SumA@", "@SumP@", "@SumFg@", "@ComparerFgP@",
                                                                   "@SumNw@", "@SumNc@",  "@ComparerLQJ@"
                                                                };
                    ReplaceString(keys, data);
                }
                #endregion
                #region 碗扣
                else if (template.Title == "碗扣式脚手架")
                {
                    //WinWordControlEx.LoadWord(path);
                    string[] keys = new string[] {  "@pc5_1@","@pc5_2@","@pc5_3@","@pc5_4@",
                                                    "@pc6_1@","@pc6_2@","@pc6_4@", "@DbInput_Item6Uz@","@pc7_1@","@μz@",
                                                    "@pc9_1@","@pc9_2@","@pc9_3@","@pc9_4@","@pc9_5@","@Cb_Item9DJLX@",
                                                    "@pc16_1@",  "@pc16_2@",  "@pc16_3@",  "@pc16_4@",  "@pc16_5@",  "@pc16_6@",  "@pc16_7@",  "@pc16_8@",  "@pc16_9@",  "@pc16_10@",  "@pc16_11@",  "@pc16_12@",  "@pc16_13@",  "@pc16_14@",  "@pc16_15@",  "@pc16_1@",
                                                    "@pc17_1@", "@pc17_2@", "@pc17_3@", "@pc17_4@", "@pc17_5@", "@pc17_6@",  "@pc17_9@", "@pc17_10@", "@pc17_11@",
                                                    "@Gkzg@", "@Gkhg@", "@Gkjhg@", "@Gkl@","@Gkl3@", "@Gkwg@", "@Gksg@", "@Gklg@",
                                                    "@sum10Hq1@", "@sum10Hq2@", "@sum10HMmax@", "@sum10Hσ@", "@sum10HVmax@", "@sum10HVmin@","@compareHσ@", "@compareHVmaxVmin@", "@compareHτdb@","@sum10HR1@","@sum10HR2@","@sum10Hτdb@",
                                                    "@sum10Jq1@", "@sum10Jq2@", "@sum10JMmax@", "@sum10Jσ@", "@sum10JVmax@", "@sum10JVmin@", "@sum10JR1@", "@sum10JR2@", "@sum10Jτdb@","@compareJσ@","@compareJVmaxVmin@","@compareJτdb@",
                                                    "@sum10Zq1@", "@sum10Zq2@", "@sum10Zτdb1@", "@sum10Zτdb2@","@str10Zσ@", "@str10Zτdb1@", "@compareZσ@", "@compareZτdb1@", "@compareZτdb2@" ,
                                                    "@NG1k1@", "@NG1k2@", "@NG1k3@", "@NG1k4@", "@NG1k5@", "@NG1k6@", "@NG1k7@", "@sum10NG1k@","@NG2k1@", "@NG2k2@", "@NG2k3@", "@sum10NG2k@","@NQ1k@", "@sum10Nw1@", "@sum10Nw2@", "@sum10N1@", "@sum10N2@", "@sum10Wk@",
                                                    "@pcWk@", "@Wkλ@", "@WkNoφ@", "@sum10Noσ@", "@sum10Mw@" , "@sum10NE@","@sum10Yesσ@","@strWkλ@", "@compareWKNoσ@", "@compareWKYesσ@",
                                                    "@sum10Nc@", "@wkLqjφ@", "@sum10NcN0Ac@", "@wkLqjλ@","@strNcN0Ac@", "@compareNcN0Ac@", "@strNcN0@","@compareNcN0@",
                                                    "@sum10h@" ,"@compareSum10h@",
                                                    "@compareNN0@",
                                                    "@sum10Ag@","@sum10fg@","@compareWkfg@"};
                    ReplaceString(keys, data);
                    if (data[7].ToString() == "岩石" || data[7].ToString() == "混凝土")
                    {
                        WinWordControlEx.DeleteText("$2$", "$2$");
                        WinWordControlEx.Replace("$1$", "");
                    }
                    else
                    {
                        WinWordControlEx.DeleteText("$1$", "$1$");
                        WinWordControlEx.Replace("$2$", "");
                    }

                }
                #endregion
            }
            else if (@class.GetType().Equals(new Framework.Model.ScaffoldRecommendSelect().GetType()))//2.2 脚手架推荐选型
            {
                SelectTjSelf(template, array, @class, data);
            }
            else if (@class.GetType().Equals(new Framework.Model.ScaffoldSelfSelect().GetType()))//2.2脚手架自行选型
            {
                SelectTjSelf(template, array, @class, data);
            }
            else if (@class.GetType().Equals(new Framework.Model.ScaffoldSchematicDiagram().GetType()))//5脚手架绘图
            {
                WinWordControlEx.InsertPic("$1$", path);
                string[] keys = new string[] { "@1@", "$1$" };
                ReplaceString(keys, data);
            }
            else if (@class.GetType().Equals(new Framework.Model.ScaffoldAssessment().GetType()))//5脚手架绘图
            { }
            else if (@class.GetType().Equals(new Framework.Model.Formwork().GetType()))//板模板
            {
                if (template.Title == "板模板(工具式)")
                {
                    WinWordControlEx.LoadWord(path);
                    string[] keys = new string[] { "@fk1_1@","@fk1_2@","@fk1_3@","@fk1_4@","@fk1_5@","@fk1_6@","@fk1_7@","@fk1_8@","@fk1_9@","@fk1_10@",
                        "@fk1_11@","@fk1_12@","@fk1_13@","@fk1_13_2@","@fk1_14@","@fk2_1@","@fk2_2@","@fk2_3@","@fk2_4@","@fk2_5@","@fk3_1@","@fk3_2@",
                        "@fk3_3@","@fk3_4@","@fk3_5@","@fk3_6@","@fk3_7@","@fk3_8@","@fk3_9@","@fk3_10@","@fk4_1@","@fk4_2@","@fk4_3@","@fk4_4@","@fk4_5@",
                        "@fk4_6@","@fk4_7@","@fk4_8@","@fk4_9@","@fk4_10@","@fk5_1@","@fk5_2@","@fk5_3@","@fk5_4@","@fk5_5@","@fk5_6@","@fk5_7@","@fk5_8@",
                        "@fk5_9@","@fk5_10@","@fk5_11@","@fk5_12@","@fk5_13@","@fk5_14@","@fk5_15@","@fk5_16@","@fk5_17@","@fk7_1@","@fk7_2@","@fk7_3@",
                        "@fk7_4@","@fk7_5@","@fk7_6@","@fk7_7@","@fk8_1@","@fk8_2@","@fk8_3@","@fk8_4@","@fk8_5@","@fk8_6@","@fk8_7@","@fk8_8@","@fk8_9@",
                        "@fk8_10@","@fk8_11@","@sum1I@","@sum1W@","@sum1G1k@","@sum1G2k@","@sum1G3k@","@sum1Gk@","@sum1Q1k@","@sum1P@","@sum1q@","@sum1q11@",
                        "@sum1q22@","@sum1q1@","@sum1P1@","@sum1q2@","@sum1P2@","@sum1M@","@sum1MA@","@sum1MB1@","@sum1MB2@","@sum1σ@","@sum1ν@","@sum1ν2@",
                        "@compare1_1@","@compare1_2@","@sum2n@","@sum2min@","@sum2max@","@sum2G1k@","@sum2G2k@","@sum2G3k@","@sum2Gk@","@sum2Q1k@","@sum2P@",
                        "@sum2qa11@","@sum2qa12@","@sum2qa21@","@sum2qa22@","@sum2q1@","@sum2P1@","@sum2q2@","@sum2P2@","@sum2MA1@","@sum2MA2@","@sum2MB1@",
                        "@sum2MB2@","@sum2M@","@sum2σ@","@sum2VA1@","@sum2VA2@","@sum2VB1@","@sum2VB2@","@sum2V@","@sum2τ@","@sum2q@","@sum2kzν@","@sum2kzν2@",
                        "@sum2xbdν@","@sum2xbdν2@","@compare2_1@","@compare2_2@","@compare2_3@","@compare2_4@","@sum3G1k@","@sum3G2k@","@sum3G3k@","@sum3Gk@",
                        "@sum3Q1k@","@sum3q11@","@sum3q12@","@sum3q21@","@sum3q22@","@sum3F1@","@sum3F2@","@sum3FA@","@sum3FB@","@sum3q1@","@sum3q2@","@sum3n@",
                        "@sum3min@","@sum3M@","@sum3V@","@sum3ν@","@sum3σ@","@sum3τ@","@sum3ν2@","@compare3_1@","@compare3_2@","@compare3_3@","@sum4_1λ@",
                        "@sum4_1λ2@","@sum4_1φ@","@sum4_1G1k@","@sum4_1G2k@","@sum4_1G3k@","@sum4_1Gk@","@sum4_1Qk@","@sum4_1N@","@sum4_1NEX@","@sum4_1Mx@",
                        "@sum4_1f@","@sum4_1f2@","@sum4_2λ@","@sum4_2λ2@","@sum4_2φ@","@sum4_2G1k@","@sum4_2G2k@","@sum4_2G3k@","@sum4_2Gk@","@sum4_2Qk@",
                        "@sum4_2N@","@sum4_2f@","@sum4_2f2@","@compare4_1@","@compare4_2@","@compare4_3@","@compare4_4@","@sum5G1k@",
                        "@sum5G2k@","@sum5G3k@","@sum5Gk@","@sum5Qk@","@sum5N@","@sum5f@","@sum5fvb@","@sum5f2@","@sum5fcb@","@compare5_1@","@compare5_2@",
                        "@sum6N@","@compare6_1@","@sum7N@","@sum7p@","@compare7@" ,"@str2_τ@","@str3_τ@"};
                    ReplaceString(keys, data);
                }

            }
            else if (@class.GetType().Equals(new Framework.Model.BeamForm().GetType()))//梁模板
            {
                if (template.Title == "梁模板(碗扣)")
                {
                    WinWordControlEx.LoadWord(path);
                    string[] keys = new string[] {"@ZCJJ@", "@bf1_1@","@bf1_2@","@bf1_3@","@bf1_4@","@bf1_5@","@bf1_6@","@bf1_7@","@bf1_8@","@bf1_9@","@bf1_10@","@bf1_11@","@bf1_12@",
                        "@bf1_13@","@bf1_14@","@bf1_15@","@bf2_1@","@bf2_2@","@bf2_3@","@bf2_4@","@bf2_5@","@bf3_1@","@bf3_2@","@bf3_5@","@bf3_6@","@bf3_7@","@bf3_8@","@bf3_9@",
                        "@bf4_1@","@bf4_2@","@bf4_5@","@bf4_6@","@bf4_7@","@bf4_8@","@bf4_9@","@bf5_1@","@bf5_2@","@bf5_3@","@bf5_4@","@bf5_5@","@bf6_1@","@bf6_2@","@bf6_3@",
                        "@bf6_4@","@bf6_5@","@bf6_6@","@bf6_7@","@bf7_1@","@bf7_2@","@bf7_3@","@bf7_4@","@bf7_5@","@bf7_6@","@bf7_7@","@bf8_1@","@bf8_2@","@bf8_3@","@bf8_4@",
                        "@bf8_5@","@bf8_6@","@bf8_7@","@bf8_8@","@sum1I@","@sum1W@","@sum1h@","@sum1L@","@sum1q1@","@sum1q1J@","@sum1q1H@","@sum1q2@","@sum1Mmax@","@sum1σ@",
                        "@compare1_1@","@sum1vmax@","@sum1ν@","@compare1_2@","@sum1R1@","@sum1R2@","@sum1R3@","@sum1r1@","@sum1r2@","@sum1r3@","@sum2q1@","@sum2q2@","@sum2Mmax@",
                        "@sum2σ@","@compare2_1@","@sum2Vmax@","@str_xlcz@","@compare2_2@","@sum2ν1@","@sum2ν@","@compare2_3@","@sum2ν2@","@sum2ν_2@","@compare2_4@","@sum3G2k@",
                        "@sum3G3k@","@sum3Gk@","@sum3q1@","@sum3q2@","@sum3q@","@sum3l@","@sum3M@","@sum3W@","@sum3σ@","@compare3_1@","@sum3qN@","@sum3v@","@min@","@sum3ν@",
                        "@compare3_2@","@sum4λ@","@compare4_1@","@sum4φ@","@sum4G1k@","@sum4G2k@","@sum4G3k@","@sum4Gk@","@sum4Qk@","@sum4ωk@","@sum4Mw@","@sum4Nw@","@sum4f@",
                        "@compare4_2@","@sum5N@","@compare5_1@","@sum6p@","@compare6_1@","@result1_1@","@result1_2@" ,"@result2_1@" ,"@result2_2@" ,"@result3_1@" ,"@result3_2@" ,
                        "@result4_1@" ,"@result4_2@" ,"@result5_1@" ,"@result6_1@"};
                    ReplaceString(keys, data);
                }
                else if (template.Title == "梁模板(扣件)计算书")
                {
                    WinWordControlEx.LoadWord(path);
                    string[] keys = new string[] {"@ZCJJ@", "@bf1_1@","@bf1_2@","@bf1_3@","@bf1_4@","@bf1_5@","@bf1_6@","@bf1_7@","@bf1_8@","@bf1_9@","@bf1_10@","@bf1_11@","@bf1_12@",
                        "@bf1_13@","@bf1_14@","@bf1_15@","@bf1_18@","@bf1_19@","@bf2_1@","@bf2_2@","@bf2_3@","@bf2_4@","@bf2_5@","@bf3_1@","@bf3_2@","@bf3_5@","@bf3_6@","@bf3_7@","@bf3_8@","@bf3_9@",
                        "@bf4_1@","@bf4_2@","@bf4_5@","@bf4_6@","@bf4_7@","@bf4_8@","@bf4_9@","@bf5_1@","@bf5_2@","@bf5_3@","@bf5_4@","@bf5_5@","@bf6_1@","@bf6_2@","@bf6_3@",
                        "@bf6_4@","@bf6_5@","@bf6_6@","@bf6_7@","@bf7_1@","@bf7_2@","@bf7_3@","@bf7_4@","@bf7_5@","@bf7_6@","@bf7_7@","@bf8_1@","@bf8_2@","@bf8_3@","@bf8_4@",
                        "@bf8_5@","@bf8_6@","@bf8_7@","@bf8_8@","@bf8_9@","@sum1I@","@sum1W@","@sum1h@","@sum1L@","@sum1q1@","@sum1q1J@","@sum1q1H@","@sum1q2@","@sum1Mmax@","@sum1σ@",
                        "@compare1_1@","@sum1vmax@","@sum1ν@","@compare1_2@","@sum1R1@","@sum1R2@","@sum1R3@","@sum1r1@","@sum1r2@","@sum1r3@","@sum2q1@","@sum2q2@","@sum2Mmax@",
                        "@sum2σ@","@compare2_1@","@sum2Vmax@","@str_xlcz@","@compare2_2@","@sum2ν1@","@sum2ν@","@compare2_3@","@sum2ν2@","@sum2ν_2@","@compare2_4@","@sum3G2k@",
                        "@sum3G3k@","@sum3Gk@","@sum3q1@","@sum3q2@","@sum3q@","@sum3l@","@sum3M@","@sum3W@","@sum3σ@","@compare3_1@","@sum3qN@","@sum3v@","@min@","@sum3ν@",
                        "@compare3_2@","@sum4λ@","@compare4_1@","@sum4φ@","@sum4G1k@","@sum4G2k@","@sum4G3k@","@sum4Gk@","@sum4Qk@","@sum4ωk@","@sum4Mw@","@sum4Nw@","@sum4f@",
                        "@compare4_2@","@sum5N@","@compare5_1@","@sum6p@","@compare6_1@" };
                    ReplaceString(keys, data);
                }
                else if (template.Title == "梁测模板")
                {
                    WinWordControlEx.LoadWord(path);
                    string[] keys = new string[] {  "@lca_1@","@lca_2@","@lca_3@","@lca_4@","@lca_5@","@lca_6@","@lca_7@","@lca_8@","@lca_9@",
                        "@lca_10@","@lca_11@","@lca_12@","@lca_13@","@lca_14@","@lca_15@","@lca_16@","@lca_17@",
                        "@lca_18@","@lcb_1@","@lcb_2@","@lcb_3@","@lcb_4@","@lcb_5@","@lcb_6@","@lcb_7@","@lcb_8@",
                        "@lcb_9@","@lcc_1@","@lcc_2@","@lcc_3@","@lcc_4@","@lcc_5@","@lcc_6@","@lcc_7@","@lcc_8@",
                        "@lcc_9@","@lcd_1@","@lcd_2@","@lcd_3@","@lcd_4@","@lcd_5@","@lcd_6@","@lcd_7@","@lcd_8@",
                        "@lcd_9@","@lcd_10@","@lcd_11@","@lcd_12@","@lcd_13@","@sum1g4k@","@sum1ss@","@sum1sz@",
                        "@sum2w@","@sum2i@","@sum2q1@","@sum2q1j@","@sum2q1h@","@sum2m@","@sum26@","@sum2q@",
                        "@sum2vmax@","@sum2v@","@sum2rmax@","@sum2r1max@","@compare_mb1@","@compare_mb2@","@sum3q@",
                        "@sum3mmax@","@sum36@","@sum3vmax@","@sum3t@","@sum3v1max@","@sum31v1@","@sum3v2max@",
                        "@sum31v12@","@sum3rmax@","@sum3r1max@","@compare_xl1@","@compare_xl2@","@compare_xl3@",
                        "@compare_xl4@","@sum4i@","@sum4q@","@sum4m@","@sum4w@",
                        "@sum46@","@sum4f@","@sum4qn@","@sum4v@","@sum41v1@","@compare_zl1@",
                        "@compare_zl2@","@sum5n@","@sum5ntb@","@compare_dlls1@","@str_3t@"};
                    ReplaceString(keys, data);

                }
            }
            else if (@class.GetType().Equals(new Framework.Model.ComprehensiveEvaluation().GetType()))//综合评价
            {
                if (template.Title == "AHP和法")
                {
                    WinWordControlEx.LoadWord(path);
                    string[] keys = new string[]{"@u11@","@u12@","@u13@","@u14@","@u15@","@u21@","@u22@","@u23@","@u24@","@u25@","@u31@","@u32@","@u33@","@u34@","@u41@","@u42@",
                        "@u43@","@u44@","@u51@","@u52@","@u53@","@u54@","@u55@","@u61@","@u62@","@u63@","@u64@","@u65@","@u66@","@a12@","@a13@","@a14@","@a15@","@a16@","@a23@",
                        "@a24@","@a25@","@a26@","@a34@","@a35@","@a36@","@a45@","@a46@","@a56@","@a21@","@a31@","@a32@","@a41@","@a42@","@a43@","@a51@","@a52@","@a53@","@a54@",
                        "@a61@","@a62@","@a63@","@a64@","@a65@","@A1@","@A2@","@A3@","@A4@","@A5@","@A6@","@w1@","@w2@","@w3@","@w4@","@w5@","@w6@","@wa11@","@wa12@","@wa13@",
                        "@wa14@","@wa15@","@wa16@","@wa21@","@wa22@","@wa23@","@wa24@","@wa25@","@wa26@","@wa31@","@wa32@","@wa33@","@wa34@","@wa35@","@wa36@","@wa41@","@wa42@",
                        "@wa43@","@wa44@","@wa45@","@wa46@","@wa51@","@wa52@","@wa53@","@wa54@","@wa55@","@wa56@","@wa61@","@wa62@","@wa63@","@wa64@","@wa65@","@wa66@","@b12@",
                        "@b13@","@b14@","@b15@","@b21@","@b23@","@b24@","@b25@","@b31@","@b32@","@b34@","@b35@","@b41@","@b42@","@b43@","@b45@","@b51@","@b52@","@b53@","@b54@",
                        "@B1@","@B2@","@B3@","@B4@","@B5@","@Wb1@","@Wb2@","@Wb3@","@Wb4@","@Wb5@","@Cb@","@c12@","@c13@","@c14@","@c15@","@c21@","@c23@","@c24@","@c25@","@c31@",
                        "@c32@","@c34@","@c35@","@c41@","@c42@","@c43@","@c45@","@c51@","@c52@","@c53@","@c54@","@C1@","@C2@","@C3@","@C4@","@C5@","@Wc1@","@Wc2@","@Wc3@","@Wc4@",
                        "@Wc5@","@Cc@","@d12@","@d13@","@d14@","@d21@","@d23@","@d24@","@d31@","@d32@","@d34@","@d41@","@d42@","@d43@","@D1@","@D2@","@D3@","@D4@","@Wd1@","@Wd2@",
                        "@Wd3@","@Wd4@","@Cd@","@e12@","@e13@","@e14@","@e21@","@e23@","@e24@","@e31@","@e32@","@e34@","@e41@","@e42@","@e43@","@E1@","@E2@","@E3@","@E4@","@We1@",
                        "@We2@","@We3@","@We4@","@Ce@","@f12@","@f13@","@f14@","@f15@","@f21@","@f23@","@f24@","@f25@","@f31@","@f32@","@f34@","@f35@","@f41@","@f42@","@f43@","@f45@",
                        "@f51@","@f52@","@f53@","@f54@","@F1@","@F2@","@F3@","@F4@","@F5@","@Wf1@","@Wf2@","@Wf3@","@Wf4@","@Wf5@","@Cf@","@g12@","@g13@","@g14@","@g15@","@g16@",
                        "@g23@","@g24@","@g25@","@g26@","@g34@","@g35@","@g36@","@g45@","@g46@","@g56@","@g21@","@g31@","@g32@","@g41@","@g42@","@g43@","@g51@","@g52@","@g53@","@g54@",
                        "@g61@","@g62@","@g63@","@g64@","@g65@","@G1@","@G2@","@G3@","@G4@","@G5@","@G6@","@Wg1@","@Wg2@","@Wg3@","@Wg4@","@Wg5@","@Wg6@","@Cg@","@C@","@result@"};
                    ReplaceString(keys, data);
                }
                else if (template.Title == "AHP均值法")
                {
                    WinWordControlEx.LoadWord(path);
                    string[] keys = new string[]{"@u11@","@u12@","@u13@","@u14@","@u15@","@u21@","@u22@","@u23@","@u24@","@u25@","@u31@","@u32@","@u33@","@u34@","@u41@","@u42@",
                        "@u43@","@u44@","@u51@","@u52@","@u53@","@u54@","@u55@","@u61@","@u62@","@u63@","@u64@","@u65@","@u66@","@a12@","@a13@","@a14@","@a15@","@a16@","@a23@",
                        "@a24@","@a25@","@a26@","@a34@","@a35@","@a36@","@a45@","@a46@","@a56@","@a21@","@a31@","@a32@","@a41@","@a42@","@a43@","@a51@","@a52@","@a53@","@a54@",
                        "@a61@","@a62@","@a63@","@a64@","@a65@","@A1@","@A2@","@A3@","@A4@","@A5@","@A6@","@w1@","@w2@","@w3@","@w4@","@w5@","@w6@","@wa11@","@wa12@","@wa13@",
                        "@wa14@","@wa15@","@wa16@","@wa21@","@wa22@","@wa23@","@wa24@","@wa25@","@wa26@","@wa31@","@wa32@","@wa33@","@wa34@","@wa35@","@wa36@","@wa41@","@wa42@",
                        "@wa43@","@wa44@","@wa45@","@wa46@","@wa51@","@wa52@","@wa53@","@wa54@","@wa55@","@wa56@","@wa61@","@wa62@","@wa63@","@wa64@","@wa65@","@wa66@","@b12@",
                        "@b13@","@b14@","@b15@","@b21@","@b23@","@b24@","@b25@","@b31@","@b32@","@b34@","@b35@","@b41@","@b42@","@b43@","@b45@","@b51@","@b52@","@b53@","@b54@",
                        "@B1@","@B2@","@B3@","@B4@","@B5@","@Wb1@","@Wb2@","@Wb3@","@Wb4@","@Wb5@","@Cb@","@c12@","@c13@","@c14@","@c15@","@c21@","@c23@","@c24@","@c25@","@c31@",
                        "@c32@","@c34@","@c35@","@c41@","@c42@","@c43@","@c45@","@c51@","@c52@","@c53@","@c54@","@C1@","@C2@","@C3@","@C4@","@C5@","@Wc1@","@Wc2@","@Wc3@","@Wc4@",
                        "@Wc5@","@Cc@","@d12@","@d13@","@d14@","@d21@","@d23@","@d24@","@d31@","@d32@","@d34@","@d41@","@d42@","@d43@","@D1@","@D2@","@D3@","@D4@","@Wd1@","@Wd2@",
                        "@Wd3@","@Wd4@","@Cd@","@e12@","@e13@","@e14@","@e21@","@e23@","@e24@","@e31@","@e32@","@e34@","@e41@","@e42@","@e43@","@E1@","@E2@","@E3@","@E4@","@We1@",
                        "@We2@","@We3@","@We4@","@Ce@","@f12@","@f13@","@f14@","@f15@","@f21@","@f23@","@f24@","@f25@","@f31@","@f32@","@f34@","@f35@","@f41@","@f42@","@f43@","@f45@",
                        "@f51@","@f52@","@f53@","@f54@","@F1@","@F2@","@F3@","@F4@","@F5@","@Wf1@","@Wf2@","@Wf3@","@Wf4@","@Wf5@","@Cf@","@g12@","@g13@","@g14@","@g15@","@g16@",
                        "@g23@","@g24@","@g25@","@g26@","@g34@","@g35@","@g36@","@g45@","@g46@","@g56@","@g21@","@g31@","@g32@","@g41@","@g42@","@g43@","@g51@","@g52@","@g53@","@g54@",
                        "@g61@","@g62@","@g63@","@g64@","@g65@","@G1@","@G2@","@G3@","@G4@","@G5@","@G6@","@Wg1@","@Wg2@","@Wg3@","@Wg4@","@Wg5@","@Wg6@","@Cg@","@C@","@result@"};
                    ReplaceString(keys, data);
                }
            }
            else if (@class.GetType().Equals(new Framework.Model.LEC().GetType()))//LEC法
            {
                if (template.Title == "LEC")
                {
                    WinWordControlEx.LoadWord(path);
                    string[] keys = new string[] {"@D1_1@", "@D1_2@", "@D1_3@", "@D1_4@", "@D1_5@", "@D1_6@", "@D1_7@", "@D1_8@", "@D1_9@", "@D1_10@", "@D2_1@", "@D2_2@", "@D2_3@", "@D2_4@",
                        "@D2_5@", "@D2_6@", "@D2_7@", "@D2_8@", "@D3_1@", "@D3_2@", "@D3_3@", "@D3_4@", "@D4_1@", "@D4_2@", "@D5_1@", "@D5_2@", "@D5_3@", "@S1_1@", "@S1_2@", "@S1_3@", "@S1_4@",
                        "@S1_5@", "@S1_6@", "@S1_7@", "@S1_8@", "@S1_9@", "@S1_10@", "@S2_1@", "@S2_2@", "@S2_3@", "@S2_4@", "@S2_5@", "@S2_6@", "@S2_7@", "@S2_8@", "@S3_1@", "@S3_2@", "@S3_3@",
                        "@S3_4@", "@S4_1@", "@S4_2@", "@S5_1@", "@S5_2@", "@S5_3@" , "@L1_1@", "@L1_2@", "@L1_3@", "@L1_4@", "@L1_5@", "@L1_6@", "@L1_7@", "@L1_8@", "@L1_9@", "@L1_10@", "@E1_1@",
                        "@E1_2@", "@E1_3@", "@E1_4@", "@E1_5@", "@E1_6@", "@E1_7@", "@E1_8@", "@E1_9@", "@E1_10@", "@C1_1@", "@C1_2@", "@C1_3@", "@C1_4@", "@C1_5@", "@C1_6@", "@C1_7@", "@C1_8@",
                        "@C1_9@", "@C1_10@", "@L2_1@", "@L2_2@", "@L2_3@", "@L2_4@", "@L2_5@", "@L2_6@", "@L2_7@", "@L2_8@", "@E2_1@", "@E2_2@", "@E2_3@", "@E2_4@", "@E2_5@", "@E2_6@", "@E2_7@",
                        "@E2_8@", "@C2_1@", "@C2_2@", "@C2_3@", "@C2_4@", "@C2_5@", "@C2_6@", "@C2_7@", "@C2_8@", "@L3_1@", "@L3_2@", "@L3_3@", "@L3_4@", "@E3_1@", "@E3_2@", "@E3_3@", "@E3_4@",
                        "@C3_1@", "@C3_2@", "@C3_3@", "@C3_4@", "@L4_1@", "@L4_2@", "@E4_1@", "@E4_2@", "@C4_1@", "@C4_2@", "@L5_1@", "@L5_2@", "@L5_3@", "@E5_1@", "@E5_2@", "@E5_3@", "@C5_1@",
                        "@C5_2@", "@C5_3@"};
                    ReplaceString(keys, data);
                }
            }
            else if (@class.GetType().Equals(new Framework.Model.FromSelect().GetType()))//模板选择
            {
                if (template.Title == "模板选择")
                {
                    SelectTjSelf(template, array, @class, data);
                    //WinWordControlEx.LoadWord(path);
                    string[] keys = new string[] { "@data1_1@", "@data1_2@", "@data1_3@", "@data1_4@", "@str1_1@", "@data2_1@", "@data2_2@", "@data2_3@", "@data2_4@", "@str2_1@" };
                    ReplaceString(keys, data);

                }
            }
            else if (@class.GetType().Equals(new Framework.Model.Conretestrength1().GetType()))//混凝土取样
            {

                if (template.Title == "混凝土取样")
                {
                    SelectTjSelf(template, array, @class, data);

                }
            }
            else if (@class.GetType().Equals(new Framework.Model.ConcreteMeasure().GetType()))//混凝土强度测定
            {

                if (template.Title == "混凝土强度测定")
                {
                    SelectTjSelf(template, array, @class, data);

                }
            }
            else if (@class.GetType().Equals(new Framework.Model.FoundationPouring().GetType()))//混凝土基础浇筑
            {

                if (template.Title == "混凝土基础浇筑")
                {
                    SelectTjSelf(template, array, @class, data);

                }
            }
            else if (@class.GetType().Equals(new Framework.Model.Kjjg().GetType()))//混凝土主体浇筑
            {

                if (template.Title == "混凝土主体浇筑")
                {
                    SelectTjSelf(template, array, @class, data);

                }
            }
            else if (@class.GetType().Equals(new Framework.Model.hntzd1().GetType()))//混凝土振捣
            {

                if (template.Title == "混凝土振捣")
                {
                    SelectTjSelf(template, array, @class, data);

                }
            }
            else if (@class.GetType().Equals(new Framework.Model.ConcreteConstructionMachinery().GetType()))//混凝土施工机械选择
            {

                if (template.Title == "混凝土施工机械选择")
                {
                    SelectTjSelf(template, array, @class, data);

                }
            }
            else if (@class.GetType().Equals(new Framework.Model.Concretemaintain().GetType()))//混凝土试块的制作与养护
            {
                if (template.Title == "混凝土试块的制作与养护")
                {
                    WinWordControlEx.LoadWord(path);
                    string[] keys = new string[] { "@str1@", "@str2@", "@str3@", "@str4@", "@str5@", "@str6@", "@str7@", "@str8@" };
                    ReplaceString(keys, data);
                }
            }

            WinWordControlEx.MoveToTop();
        }
Пример #31
0
        private void CreateModule(Framework.Entity.Template template, System.Collections.ArrayList array, object @class, object[] data)
        {
            path = WinWordControlEx.RandomPath;

            WinWordControlEx.CreateTempFile(template.Content, path);

            if (@class.GetType().Equals(new Framework.Model.InsertTextPileProject().GetType()))
            {
                WinWordControlEx.LoadWord(path);

                #region //选顶某“桩基工程”后,与其对应的内容自动生成在文档中的相应位置。
                string NewWord = "$1$";
                for (int i = 0; i < System.Convert.ToInt16(data[7].ToString()) - 1; i++)//data[7] = count,通过data[7].ToString()确定选择的工程的数目,从而确定需要几个“$1$”符
                {
                    NewWord += "\n$1$";//每添加一种工程,模板文档中就多添加一个“$1$”符号
                }
                WinWordControlEx.Replace("$1$", NewWord);//调用的是Replace(string strOldText,string strNewText, string path)

                for (int i = 0; i < System.Convert.ToInt16(data[7].ToString()); i++)//用文字图标等内容,把文档中的“$1$”替换掉
                {
                    tempInsertText = contentService.GetTemplateByTitle(data[i].ToString());
                    WinWordControlEx.Replace(tempInsertText.Content, "$1$");//调用的是Replace(byte[] buffByte, string strOldText, string path)
                }
                #endregion

            }
            else if (@class.GetType().Equals(new Framework.Model.InsertTextWinterMeasure().GetType()))
            {
                WinWordControlEx.LoadWord(path);

                #region //选出“工程”后,与其对应的内容自动生成在文档中的相应位置。
                string NewWord = "$1$";
                for (int i = 0; i < System.Convert.ToInt16(data[7].ToString()) - 1; i++)//data[7] = count,通过data[7].ToString()确定选择的工程的数目,从而确定需要几个“$1$”符
                {
                    NewWord += "\n$1$";//每添加一种工程,模板文档中就多添加一个“$1$”符号
                }
                WinWordControlEx.Replace("$1$", NewWord, path);//调用的是Replace(string strOldText,string strNewText, string path)

                for (int i = 0; i < System.Convert.ToInt16(data[7].ToString()); i++)//用文字图标等内容,把文档中的“$1$”替换掉
                {
                    tempInsertText = contentService.GetTemplateByTitle(data[i].ToString());
                    WinWordControlEx.Replace(tempInsertText.Content, "$1$");//调用的是Replace(byte[] buffByte, string strOldText, string path)
                }
                #endregion

            }
            else if (@class.GetType().Equals(new Framework.Model.InsertTextWinterMaintain().GetType()))
            {
                WinWordControlEx.LoadWord(path);
                #region //选出“工程”后,与其对应的内容自动生成在文档中的相应位置。
                string NewWord = "$1$";
                for (int i = 0; i < System.Convert.ToInt16(data[2].ToString()) - 1; i++)//data[3] = count,通过data[7].ToString()确定选择的工程的数目,从而确定需要几个“$1$”符
                {
                    NewWord += "\n$1$";//每添加一种工程,模板文档中就多添加一个“$1$”符号
                }
                WinWordControlEx.Replace("$1$", NewWord, path);//调用的是Replace(string strOldText,string strNewText, string path)

                for (int i = 0; i < System.Convert.ToInt16(data[2].ToString()); i++)//用文字图标等内容,把文档中的“$1$”替换掉
                {
                    tempInsertText = contentService.GetTemplateByTitle(data[i].ToString());
                    WinWordControlEx.Replace(tempInsertText.Content, "$1$");//调用的是Replace(byte[] buffByte, string strOldText, string path)
                }
                #endregion

            }
            else if (@class.GetType().Equals(new Framework.Model.InsertTextRoof().GetType()))
            {
                #region //确定有多少出要替换
                string NewWord = "$1$";
                for (int i = 0; i < System.Convert.ToInt16(data[8].ToString()) - 1; i++)//data[8] = count,通过data[8].ToString()确定选择的工程的数目,从而确定需要几个“$1$”符
                {
                    NewWord += "\n$1$";//每添加一种工程,模板文档中就多添加一个“$1$”符号
                }
                WinWordControlEx.Replace("$1$", NewWord, path);//调用的是Replace(string strOldText,string strNewText, string path)

                NewWord = "$2$";
                for (int i = 0; i < System.Convert.ToInt16(data[9].ToString()) - 1; i++)
                {
                    NewWord += "\n$2$";
                }
                WinWordControlEx.Replace("$2$", NewWord, path);

                NewWord = "$3$";
                for (int i = 0; i < System.Convert.ToInt16(data[9].ToString()) - 1; i++)
                {
                    NewWord += "\n$3$";
                }
                WinWordControlEx.Replace("$3$", NewWord, path);
                #endregion

                #region//替换文字
                for (int i = 0; i < System.Convert.ToInt16(data[8].ToString()); i++)
                {
                    tempInsertText = contentService.GetTemplateByTitle(data[i].ToString());
                    WinWordControlEx.Replace(tempInsertText.Content, "$1$");//调用的是Replace(byte[] buffByte, string strOldText, string path)
                }

                for (int i = 0; i < System.Convert.ToInt16(data[9].ToString()); i++)
                {
                    tempInsertText = contentService.GetTemplateByTitle(data[i + 4].ToString());
                    WinWordControlEx.Replace(tempInsertText.Content, "$2$");
                }
                for (int i = 0; i < System.Convert.ToInt16(data[10].ToString()); i++)
                {
                    tempInsertText = contentService.GetTemplateByTitle(data[i + 6].ToString());
                    WinWordControlEx.Replace(tempInsertText.Content, "$3$");
                }
                #endregion

                WinWordControlEx.LoadWord(path);
            }
        }
Пример #32
0
        private void Btn_CESubmit_Click(object sender, EventArgs e)
        {
            Framework.Entity.Template item = new Framework.Entity.Template();
            string itemtext = "LEC";

            object[] obj = new object[] { };


            double[] LEC_L = new double[] { 10, 6, 3, 1, 0.5, 0.2, 0.1 };
            double[] LEC_E = new double[] { 10, 6, 3, 2, 1, 0.5 };
            double[] LEC_C = new double[] { 100, 40, 15, 7, 3, 1 };

            //高处坠落 U1
            double D1_1, D1_2, D1_3, D1_4, D1_5, D1_6, D1_7, D1_8, D1_9, D1_10;
            string S1_1, S1_2, S1_3, S1_4, S1_5, S1_6, S1_7, S1_8, S1_9, S1_10;

            double L1_1, L1_2, L1_3, L1_4, L1_5, L1_6, L1_7, L1_8, L1_9, L1_10,
                   E1_1, E1_2, E1_3, E1_4, E1_5, E1_6, E1_7, E1_8, E1_9, E1_10,
                   C1_1, C1_2, C1_3, C1_4, C1_5, C1_6, C1_7, C1_8, C1_9, C1_10;

            L1_1  = LEC_L[cB_U1_a1L.SelectedIndex];
            L1_2  = LEC_L[cB_U1_a2L.SelectedIndex];
            L1_3  = LEC_L[cB_U1_a3L.SelectedIndex];
            L1_4  = LEC_L[cB_U1_a4L.SelectedIndex];
            L1_5  = LEC_L[cB_U1_a5L.SelectedIndex];
            L1_6  = LEC_L[cB_U1_a6L.SelectedIndex];
            L1_7  = LEC_L[cB_U1_a7L.SelectedIndex];
            L1_8  = LEC_L[cB_U1_a8L.SelectedIndex];
            L1_9  = LEC_L[cB_U1_a9L.SelectedIndex];
            L1_10 = LEC_L[cB_U1_a10L.SelectedIndex];

            E1_1  = LEC_E[cB_U1_a1E.SelectedIndex];
            E1_2  = LEC_E[cB_U1_a2E.SelectedIndex];
            E1_3  = LEC_E[cB_U1_a3E.SelectedIndex];
            E1_4  = LEC_E[cB_U1_a4E.SelectedIndex];
            E1_5  = LEC_E[cB_U1_a5E.SelectedIndex];
            E1_6  = LEC_E[cB_U1_a6E.SelectedIndex];
            E1_7  = LEC_E[cB_U1_a7E.SelectedIndex];
            E1_8  = LEC_E[cB_U1_a8E.SelectedIndex];
            E1_9  = LEC_E[cB_U1_a9E.SelectedIndex];
            E1_10 = LEC_E[cB_U1_a10E.SelectedIndex];

            C1_1  = LEC_C[cB_U1_a1C.SelectedIndex];
            C1_2  = LEC_C[cB_U1_a2C.SelectedIndex];
            C1_3  = LEC_C[cB_U1_a3C.SelectedIndex];
            C1_4  = LEC_C[cB_U1_a4C.SelectedIndex];
            C1_5  = LEC_C[cB_U1_a5C.SelectedIndex];
            C1_6  = LEC_C[cB_U1_a6C.SelectedIndex];
            C1_7  = LEC_C[cB_U1_a7C.SelectedIndex];
            C1_8  = LEC_C[cB_U1_a8C.SelectedIndex];
            C1_9  = LEC_C[cB_U1_a9C.SelectedIndex];
            C1_10 = LEC_C[cB_U1_a10C.SelectedIndex];

            D1_1  = LEC_L[cB_U1_a1L.SelectedIndex] * LEC_E[cB_U1_a1E.SelectedIndex] * LEC_C[cB_U1_a1C.SelectedIndex];
            D1_2  = LEC_L[cB_U1_a2L.SelectedIndex] * LEC_E[cB_U1_a2E.SelectedIndex] * LEC_C[cB_U1_a2C.SelectedIndex];
            D1_3  = LEC_L[cB_U1_a3L.SelectedIndex] * LEC_E[cB_U1_a3E.SelectedIndex] * LEC_C[cB_U1_a3C.SelectedIndex];
            D1_4  = LEC_L[cB_U1_a4L.SelectedIndex] * LEC_E[cB_U1_a4E.SelectedIndex] * LEC_C[cB_U1_a4C.SelectedIndex];
            D1_5  = LEC_L[cB_U1_a5L.SelectedIndex] * LEC_E[cB_U1_a5E.SelectedIndex] * LEC_C[cB_U1_a5C.SelectedIndex];
            D1_6  = LEC_L[cB_U1_a6L.SelectedIndex] * LEC_E[cB_U1_a6E.SelectedIndex] * LEC_C[cB_U1_a6C.SelectedIndex];
            D1_7  = LEC_L[cB_U1_a7L.SelectedIndex] * LEC_E[cB_U1_a7E.SelectedIndex] * LEC_C[cB_U1_a7C.SelectedIndex];
            D1_8  = LEC_L[cB_U1_a8L.SelectedIndex] * LEC_E[cB_U1_a8E.SelectedIndex] * LEC_C[cB_U1_a8C.SelectedIndex];
            D1_9  = LEC_L[cB_U1_a9L.SelectedIndex] * LEC_E[cB_U1_a9E.SelectedIndex] * LEC_C[cB_U1_a9C.SelectedIndex];
            D1_10 = LEC_L[cB_U1_a10L.SelectedIndex] * LEC_E[cB_U1_a10E.SelectedIndex] * LEC_C[cB_U1_a10C.SelectedIndex];

            S1_1  = level(D1_1);
            S1_2  = level(D1_2);
            S1_3  = level(D1_3);
            S1_4  = level(D1_4);
            S1_5  = level(D1_5);
            S1_6  = level(D1_6);
            S1_7  = level(D1_7);
            S1_8  = level(D1_8);
            S1_9  = level(D1_9);
            S1_10 = level(D1_10);

            //坍塌U2
            double D2_1, D2_2, D2_3, D2_4, D2_5, D2_6, D2_7, D2_8;
            string S2_1, S2_2, S2_3, S2_4, S2_5, S2_6, S2_7, S2_8;

            double L2_1, L2_2, L2_3, L2_4, L2_5, L2_6, L2_7, L2_8,
                   E2_1, E2_2, E2_3, E2_4, E2_5, E2_6, E2_7, E2_8,
                   C2_1, C2_2, C2_3, C2_4, C2_5, C2_6, C2_7, C2_8;

            L2_1 = LEC_L[cB_U2_a1L.SelectedIndex];
            L2_2 = LEC_L[cB_U2_a2L.SelectedIndex];
            L2_3 = LEC_L[cB_U2_a3L.SelectedIndex];
            L2_4 = LEC_L[cB_U2_a4L.SelectedIndex];
            L2_5 = LEC_L[cB_U2_a5L.SelectedIndex];
            L2_6 = LEC_L[cB_U2_a6L.SelectedIndex];
            L2_7 = LEC_L[cB_U2_a7L.SelectedIndex];
            L2_8 = LEC_L[cB_U2_a8L.SelectedIndex];

            E2_1 = LEC_E[cB_U2_a1E.SelectedIndex];
            E2_2 = LEC_E[cB_U2_a2E.SelectedIndex];
            E2_3 = LEC_E[cB_U2_a3E.SelectedIndex];
            E2_4 = LEC_E[cB_U2_a4E.SelectedIndex];
            E2_5 = LEC_E[cB_U2_a5E.SelectedIndex];
            E2_6 = LEC_E[cB_U2_a6E.SelectedIndex];
            E2_7 = LEC_E[cB_U2_a7E.SelectedIndex];
            E2_8 = LEC_E[cB_U2_a8E.SelectedIndex];

            C2_1 = LEC_C[cB_U2_a1C.SelectedIndex];
            C2_2 = LEC_C[cB_U2_a2C.SelectedIndex];
            C2_3 = LEC_C[cB_U2_a3C.SelectedIndex];
            C2_4 = LEC_C[cB_U2_a4C.SelectedIndex];
            C2_5 = LEC_C[cB_U2_a5C.SelectedIndex];
            C2_6 = LEC_C[cB_U2_a6C.SelectedIndex];
            C2_7 = LEC_C[cB_U2_a7C.SelectedIndex];
            C2_8 = LEC_C[cB_U2_a8C.SelectedIndex];

            D2_1 = LEC_L[cB_U2_a1L.SelectedIndex] * LEC_E[cB_U2_a1E.SelectedIndex] * LEC_C[cB_U2_a1C.SelectedIndex];
            D2_2 = LEC_L[cB_U2_a2L.SelectedIndex] * LEC_E[cB_U2_a2E.SelectedIndex] * LEC_C[cB_U2_a2C.SelectedIndex];
            D2_3 = LEC_L[cB_U2_a3L.SelectedIndex] * LEC_E[cB_U2_a3E.SelectedIndex] * LEC_C[cB_U2_a3C.SelectedIndex];
            D2_4 = LEC_L[cB_U2_a4L.SelectedIndex] * LEC_E[cB_U2_a4E.SelectedIndex] * LEC_C[cB_U2_a4C.SelectedIndex];
            D2_5 = LEC_L[cB_U2_a5L.SelectedIndex] * LEC_E[cB_U2_a5E.SelectedIndex] * LEC_C[cB_U2_a5C.SelectedIndex];
            D2_6 = LEC_L[cB_U2_a6L.SelectedIndex] * LEC_E[cB_U2_a6E.SelectedIndex] * LEC_C[cB_U2_a6C.SelectedIndex];
            D2_7 = LEC_L[cB_U2_a7L.SelectedIndex] * LEC_E[cB_U2_a7E.SelectedIndex] * LEC_C[cB_U2_a7C.SelectedIndex];
            D2_8 = LEC_L[cB_U2_a8L.SelectedIndex] * LEC_E[cB_U2_a8E.SelectedIndex] * LEC_C[cB_U2_a8C.SelectedIndex];


            S2_1 = level(D2_1);
            S2_2 = level(D2_2);
            S2_3 = level(D2_3);
            S2_4 = level(D2_4);
            S2_5 = level(D2_5);
            S2_6 = level(D2_6);
            S2_7 = level(D2_7);
            S2_8 = level(D2_8);

            //物体打击U3
            double D3_1, D3_2, D3_3, D3_4;
            string S3_1, S3_2, S3_3, S3_4;

            double L3_1, L3_2, L3_3, L3_4,
                   E3_1, E3_2, E3_3, E3_4,
                   C3_1, C3_2, C3_3, C3_4;

            L3_1 = LEC_L[cB_U3_a1L.SelectedIndex];
            L3_2 = LEC_L[cB_U3_a2L.SelectedIndex];
            L3_3 = LEC_L[cB_U3_a3L.SelectedIndex];
            L3_4 = LEC_L[cB_U3_a4L.SelectedIndex];

            E3_1 = LEC_E[cB_U3_a1E.SelectedIndex];
            E3_2 = LEC_E[cB_U3_a2E.SelectedIndex];
            E3_3 = LEC_E[cB_U3_a3E.SelectedIndex];
            E3_4 = LEC_E[cB_U3_a4E.SelectedIndex];

            C3_1 = LEC_C[cB_U3_a1C.SelectedIndex];
            C3_2 = LEC_C[cB_U3_a2C.SelectedIndex];
            C3_3 = LEC_C[cB_U3_a3C.SelectedIndex];
            C3_4 = LEC_C[cB_U3_a4C.SelectedIndex];

            D3_1 = LEC_L[cB_U3_a1L.SelectedIndex] * LEC_E[cB_U3_a1E.SelectedIndex] * LEC_C[cB_U3_a1C.SelectedIndex];
            D3_2 = LEC_L[cB_U3_a2L.SelectedIndex] * LEC_E[cB_U3_a2E.SelectedIndex] * LEC_C[cB_U3_a2C.SelectedIndex];
            D3_3 = LEC_L[cB_U3_a3L.SelectedIndex] * LEC_E[cB_U3_a3E.SelectedIndex] * LEC_C[cB_U3_a3C.SelectedIndex];
            D3_4 = LEC_L[cB_U3_a4L.SelectedIndex] * LEC_E[cB_U3_a4E.SelectedIndex] * LEC_C[cB_U3_a4C.SelectedIndex];

            S3_1 = level(D3_1);
            S3_2 = level(D3_2);
            S3_3 = level(D3_3);
            S3_4 = level(D3_4);

            //火灾U4
            double D4_1, D4_2;
            string S4_1, S4_2;

            double L4_1, L4_2,
                   E4_1, E4_2,
                   C4_1, C4_2;

            L4_1 = LEC_L[cB_U4_a1L.SelectedIndex];
            L4_2 = LEC_L[cB_U4_a2L.SelectedIndex];

            E4_1 = LEC_E[cB_U4_a1E.SelectedIndex];
            E4_2 = LEC_E[cB_U4_a2E.SelectedIndex];

            C4_1 = LEC_C[cB_U4_a1C.SelectedIndex];
            C4_2 = LEC_C[cB_U4_a2C.SelectedIndex];


            D4_1 = LEC_L[cB_U4_a1L.SelectedIndex] * LEC_E[cB_U4_a1E.SelectedIndex] * LEC_C[cB_U4_a1C.SelectedIndex];
            D4_2 = LEC_L[cB_U4_a2L.SelectedIndex] * LEC_E[cB_U4_a2E.SelectedIndex] * LEC_C[cB_U4_a2C.SelectedIndex];

            S4_1 = level(D4_1);
            S4_2 = level(D4_2);

            //触电U5
            double D5_1, D5_2, D5_3;
            string S5_1, S5_2, S5_3;

            double L5_1, L5_2, L5_3,
                   E5_1, E5_2, E5_3,
                   C5_1, C5_2, C5_3;

            L5_1 = LEC_L[cB_U5_a1L.SelectedIndex];
            L5_2 = LEC_L[cB_U5_a2L.SelectedIndex];
            L5_3 = LEC_L[cB_U5_a3L.SelectedIndex];

            E5_1 = LEC_E[cB_U5_a1E.SelectedIndex];
            E5_2 = LEC_E[cB_U5_a2E.SelectedIndex];
            E5_3 = LEC_E[cB_U5_a3E.SelectedIndex];

            C5_1 = LEC_C[cB_U5_a1C.SelectedIndex];
            C5_2 = LEC_C[cB_U5_a2C.SelectedIndex];
            C5_3 = LEC_C[cB_U5_a3C.SelectedIndex];

            D5_1 = LEC_L[cB_U5_a1L.SelectedIndex] * LEC_E[cB_U5_a1E.SelectedIndex] * LEC_C[cB_U5_a1C.SelectedIndex];
            D5_2 = LEC_L[cB_U5_a2L.SelectedIndex] * LEC_E[cB_U5_a2E.SelectedIndex] * LEC_C[cB_U5_a2C.SelectedIndex];
            D5_3 = LEC_L[cB_U5_a3L.SelectedIndex] * LEC_E[cB_U5_a3E.SelectedIndex] * LEC_C[cB_U5_a3C.SelectedIndex];

            S5_1 = level(D5_1);
            S5_2 = level(D5_2);
            S5_3 = level(D5_3);



            obj = new object[] { D1_1, D1_2, D1_3, D1_4, D1_5, D1_6, D1_7, D1_8, D1_9, D1_10, D2_1, D2_2, D2_3, D2_4,
                                 D2_5, D2_6, D2_7, D2_8, D3_1, D3_2, D3_3, D3_4, D4_1, D4_2, D5_1, D5_2, D5_3, S1_1, S1_2, S1_3, S1_4,
                                 S1_5, S1_6, S1_7, S1_8, S1_9, S1_10, S2_1, S2_2, S2_3, S2_4, S2_5, S2_6, S2_7, S2_8, S3_1, S3_2, S3_3,
                                 S3_4, S4_1, S4_2, S5_1, S5_2, S5_3, L1_1, L1_2, L1_3, L1_4, L1_5, L1_6, L1_7, L1_8, L1_9, L1_10, E1_1,
                                 E1_2, E1_3, E1_4, E1_5, E1_6, E1_7, E1_8, E1_9, E1_10, C1_1, C1_2, C1_3, C1_4, C1_5, C1_6, C1_7, C1_8,
                                 C1_9, C1_10, L2_1, L2_2, L2_3, L2_4, L2_5, L2_6, L2_7, L2_8, E2_1, E2_2, E2_3, E2_4, E2_5, E2_6, E2_7,
                                 E2_8, C2_1, C2_2, C2_3, C2_4, C2_5, C2_6, C2_7, C2_8, L3_1, L3_2, L3_3, L3_4, E3_1, E3_2, E3_3, E3_4,
                                 C3_1, C3_2, C3_3, C3_4, L4_1, L4_2, E4_1, E4_2, C4_1, C4_2, L5_1, L5_2, L5_3, E5_1, E5_2, E5_3, C5_1,
                                 C5_2, C5_3 };

            foreach (Framework.Entity.Template template in templateList)
            {
                if (itemtext == template.Title)
                {
                    item = template;
                    break;
                }
            }
            CreateModuleIntance(item, null, @class, obj);
            this.Close();
        }
Пример #33
0
 public FrmTemplate(bool _flag, Framework.Entity.Template _template)
 {
     InitializeComponent();
     flag     = _flag;
     template = _template;
 }
Пример #34
0
        private void BtnSubmit_Click(object sender, System.EventArgs e)
        {
            System.Collections.ArrayList array = new System.Collections.ArrayList();
            if (@class.GetType().Equals(new Framework.Model.ConstructPrepare().GetType()))
            {
                System.Collections.ArrayList array1 = new System.Collections.ArrayList();
                System.Collections.ArrayList array2 = new System.Collections.ArrayList();
                System.Collections.ArrayList array3 = new System.Collections.ArrayList();
                for (int i = 0; i < DataGridView1.Rows.Count; i++)
                {
                    array1.Add(new object[] { i + 1, DataGridView1.Rows[i].Cells[1].Value, DataGridView1.Rows[i].Cells[2].Value, DataGridView1.Rows[i].Cells[3].Value });
                }
                for (int i = 0; i < DataGridView2.Rows.Count; i++)
                {
                    array2.Add(new object[] { i + 1, DataGridView2.Rows[i].Cells[1].Value, DataGridView2.Rows[i].Cells[2].Value, DataGridView2.Rows[i].Cells[3].Value });
                }
                for (int i = 0; i < DataGridView3.Rows.Count; i++)
                {
                    array3.Add(new object[] { i + 1, DataGridView3.Rows[i].Cells[1].Value, DataGridView3.Rows[i].Cells[2].Value });
                }
                array.Add(array1);
                array.Add(array2);
                array.Add(array3);
            }

            #region//��ѡ�еĶ��꼾ʩ��������ӵ��ĵ�����Ӧλ��
            object[] data = new object[12];
            for (int i = 1; i <= 11; i++)
            {
                selectState[i] = 0;
            }
            int numLength = 0;//����ȷ��һ��ѡ���˼������͵Ľ��ּ�
            for (int i = 0; i < DataGridView2.Rows.Count; i++)
            {
                switch (DataGridView2.Rows[i].Cells[1].Value.ToString())
                {
                    case "�ֹ���ؽ��ּ�_�ڽ��ּ�": if (selectState[1] == 0) { selectState[1] = 1; numLength++; } break;
                    case "�ֹ���ؽ��ּ�_����ּ�": if (selectState[2] == 0) { selectState[2] = 1; numLength++; } break;
                    case "�ֹ���ؽ��ּ�_����������": if (selectState[3] == 0) { selectState[3] = 1; numLength++; } break;
                    case "���ʽ�ֹܽ��ּ�": if (selectState[4] == 0) { selectState[4] = 1; numLength++; } break;
                    case "��ʽ�ֹܽ��ּ�": if (selectState[5] == 0) { selectState[5] = 1; numLength++; } break;
                    case "��ʽ���ּ�": if (selectState[6] == 0) { selectState[6] = 1; numLength++; } break;
                    case "�ۼ�ʽ�ֹܽ��ּ�": if (selectState[7] == 0) { selectState[7] = 1; numLength++; } break;
                    case "��ǽ�������ּ�": if (selectState[8] == 0) { selectState[8] = 1; numLength++; } break;
                    case "�����������ּ�": if (selectState[9] == 0) { selectState[9] = 1; numLength++; } break;
                    case "������������ּ�": if (selectState[10] == 0) { selectState[10] = 1; numLength++; } break;
                    case "�ֹܿۼ����ý��ּ�": if (selectState[11] == 0) { selectState[11] = 1; numLength++; } break;
                }
            }
            int dataNum = 0;//�ô˱���ʵ�ֽ� data[] �����е��������δ��
            for (int i = 1; i <= 11; i++)
            {
                Framework.Entity.Template b = new Framework.Entity.Template();//����һ����ģ�塱���͵ı���
                b = (Framework.Entity.Template)templateList[i];
                if (selectState[i] == 1)//���ѡ����ijһ���ּܣ����䡰selectState[i]==1��,
                {
                    data[dataNum] = b.Title;
                    dataNum++;//ÿѡ��һ�����ּܣ���dataNum��ֵ�ͼ�һ
                    //object adata = b.Title;
                }
            }
            data[11] = numLength;//numLength����ֵ����ʾ����ѡ�еĽ��ּܵ����͵�����
            #endregion

            CreateModuleIntance(tempInsertText, array, @class, data);
            this.Close();
        }
Пример #35
0
        private void btnInsertPic_Click(object sender, EventArgs e)
        {
            Framework.Entity.Template item = new Framework.Entity.Template();
            string itemtext = "";
            switch(Cbx_choose.SelectedIndex)
            {
                case 0:itemtext = "��ؼ�����ͼ";break;
                case 1:itemtext = "��ؼ�ƽ��ͼ";break;
                case 2:itemtext = "��ؼ�����ͼ";break;
                case 3:itemtext = "���������ͼ";break;
                case 4:itemtext = "�����ƽ��ͼ";break;
                case 5:itemtext = "���������ͼ";break;
            }
            if (savePic)
            {
                imtemp.Save(System.Windows.Forms.Application.StartupPath + @"\temp.jpg");
                object[] obj = new object[] { itemtext, "" };

                foreach (Framework.Entity.Template template in templateList)
                {
                    if (itemtext == template.Title)
                    {
                        item = template;
                        break;
                    }
                }
                CreateModuleIntance(item, null, @class, obj);
                this.Close();
            }
            else
                MessageBox.Show("�������ɼ�ͼ���ٱ���");
        }
Пример #36
0
        public void Insert(object entity)
        {
            using (this.getConnection)
            {
                this.getConnection.Open();
                System.Data.IDbCommand cmd = this.getConnection.CreateCommand();
                cmd.CommandType = System.Data.CommandType.Text;
                object obj;
                switch (Framework.Class.PackageEntity.Dispatcher(entity))
                {
                case 1:
                    cmd.CommandText = "SELECT MAX(M_Id) + 1 FROM FW_Module";
                    obj             = cmd.ExecuteScalar();
                    Framework.Entity.Module module = (Framework.Entity.Module)entity;
                    module.Id       = System.Convert.ToInt32(obj == System.DBNull.Value ? 1 : obj);
                    cmd.CommandText = @"INSERT INTO FW_Module (M_Id,M_Title,M_Class,M_Pid,M_Level,M_Order,M_Image,M_Position) VALUES (@Id,@Title,@Class,@Pid,@Level,@Order,@Image,@Position)";
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Id", module.Id));
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Title", module.Title));
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Class", module.Class));
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Pid", module.Pid));
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Level", module.Level));
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Order", module.Order));
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Image", module.Image));
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Position", module.Position));
                    break;

                case 2:
                    cmd.CommandText = "SELECT MAX(R_Id) + 1 FROM FW_Role";
                    obj             = cmd.ExecuteScalar();
                    Framework.Entity.Role role = (Framework.Entity.Role)entity;
                    role.Id         = System.Convert.ToInt32(obj == System.DBNull.Value ? 1 : obj);
                    cmd.CommandText = @"INSERT INTO FW_Role (R_Id,R_Name,R_Mark,R_Modules) VALUES (@Id,@Name,@Mark,@Modules)";
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Id", role.Id));
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Name", role.Name));
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Mark", role.Mark));
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Modules", role.Modules));
                    break;

                case 3:
                    cmd.CommandText = "SELECT MAX(U_Id) + 1 FROM FW_User";
                    obj             = cmd.ExecuteScalar();
                    Framework.Entity.User user = (Framework.Entity.User)entity;
                    user.Id         = System.Convert.ToInt32(obj == System.DBNull.Value ? 1 : obj);
                    cmd.CommandText = @"INSERT INTO FW_User (U_Id,U_Name,U_Password,U_Roles) VALUES (@Id,@Name,@Password,@Roles)";
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Id", user.Id));
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Name", user.Name));
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Password", user.Password));
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Roles", user.Roles));
                    break;

                case 4:
                    cmd.CommandText = "SELECT MAX(C_Id) + 1 FROM CB_Chapter";
                    obj             = cmd.ExecuteScalar();
                    Framework.Entity.Chapter chapter = (Framework.Entity.Chapter)entity;
                    chapter.Id      = System.Convert.ToInt32(obj == System.DBNull.Value ? 1 : obj);
                    cmd.CommandText = @"INSERT INTO CB_Chapter (C_Id,C_Pid,C_Title,C_Description,C_State,M_Id,D_Id,C_Type) VALUES (@Id,@Pid,@Title,@Description,@State,@Module,@Model,@Type)";
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Id", chapter.Id));
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Pid", chapter.Pid));
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Title", chapter.Title));
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Description", chapter.Description));
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@State", chapter.State));
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Module", chapter.Module));
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Model", chapter.Model));
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Type", chapter.Type));
                    break;

                case 5:
                    cmd.CommandText = "SELECT MAX(T_Id) + 1 FROM CB_Template";
                    obj             = cmd.ExecuteScalar();
                    Framework.Entity.Template template = (Framework.Entity.Template)entity;
                    template.Id     = System.Convert.ToInt32(obj == System.DBNull.Value ? 1 : obj);
                    cmd.CommandText = @"INSERT INTO CB_Template (T_Id,T_Title,T_Key,C_Id,T_Content,T_State,T_Type) VALUES (@Id,@Title,@Key,@Chapter,@Content,@State,@Type)";
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Id", template.Id));
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Title", template.Title));
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Key", template.Key));
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Chapter", template.Chapter));
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Content", template.Content));
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@State", template.State));
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Type", template.Type));
                    break;

                case 6:
                    cmd.CommandText = "SELECT MAX(D_Id) + 1 FROM CB_Model";
                    obj             = cmd.ExecuteScalar();
                    Framework.Entity.Model model = (Framework.Entity.Model)entity;
                    model.Id        = System.Convert.ToInt32(obj == System.DBNull.Value ? 1 : obj);
                    cmd.CommandText = @"INSERT INTO CB_Model (D_Id,D_Name,D_Class,D_Description,D_State) VALUES (@Id,@Name,@Class,@Description,@State)";
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Id", model.Id));
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Name", model.Name));
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Class", model.Class));
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@Description", model.Description));
                    cmd.Parameters.Add(new System.Data.SQLite.SQLiteParameter("@State", model.State));
                    break;
                }
                cmd.ExecuteNonQuery();
                this.getConnection.Close();
            }
        }
Пример #37
0
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            #region  //��ȡģ�������
            string templatename = "�ۼ�ʽ�ֹܽ��ּܣ����+�����";
            Framework.Entity.Template templatetemp = new Framework.Entity.Template();
            System.Collections.ArrayList templateList = contentService.GetContentTemplateByTitle(chaptertemp.Title);
            foreach (Framework.Entity.Template template in templateList)
            {
                if (template.Title == templatename)
                {
                    templatetemp = template;
                    break;
                }
            }
            #endregion

            System.Collections.ArrayList array = new System.Collections.ArrayList();
            System.Collections.ArrayList array1 = new System.Collections.ArrayList();
            System.Collections.ArrayList array2 = new System.Collections.ArrayList();
            System.Collections.ArrayList array3= new System.Collections.ArrayList();
            System.Collections.ArrayList array4 = new System.Collections.ArrayList();
            for (int i = 0; i < Dgv_Recommend2Task.Rows.Count; i++)
            {
                if (Dgv_Recommend2Task.Rows[i].Cells[1].Value != null)
                {
                    array1.Add(new object[] { i + 1, Dgv_Recommend2Task.Rows[i].Cells[1].Value, Dgv_Recommend2Task.Rows[i].Cells[2].Value, Dgv_Recommend2Task.Rows[i].Cells[3].Value });
                }
            }
            for (int i = 0; i < Dgv_Recommend2Material.Rows.Count; i++)
            {
                if (Dgv_Recommend2Material.Rows[i].Cells[1].Value != null)
                {
                    array2.Add(new object[] { i + 1, Dgv_Recommend2Material.Rows[i].Cells[1].Value, Dgv_Recommend2Material.Rows[i].Cells[2].Value, Dgv_Recommend2Material.Rows[i].Cells[3].Value });
                }
            }
            for (int i = 0; i < Dgv_Recommend2Labor.Rows.Count; i++)
            {
                if (Dgv_Recommend2Labor.Rows[i].Cells[1].Value != null)
                {
                    array3.Add(new object[] { i + 1, Dgv_Recommend2Labor.Rows[i].Cells[1].Value, Dgv_Recommend2Labor.Rows[i].Cells[2].Value });
                }
            }
            for (int i = 0; i < Dgv_Recommend2Tool.Rows.Count; i++)
            {
                if (Dgv_Recommend2Tool.Rows[i].Cells[1].Value != null)
                {
                    array4.Add(new object[] { i + 1, Dgv_Recommend2Tool.Rows[i].Cells[1].Value, Dgv_Recommend2Tool.Rows[i].Cells[2].Value, Dgv_Recommend2Tool.Rows[i].Cells[3].Value });
                }
            }
            array.Add(array1);
            array.Add(array2);
            array.Add(array3);
            array.Add(array4);

            string textDxhg2 = "", textDxhg3 = "";
            string textLqj2 = "",  textLqj3 = "";
            if (Rdo_Item2DHG.Checked) { textDxhg2 = Rdo_Item2DHG.Text; }
            else if (Rdo_Item2XHG.Checked) { textDxhg2 = Rdo_Item2XHG.Text; }
            if (Rdo_Item2LBSK.Checked) { textLqj2 = Rdo_Item2LBSK.Text; }
            else if (Rdo_Item2SBSK.Checked) { textLqj2 = Rdo_Item2SBSK.Text; }
            if (Rdo_Item3DHG.Checked) { textDxhg3 = Rdo_Item3DHG.Text; }
             else if (Rdo_Item3XHG.Checked) { textDxhg3 = Rdo_Item3XHG.Text; }
            if (Rdo_Item3LBSK.Checked) { textLqj3 = Rdo_Item3LBSK.Text; }
             else if (Rdo_Item3SBSK.Checked) { textLqj3 = Rdo_Item3SBSK.Text; }

            object[] data = new object[] {IntInput_Item1DSBW1.Value ,  IntInput_Item1DSBW2.Value , IntInput_Item1DSGD.Value , Tb_Item2HJ.Text, Tb_Item2ZJ.Text, Tb_Item2BJ.Text, Tb_Item2NLGJWQ.Text, Tb_Item2XHGLDJQ.Text, textLqj2, textDxhg2 ,
                                             Cbx_Item3XGSPXTG.Text, Tb_Item3HJ.Text, Tb_Item3ZJ.Text, Tb_Item3BJ.Text, Tb_Item3NLGJWQ.Text, Tb_Item3XHGLDJQ.Text, textLqj3, textDxhg3 };

            CreateModuleIntance(templatetemp, array, @class, data);
            this.Close();
        }
Пример #38
0
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            #region  //��ȡģ�������
            object[] obj = new object[] { };
            Framework.Entity.Template item = new Framework.Entity.Template();
            string templatename = "������ȡ��";
            Framework.Entity.Template templatetemp = new Framework.Entity.Template();
            System.Collections.ArrayList templateList = contentService.GetContentTemplateByTitle(chaptertemp.Title);

            #endregion
            System.Collections.ArrayList array = new System.Collections.ArrayList();
            System.Collections.ArrayList array1 = new System.Collections.ArrayList();
            System.Collections.ArrayList array2 = new System.Collections.ArrayList();
            System.Collections.ArrayList array3= new System.Collections.ArrayList();
            System.Collections.ArrayList array4 = new System.Collections.ArrayList();
            System.Collections.ArrayList array5 = new System.Collections.ArrayList();
            System.Collections.ArrayList array6 = new System.Collections.ArrayList();
            System.Collections.ArrayList array7 = new System.Collections.ArrayList();
            System.Collections.ArrayList array8 = new System.Collections.ArrayList();
            if (X_Base.Columns.Count == 5)//����
            {

             for (int i = 0; i < X_Base.Rows.Count; i++)
             {
                if (X_Base.Rows[i].Cells[0].Value != null)
                {
                    array1.Add(new object[] {  X_Base.Rows[i].Cells[0].Value, X_Base.Rows[i].Cells[1].Value,
                        X_Base.Rows[i].Cells[2].Value, X_Base.Rows[i].Cells[3].Value });
                }
             }
            }
            if (X_Base.Columns.Count == 6)
            {

                for (int i = 0; i < X_Base.Rows.Count; i++)
                {
                    if (X_Base.Rows[i].Cells[0].Value != null)
                    {
                        array5.Add(new object[] {  X_Base.Rows[i].Cells[0].Value, X_Base.Rows[i].Cells[1].Value,
                        X_Base.Rows[i].Cells[2].Value, X_Base.Rows[i].Cells[3].Value,Convert.ToInt32(X_Base.Rows[i].Cells[4].Value) });
                    }
                }
            }

            if (X_Mainpart.Columns.Count == 6)//����
            {

                for (int i = 0; i < X_Mainpart.Rows.Count; i++)
                {
                    if (X_Mainpart.Rows[i].Cells[0].Value != null)
                    {
                        array2.Add(new object[] {  X_Mainpart.Rows[i].Cells[0].Value, X_Mainpart.Rows[i].Cells[1].Value,
                        X_Mainpart.Rows[i].Cells[2].Value, X_Mainpart.Rows[i].Cells[3].Value,X_Mainpart.Rows[i].Cells[4].Value });
                    }
                }
            }
            if (X_Mainpart.Columns.Count == 7)
            {

                for (int i = 0; i < X_Mainpart.Rows.Count; i++)
                {
                    if (X_Mainpart.Rows[i].Cells[0].Value != null)
                    {
                        array6.Add(new object[] {   X_Mainpart.Rows[i].Cells[0].Value, X_Mainpart.Rows[i].Cells[1].Value,
                        X_Mainpart.Rows[i].Cells[2].Value, X_Mainpart.Rows[i].Cells[3].Value,X_Mainpart.Rows[i].Cells[4].Value,
                            Convert.ToInt32(X_Mainpart.Rows[i].Cells[5].Value) });
                    }
                }
            }

            if (X_Concrete.Columns.Count == 4)//���ǻ�����
            {

                for (int i = 0; i < X_Concrete.Rows.Count; i++)
                {
                    if (X_Concrete.Rows[i].Cells[0].Value != null)
                    {
                        array3.Add(new object[] {  X_Concrete.Rows[i].Cells[0].Value, X_Concrete.Rows[i].Cells[1].Value,
                        X_Concrete.Rows[i].Cells[2].Value });
                    }
                }
            }
            if (X_Concrete.Columns.Count == 5)
            {

                for (int i = 0; i < X_Concrete.Rows.Count; i++)
                {
                    if (X_Concrete.Rows[i].Cells[0].Value != null)
                    {
                        array7.Add(new object[] {  X_Concrete.Rows[i].Cells[0].Value, X_Concrete.Rows[i].Cells[1].Value,
                        X_Concrete.Rows[i].Cells[2].Value,Convert.ToInt32(X_Concrete.Rows[i].Cells[3].Value) });
                    }
                }
            }

            if (X_Otherproject.Columns.Count == 5)//��������
            {

                for (int i = 0; i < X_Otherproject.Rows.Count; i++)
                {
                    if (X_Otherproject.Rows[i].Cells[0].Value != null)
                    {
                        array4.Add(new object[] {  X_Otherproject.Rows[i].Cells[0].Value, X_Otherproject.Rows[i].Cells[1].Value,
                        X_Otherproject.Rows[i].Cells[2].Value, X_Otherproject.Rows[i].Cells[3].Value });
                    }
                }
            }
            if (X_Otherproject.Columns.Count == 6)
            {

                for (int i = 0; i < X_Otherproject.Rows.Count; i++)
                {
                    if (X_Otherproject.Rows[i].Cells[0].Value != null)
                    {
                        array8.Add(new object[] {  X_Otherproject.Rows[i].Cells[0].Value, X_Otherproject.Rows[i].Cells[1].Value,
                        X_Otherproject.Rows[i].Cells[2].Value, X_Otherproject.Rows[i].Cells[3].Value,Convert.ToInt32(X_Otherproject.Rows[i].Cells[4].Value) });
                    }
                }
            }

            array.Add(array1);
            array.Add(array2);
            array.Add(array3);
            array.Add(array4);
            array.Add(array5);
            array.Add(array6);
            array.Add(array7);
            array.Add(array8);

            foreach (Framework.Entity.Template template in templateList)
            {
                if (template.Title == templatename)
                {
                    templatetemp = template;
                    break;
                }
            }

            CreateModuleIntance(templatetemp, array, @class, obj);
            this.Close();
        }
Пример #39
0
 private void MnDelete_Click(object sender, System.EventArgs e)
 {
     Framework.Entity.Template template = (Framework.Entity.Template)TreeTemplate.SelectedNode.Tag;
     utilService.Delete(template);
     RefreshList();
 }
        private void Btn_YLSubmit_Click(object sender, EventArgs e)
        {
            Framework.Entity.Template item = new Framework.Entity.Template();
            string itemtext = "";
            object[] obj = new object[] { };
            #region ��˫�Ž��ּ����ϼ���
            if (CbxScaffoldType.SelectedIndex == 0 | CbxScaffoldType.SelectedIndex == 1)
            {
                #region ��˫�Ž��ּ����ϼ����漰�IJ�������
                double Ly1_1, Ly1_2, Ly1_3, Ly1_4, Ly1_5, Ly1_6, Ly1_7, Ly1_9, Ly1_10, Ly1_11, Ly1_12;
                double LySum1 = 0, LySum2 = 0, LySum3 = 0, LySum4 = 0, LySum5 = 0, LySum6 = 0, LySum7 = 0, LySum8 = 0, LySum9 = 0;
                string Ly1_8;
                Ly1_1 = DbInput_MaterialDSGD.Value; //���ּܴ���߶�
                Ly1_2 = DbInput_MaterialDSCD.Value;  //���ּܴ��賤��
                Ly1_3 = DbInput_MaterialLGZJ.Value; //�����ݾ�la
                Ly1_4 = DbInput_MaterialLGHJ.Value; //���˺��lb
                Ly1_5 = DbInput_MaterialBJ.Value; //����h
                Ly1_6 = DbInput_MaterialLQJL.Value; //���ּ����ŵ���ǽ����
                Ly1_7 = System.Convert.ToInt16(Tb_MaterialWCDHGQZ.Text); //�����˼��ȡֵ
                Ly1_8 = Cb_MaterialJDCSZ.Text; //���������
                Ly1_9 = System.Convert.ToDouble(IntInput_MaterialJDCKYBJ.Value); //����ſ�Խ������
                Ly1_10 = System.Convert.ToDouble(IntInput_MaterialJDCKYLGZJ.Value); //����ſ�Խ�����ݾ���
                Ly1_11 = System.Convert.ToDouble(IntInput_MaterialJDCJGLGZJ.Value); //����ż�������ݾ���
                Ly1_12 = DBIput_MaterialCLYLXS.Value; //��������ϵ��
                #endregion
                if (CbxScaffoldType.SelectedIndex == 0) //ѡ��˫�Ž��ּ����ϼ���
                {
                    itemtext = "˫�Ž��ּ����ϼ���";
                    #region // ˫�Ž��ּ����ϼ�����̣�
                    LySum1 = Ly1_12 * Ly1_2 / Ly1_3 * 2 * Ly1_1;//��ͬ�ڵ��Ž��ּ�
                    LySum2 = Ly1_12 * Ly1_1 / Ly1_5 * 2 * Ly1_7 * Ly1_2;//��ͬ�ڵ��Ž��ּ�
                    LySum3 = Ly1_12 * Ly1_1 / Ly1_5 * Ly1_2 / Ly1_3 * (Ly1_4 + Ly1_6);
                    LySum4 = Ly1_12 * (Math.Pow((Ly1_10 * Ly1_10 + Ly1_9 * Ly1_9), 0.5) + 1) * Ly1_1 / Ly1_9 * Ly1_2 / Ly1_10;
                    LySum5 = Ly1_12 * (Ly1_1 / Ly1_5 * Ly1_2 / Ly1_3 * 2 + LySum2 / Ly1_3);//��ͬ�ڵ��Ž��ּ�
                    LySum6 = Ly1_12 * Ly1_1 / Ly1_9 * Ly1_2 / Ly1_10 * 14;
                    LySum7 = Ly1_12 * (LySum1 + LySum2) / 5;
                    LySum8 = LySum1 + LySum2 + LySum3 + LySum4;
                    LySum9 = LySum8 * 3.97 / 1000;
                    #endregion
                }
                else if (CbxScaffoldType.SelectedIndex == 1) //ѡ���Ž��ּ����ϼ���
                {
                    itemtext = "���Ž��ּ����ϼ���";
                    #region // ���Ž��ּ����ϼ�����̣�
                    LySum1 = Ly1_12 * Ly1_2 / Ly1_3 * Ly1_1;//��ͬ��˫�Ž��ּ�
                    LySum2 = Ly1_12 * Ly1_1 / Ly1_5 * Ly1_7 * Ly1_2;//��ͬ��˫�Ž��ּ�
                    LySum3 = Ly1_12 * Ly1_1 / Ly1_5 * Ly1_2 / Ly1_3 * (Ly1_4 + Ly1_6);
                    LySum4 = Ly1_12 * (Math.Pow((Ly1_10 * Ly1_10 + Ly1_9 * Ly1_9), 0.5) + 1) * Ly1_1 / Ly1_9 * Ly1_2 / Ly1_10;
                    LySum5 = Ly1_12 * (Ly1_1 / Ly1_5 * Ly1_2 / Ly1_3 + LySum2 / Ly1_3);//��ͬ��˫�Ž��ּ�
                    LySum6 = Ly1_12 * Ly1_1 / Ly1_9 * Ly1_2 / Ly1_10 * 14;
                    LySum7 = Ly1_12 * (LySum1 + LySum2) / 5;
                    LySum8 = LySum1 + LySum2 + LySum3 + LySum4;
                    LySum9 = LySum8 * 3.97 / 1000;
                    #endregion
                }
                LySum1 = Math.Round(LySum1, 0);
                LySum2 = Math.Round(LySum2, 0);
                LySum3 = Math.Round(LySum3, 0);
                LySum4 = Math.Round(LySum4, 0);
                LySum5 = Math.Round(LySum5, 0);
                LySum6 = Math.Round(LySum6, 0);
                LySum7 = Math.Round(LySum7, 0);
                LySum8 = Math.Round(LySum8, 0);
                LySum9 = Math.Round(LySum9, 0);
                obj = new object[] { Ly1_1 , Ly1_2 , Ly1_3 , Ly1_4 , Ly1_5 , Ly1_6 , Ly1_7 , Ly1_8 , IntInput_MaterialJDCKYBJ.Value , IntInput_MaterialJDCKYLGZJ.Value ,IntInput_MaterialJDCJGLGZJ.Value, Ly1_12 ,
                                                        LySum1 , LySum2 ,  LySum3 ,  LySum4 ,  LySum5 ,  LySum6 ,  LySum7 ,  LySum8 ,  LySum9};
            }
            #endregion
            else if (CbxScaffoldType.SelectedIndex == 2) //ѡ�����ʽ���ּ����ϼ���
            {
                itemtext = "���ʽ���ּ����ϼ���";
                #region ���ʽ���ּ����ϼ�����ƵIJ�������
                double Ly2_1, Ly2_2, Ly2_3, Ly2_4, Ly2_5, Ly2_6;
                string Ly2_7, Ly2_8, Ly2_9, Ly2_10, Ly2_11;
                double Ly2Sum1 = 0, Ly2Sum2 = 0, Ly2Sum3 = 0, Ly2Sum4 = 0, Ly2Sum5 = 0, Ly2Sum6 = 0, Ly2Sum7 = 0, Ly2Sum8 = 0, Ly2Sum9 = 0, Ly2Sum10 = 0, Ly2Sum11 = 0, Ly2Sum12 = 0;
                Ly2_1 = DbInput_Item2GD.Value;//���ּܴ���߶�
                Ly2_2 = DbInput_Item2CD.Value;//���ּܴ��賤��
                Ly2_3 = DbInput_Item2BJ.Value;//����
                Ly2_4 = System.Convert.ToDouble(Tb_Item2BS.Text);//���ּܴ��貽��
                Ly2_5 = System.Convert.ToDouble(Cbx_Item2ZJ.Text);//�����ݾ�
                double[] Gkzg1 = new double[] { 0.0132, 0.0247, 0.0363, 0.0478, 0.0593, 0.0708 };
                double Gkzg = Gkzg1[Cbx_Item2ZJ.SelectedIndex];
                Ly2_6 = System.Convert.ToDouble(Cbx_Item2HJ.Text);//���˺��
                double[] Gkhg1 = new double[] { 0.0132, 0.0247, 0.0363, 0.0478, 0.0593, 0.0708 };//���˺��
                double Gkhg = Gkhg1[Cbx_Item2HJ.SelectedIndex];

                double[] Gkjhg1 = new double[] { 0.0437, 0.0552, 0.0685, 0.0816 };//���˸ֹ�����
                double Gkjhg = Gkjhg1[Cbx_Item2JHG.SelectedIndex];

                Ly2_7 = Cbx_Item2LGG.Text;//���˸ֹ�����
                double[] Gkl1 = new double[] { 0.0705, 0.1019, 0.1334, 0.1648 };
                double Gkl = Gkl1[Cbx_Item2LGG.SelectedIndex ];
                double[] Gkl2 = new double[] { 1.2, 1.8, 2.4, 3.0 };
                double Gkl3 = Gkl1[Cbx_Item2LGG.SelectedIndex];
                Ly2_8 = Cbx_Item2WXG.Text;//��б�˸ֹ�����
                double[] Gkwg1 = new double[] {0.0633, 0.0703, 0.0866, 0.0930, 0.1004};
                double Gkwg = Gkwg1[Cbx_Item2WXG.SelectedIndex];
                Ly2_9 = Cbx_Item2SPX.Text;//ˮƽб�˸ֹ�����
                double[] Gksg1 = new double[] {0.0589, 0.0676, 0.0873};
                double Gksg = Gksg1[Cbx_Item2SPX.SelectedIndex];
                Ly2_10 = Cbx_Item2LDX.Text;//�ȵ�б�˸ֹ�����
                double[] Gklg1 = new double[] {0.0633, 0.0703, 0.0866, 0.0930, 0.1004};
                double Gklg = Gklg1[Cbx_Item2LDX.SelectedIndex];
                Ly2_11 = Cbx_Item2LGD.Text;//���˵�������
                double[] Gkdz1 = new double[] { 0.0582, 0.0712, 0.085};
                double Gkdz = Gkdz1[Cbx_Item2LDX.SelectedIndex];
                double Ly2_12, Ly2_13, Ly2_14, Ly2_15, Ly2_16, Ly2_17, Ly2_18, Ly2_19, Ly2_20;
                Ly2_12 = System.Convert.ToDouble(Cbx_Item2DKJ.Text);
                Ly2_13 = System.Convert.ToDouble(Cbx_Item2WXGBZ.Text);
                Ly2_14 = IntInput_Item2SPX.Value;
                Ly2_15 = IntInput_Item2LDX.Value;
                Ly2_16 = DbInput_Item2H1.Value;
                Ly2_17 = DbInput_Item2L1.Value;
                Ly2_18 = DbInput_Item2L0.Value;
                Ly2_19 = IntInput_Item2CS.Value;
                Ly2_20 = DbInput_Item2XS.Value;
                #endregion
                Ly2Sum1 = Ly2_20 * (Ly2_2 / Ly2_5 + 1) * 2 * Ly2_1 / Gkl3 * Gkl / 10;
                Ly2Sum2 = Ly2_20 * 2 * (Ly2_4 + Ly2_20) * Ly2_2 / Ly2_5 * Gkzg / 10;
                Ly2Sum3 = Ly2_20 * (Ly2_2 / Ly2_5 + 1) * Ly2_4 * Gkhg / 10;
                Ly2Sum4 = Ly2_20 * Ly2_2 / Ly2_5 * Ly2_12 * Ly2_4 * Gkjhg / 10;
                Ly2Sum5 = Ly2_20 * Ly2_2 / Ly2_5 / Ly2_13 * Ly2_4 * Gkwg / 10;
                Ly2Sum6 = Ly2_20 * Ly2_2 / Ly2_5 / Ly2_14 * Ly2_4 * Gksg / 10;
                Ly2Sum7 = Ly2_20 * Ly2_2 / Ly2_5 / Ly2_15 * Ly2_4 * Gklg / 10;
                Ly2Sum8 = Ly2_20 * (Ly2_2 / Ly2_5 + 1) * 2 * Gkdz / 10;
                Ly2Sum9 = Ly2_20 * Ly2_2 * Ly2_1 / Ly2_16 / Ly2_17 * Ly2_18 * 3.97 / 1000;
                Ly2Sum10 = Ly2_20 * Ly2_2 * Ly2_5 * Ly2_19;
                Ly2Sum11 = Ly2_20 * 2 * 0.18 * Ly2_2 * Ly2_19;
                Ly2Sum12 = Ly2_20 * Ly2_2 * Ly2_1;

                obj = new object[] { Ly2_1, Ly2_2, Ly2_3, Ly2_4, Ly2_5, Gkzg, Ly2_6, Gkhg, Gkjhg, Ly2_7, Gkl, Gkl3, Ly2_8, Gkwg, Ly2_9, Gksg, Ly2_10, Gklg, Ly2_11, Gkdz ,
                                                Ly2_12, Ly2_13, Ly2_14, Ly2_15, Ly2_16, Ly2_17, Ly2_18, Ly2_19, Ly2_20,
                                                 Ly2Sum1, Ly2Sum2, Ly2Sum3,Ly2Sum4, Ly2Sum5, Ly2Sum6, Ly2Sum7, Ly2Sum8, Ly2Sum9, Ly2Sum10, Ly2Sum11, Ly2Sum12, Cbx_Item2JHG.Text };
            }
            /*
             * ���ܣ���ʽ���ּ���������
             * ���ߣ��ֿ�
             * ���ڣ�2013-9-16
             */
            else if (CbxScaffoldType.SelectedIndex == 3)//ѡ����ʽ���ּ���������
            {
                itemtext = "��ʽ���ּ����ϼ���";
                #region ��ʽ���ּ����������漰�IJ�������
                double Ly3_1, Ly3_2, Ly3_3, Ly3_4, Ly3_5, Ly3_7, Ly3_8, Ly3_9, Ly3_10;
                string Ly3_6;
                double Ly3Sum1 = 0, Ly3Sum2 = 0, Ly3Sum3 = 0, Ly3Sum4 = 0, Ly3Sum5 = 0, Ly3Sum6 = 0, Ly3Sum7 = 0;
                Ly3_1 = DbInput_Item3GD.Value;//���ּܴ���߶�
                Ly3_2 = DbInput_Item3CD.Value;//���ּܴ��賤��
                Ly3_3 = DbInput_Item3MJBJ.Value;//�żܲ���
                Ly3_4 = DbInput_Item3MJKD.Value;//�żܿ��
                Ly3_5 = System.Convert.ToDouble(DbInput_Item3CS.Value);//���ְ�������
                Ly3_6 = Cbx_Item3JDCSZ.Text;//���������
                Ly3_7 = System.Convert.ToDouble(IntInput_Item3JDCKMJBJ.Value);//����ſ��żܲ���
                Ly3_8 = System.Convert.ToDouble(IntInput_Item3JDCKYMJKDS.Value);//����ſ�Խ�����ݾ���
                Ly3_9 = System.Convert.ToDouble(IntInput_Item3JDCJGMJKDS.Value);//����ż�������ݾ���
                Ly3_10 = DbInput_Item3XS.Value;//��������ϵ��
                #endregion
                #region ��ʽ���ּ������������
                Ly3Sum1 = Ly3_10 * (Ly3_2 / Ly3_4 + 1) * Ly3_1 / Ly3_3;
                Ly3Sum2 = Ly3_10 * Ly3_2 / Ly3_4 * Ly3_1 / Ly3_3 * 2;
                Ly3Sum3 = Ly3_10 * Ly3_2 / Ly3_4 * Ly3_5;
                Ly3Sum4 = Ly3_10 * (Ly3_2 / Ly3_4 + 1) * Ly3_1 / Ly3_3 * 2;
                Ly3Sum5 = Ly3_10 * (Math.Pow((Ly3_8 * Ly3_8 + Ly3_7 * Ly3_7), 0.5) + 1) * Ly3_1 / Ly3_7 * Ly3_2 / Ly3_8;
                Ly3Sum6 = Ly3Sum5 * 3.97 / 1000;
                Ly3Sum7 = Ly3_10 * Ly3_1 / Ly3_7 * Ly3_2 / Ly3_8 * 14;
                #endregion
                Ly3Sum1 = Math.Round(Ly3Sum1, 0);
                Ly3Sum2 = Math.Round(Ly3Sum2, 0);
                Ly3Sum3 = Math.Round(Ly3Sum3, 0);
                Ly3Sum4 = Math.Round(Ly3Sum4, 0);
                Ly3Sum5 = Math.Round(Ly3Sum5, 0);
                Ly3Sum6 = Math.Round(Ly3Sum6, 0);
                Ly3Sum7 = Math.Round(Ly3Sum7, 0);
                obj = new object[] {Ly3_1, Ly3_2, Ly3_3, Ly3_4, Ly3_5, Ly3_7, Ly3_8, Ly3_9, Ly3_10,Ly3_6, Ly3Sum1, Ly3Sum2, Ly3Sum3, Ly3Sum4, Ly3Sum5, Ly3Sum6, Ly3Sum7,
                                            DbInput_Item3CS.Value,IntInput_MaterialJDCKYBJ.Value,IntInput_Item3JDCKYMJKDS.Value,IntInput_Item3JDCJGMJKDS.Value};

            }
            else if (CbxScaffoldType.SelectedIndex == 4)//ѡ��������ּ���������
            {
                itemtext = "�������ּ����ϼ���";
                #region �������ּ����������漰�IJ�������
                double Ly4_1, Ly4_2, Ly4_3=1, Ly4_4, Ly4_5, Ly4_6, Ly4_7, Ly4_8, Ly4_9, Ly4_10, Ly4_11, Ly4_12, Ly4_13, Ly4_14, Ly4_15,
                    Ly4_16, Ly4_17, Ly4_18, Ly4_19, Ly4_20, Ly4_21, Ly4_22, Ly4_23, Ly4_24, Ly4_25;
                double Ly4Sum1 = 0, Ly4Sum2 = 0, Ly4Sum3 = 0, Ly4Sum4 = 0, Ly4Sum5 = 0, Ly4Sum6 = 0, Ly4Sum7 = 0, Ly4Sum8 = 0, Ly4Sum9 = 0, Ly4Sum10 = 0, Ly4Sum11 = 0, Ly4Sum12 = 0, Ly4Sum13 = 0, Ly4Sum14 = 0, Ly4Sum15 = 0, Ly4Sum16 = 0;
                string compare1 = "", compare2 = "", compare3 = "", compare4 = "", compare5 = "";
                Ly4_1 = Db_Item4CD.Value;//��������
                Ly4_2 = Db_Item4KD.Value;//�������
                Ly4_3 = Db_Item4GD.Value;//�����߶�
                Ly4_4 = Db_Item4PZZL.Value;//��������
                Ly4_5 = Db_Item4XTLFBHD.Value;//������������
                Ly4_6 = Db_Item4XTLMJJ.Value;//�����������
                Ly4_7 = Db_Item4JMGXJ.Value;//������������Ծ�
                Ly4_8 = Db_Item4JMDKJ.Value;//����������ֿ���
                Ly4_9 = Db_Item4DLDDJL.Value;//������ǰ��֧���������������
                Ly4_10 = Db_Item4HBZDJL.Value;// ������ǰ��֧������֧�����
                Ly4_11 = Db_Item4WDXS.Value;//�����������ȶ�ϵ��
                Ly4_12 = Db_Item4KWQD.Value;//����������ǿ�����ֵ
                Ly4_13 = Db_Item4KJQD.Value;//����������ǿ�����ֵ
                Ly4_14 = Db_Item4GSSZJ.Value;//��˿��ֱ��
                Ly4_15 = Db_Item4LJZH.Value;//��˿�ƶ������ܺ�
                Ly4_16 = Db_Item4SLGSSS.Value;//ÿ鯼���������˿����
                Ly4_17 = Db_Item4AQXS.Value;//��ȫϵ��
                Ly4_18 = Db_Item4BJYXS.Value;//������ϵ��
                Ly4_19 = Db_Item4GSSDLZZ.Value;// ��˿�����������ر�׼ֵ
                Ly4_20 = System.Convert.ToDouble(TB_Item4ZZBZZ.Text);//���������ر�׼ֵ
                Ly4_21 = Db_Item4HZBZZ.Value;//ʩ������ر�׼ֵ
                Ly4_22 = Db_Item4JBFY.Value;//������ѹ
                Ly4_23 = Db_Item4FHZTXXS.Value;//���������ϵ��
                Ly4_24 = Db_Item4FYGDBHXS.Value;//��ѹ�߶ȱ仯ϵ��
                Ly4_25 = Db_Item4FZXS.Value;//����ϵ��
                #endregion
                #region �������ּ������������
                Ly4Sum1 = Ly4_1 * Ly4_3;//�����ܷ����F
                Ly4Sum2 = Ly4_22 * Ly4_23 * Ly4_24 * Ly4_25 * Ly4Sum1;//�����ķ���ر�׼ֵQwk
                Ly4Sum3 = Ly4_1 * Ly4_2;//�����ײ�������A
                Ly4Sum4 = Ly4_21 * Ly4Sum3;//ʩ������ر�׼ֵQk
                Ly4Sum5 = (Ly4_19 + Ly4Sum4) / 2;//����������˿��������ر�׼ֵQ1
                Ly4Sum6 = Ly4Sum2 / 2;//����������˿��ˮƽ���ر�׼ֵQ2
                Ly4Sum7 = Ly4_17 * (Math.Pow((Ly4Sum5 * Ly4Sum5 + Ly4Sum6 * Ly4Sum6), 0.5));//������˿������������ʩ������ֵQD
                Ly4Sum8 = Ly4Sum7 * (1 + Ly4_9 / Ly4_10) + Ly4_20 * (Ly4_9 + Ly4_10);//֧�����һ���ǰ֧�ܵĽṹ�����ܵļ��к���ND
                Ly4Sum9 = Ly4_18 * Ly4_16 * Ly4_15 / Ly4_17;//��˿������[Fg]
                Ly4Sum10 = 2 * (Ly4Sum7 * Ly4_9 / Ly4_10);//֧�����һ�����֧�ܵĽṹ�����ܵļ��к���T
                Ly4Sum11 = Ly4Sum10 * 100;//��������������m0
                Ly4Sum12 = Ly4Sum7 * Ly4_9;//����������ǿ������Mmax
                Ly4Sum13 = Ly4Sum12 * 1000 / Ly4_8;//����������ǿ�������
                Ly4Sum14 = Ly4Sum7 + Ly4_20 * Ly4_9;//��������������Vmax
                Ly4Sum15 = Ly4Sum14 * Ly4_6 / Ly4_5 / Ly4_7 * 10;//���������������max
                Ly4Sum16 = Ly4Sum12 * 1000 / (Ly4_11 * Ly4_8);//�����������ȶ��������

                Ly4Sum1 = Math.Round(Ly4Sum1, 0);
                Ly4Sum2 = Math.Round(Ly4Sum2, 0);
                Ly4Sum3 = Math.Round(Ly4Sum3, 0);
                Ly4Sum4 = Math.Round(Ly4Sum4, 0);
                Ly4Sum5 = Math.Round(Ly4Sum5, 0);
                Ly4Sum6 = Math.Round(Ly4Sum6, 0);
                Ly4Sum7 = Math.Round(Ly4Sum7, 0);
                Ly4Sum8 = Math.Round(Ly4Sum8, 0);
                Ly4Sum9 = Math.Round(Ly4Sum9, 0);
                Ly4Sum10 = Math.Round(Ly4Sum10, 0);
                Ly4Sum11 = Math.Round(Ly4Sum11, 0);
                Ly4Sum12 = Math.Round(Ly4Sum12, 0);
                Ly4Sum13 = Math.Round(Ly4Sum13, 0);
                Ly4Sum14 = Math.Round(Ly4Sum14, 0);
                Ly4Sum15 = Math.Round(Ly4Sum15, 0);
                Ly4Sum16 = Math.Round(Ly4Sum16, 0);

                if (Ly4Sum9 >= Ly4Sum7)
                {
                    compare1 = "[Fg]= " + Ly4Sum9 + " kN ��QD= " + Ly4Sum7 + " kN������Ҫ��!";
                }
                else
                    compare1 = "[Fg]= " + Ly4Sum9 + " kN<QD= " + Ly4Sum7 + " kN��������Ҫ��!";

                if (Ly4_4 >= Ly4Sum11)
                {
                    compare2 = "ʵ�����أ�m=" + Ly4_4 + " kg��m0= " + Ly4Sum11 + " kg������Ҫ��!";
                }
                else
                    compare2 = "ʵ�����أ�m=" + Ly4_4 + " kg<m0= " + Ly4Sum11 + " kg��������Ҫ��!";

                if (Ly4Sum13 <= Ly4_12)
                {
                    compare3 = "��=" + Ly4Sum13 + "N/mm2��f= "+Ly4_12+" N/mm2������Ҫ��!";
                }
                else
                    compare3 = "��=" + Ly4Sum13 + "N/mm2>f= " + Ly4_12 + " N/mm2��������Ҫ��!";

                if (Ly4Sum15 <= Ly4_13)
                {
                    compare4 = "��max=" + Ly4Sum15 + " N/mm2�ܦ�="+Ly4_13+" N/mm2������Ҫ��!";
                }
                else
                    compare4 = "��max=" + Ly4Sum15 + " N/mm2>��=" + Ly4_13 + " N/mm2��������Ҫ��!";

                if (Ly4Sum16 <= Ly4_12)
                {
                    compare5 = "��=" + Ly4Sum16 + "N/mm2��[f]= " + Ly4_12 + "N/mm2������Ҫ��!";
                }
                else
                    compare5 = "��=" + Ly4Sum16 + "N/mm2>[f]= " + Ly4_12 + "N/mm2��������Ҫ��!";
                #endregion

                obj = new object[] {Ly4_1, Ly4_2, Ly4_3, Ly4_4, Ly4_5, Ly4_6, Ly4_7, Ly4_8, Ly4_9, Ly4_10, Ly4_11, Ly4_12, Ly4_13, Ly4_14, Ly4_15,
                    Ly4_16, Ly4_17, Ly4_18, Ly4_19, Ly4_20, Ly4_21, Ly4_22, Ly4_23, Ly4_24, Ly4_25, Ly4Sum1, Ly4Sum2, Ly4Sum3, Ly4Sum4, Ly4Sum5,
                    Ly4Sum6, Ly4Sum7, Ly4Sum8, Ly4Sum9, Ly4Sum10, Ly4Sum11, Ly4Sum12, Ly4Sum13, Ly4Sum14, Ly4Sum15, Ly4Sum16,compare1,compare2,compare3,compare4,compare5};
            }

            foreach (Framework.Entity.Template template in templateList)
            {
                if (itemtext == template.Title)
                {
                    item = template;
                    break;
                }
            }
            CreateModuleIntance(item, null, @class, obj);
            this.Close();
        }
Пример #41
0
        private void BtnSubmit_Click(object sender, EventArgs e)
        {
            object[] obj = new object[] { };
            Framework.Entity.Template item = new Framework.Entity.Template();
            string itemtext = "";
            #region ȫ�ֱ���
            #region LXtabItem6,������ּܶ��õ�
            double pc6_3=0, pc6_4=0;
            string pc6_1 = "", pc6_2 = "", pc7_1 = "";
            pc6_1 = Cb_Item6SF.Text;  //ʡ��
            pc6_2 = Cb_Item6DQ.Text; //����
            pc6_3 = System.Convert.ToDouble(Tb_Item6SFDQFY.Text); //�õ�����ѹ�ǣ�kN/m2��
            if (Chk_Item6Self.Checked) //���û���ѡ�˴��������ʱ�����û�����Ļ�����ѹֵ����;
            {
                pc6_4 = DbInput_Item6SelfJBFY.Value; //������ѹWo��kN/m2��
                Lb_Item6SelfJBFY.Enabled = true;
                DbInput_Item6SelfJBFY.Enabled = true;
            }
            else //����ѡ�򰴡�ʡ�ݡ���������ѡ���ó��ķ�ѹֵ���㡣
            {
                pc6_4 = pc6_3;
                Lb_Item6SelfJBFY.Enabled = false;
                DbInput_Item6SelfJBFY.Enabled = false;
            }
            pc7_1 = Cb_Item7DMCCD.Text; //����ֲڶ�
            double ��z = 0;//��ѹ�߶ȱ仯ϵ��
            #endregion
             #region ��B.0.6������ѹ�������ȶ�ϵ����(Q235��)
                double[,] ��Array = new double[,] {  {	1	,	0.997	,	0.995	,	0.992	,	0.989	,	0.987	,	0.984	,	0.981	,	0.979	,	0.976	},
                                                                        {	0.974	,	0.971	,	0.968	,	0.966	,	0.963	,	0.96	,	0.958	,	0.955	,	0.952	,	0.949	},
                                                                        {	0.947	,	0.944	,	0.941	,	0.938	,	0.936	,	0.933	,	0.93	,	0.927	,	0.924	,	0.921	},
                                                                        {	0.918	,	0.915	,	0.912	,	0.909	,	0.906	,	0.903	,	0.899	,	0.896	,	0.893	,	0.889	},
                                                                        {	0.886	,	0.882	,	0.879	,	0.875	,	0.872	,	0.868	,	0.864	,	0.861	,	0.858	,	0.855	},
                                                                        {	0.852	,	0.849	,	0.846	,	0.843	,	0.839	,	0.836	,	0.832	,	0.829	,	0.825	,	0.822	},
                                                                        {	0.818	,	0.814	,	0.81	,	0.806	,	0.802	,	0.797	,	0.793	,	0.789	,	0.784	,	0.779	},
                                                                        {	0.775	,	0.77	,	0.765	,	0.76	,	0.755	,	0.75	,	0.744	,	0.739	,	0.733	,	0.728	},
                                                                        {	0.722	,	0.716	,	0.71	,	0.704	,	0.698	,	0.692	,	0.686	,	0.68	,	0.673	,	0.667	},
                                                                        {	0.661	,	0.654	,	0.648	,	0.641	,	0.634	,	0.626	,	0.618	,	0.611	,	0.603	,	0.595	},
                                                                        {	0.588	,	0.58	,	0.573	,	0.566	,	0.558	,	0.551	,	0.544	,	0.537	,	0.53	,	0.523	},
                                                                        {	0.516	,	0.509	,	0.502	,	0.496	,	0.489	,	0.483	,	0.476	,	0.47	,	0.464	,	0.458	},
                                                                        {	0.452	,	0.446	,	0.44	,	0.434	,	0.428	,	0.423	,	0.417	,	0.412	,	0.406	,	0.401	},
                                                                        {	0.396	,	0.391	,	0.386	,	0.381	,	0.376	,	0.371	,	0.367	,	0.362	,	0.357	,	0.353	},
                                                                        {	0.349	,	0.344	,	0.34	,	0.336	,	0.332	,	0.328	,	0.324	,	0.32	,	0.316	,	0.312	},
                                                                        {	0.308	,	0.305	,	0.301	,	0.298	,	0.294	,	0.291	,	0.287	,	0.284	,	0.281	,	0.277	},
                                                                        {	0.274	,	0.271	,	0.268	,	0.265	,	0.262	,	0.259	,	0.256	,	0.253	,	0.251	,	0.248	},
                                                                        {	0.245	,	0.243	,	0.24	,	0.237	,	0.235	,	0.232	,	0.23	,	0.227	,	0.225	,	0.223	},
                                                                        {	0.22	,	0.218	,	0.216	,	0.214	,	0.211	,	0.209	,	0.207	,	0.205	,	0.203	,	0.201	},
                                                                        {	0.199	,	0.197	,	0.195	,	0.193	,	0.191	,	0.189	,	0.188	,	0.186	,	0.184	,	0.182	},
                                                                        {	0.18	,	0.179	,	0.177	,	0.175	,	0.174	,	0.172	,	0.171	,	0.169	,	0.167	,	0.166	},
                                                                        {	0.164	,	0.163	,	0.161	,	0.16	,	0.159	,	0.157	,	0.156	,	0.154	,	0.153	,	0.152	},
                                                                        {	0.15	,	0.149	,	0.148	,	0.146	,	0.145	,	0.144	,	0.143	,	0.141	,	0.14	,	0.139	},
                                                                        {	0.138	,	0.137	,	0.136	,	0.135	,	0.133	,	0.132	,	0.131	,	0.13	,	0.129	,	0.128	},
                                                                        {	0.127	,	0.126	,	0.125	,	0.124	,	0.123	,	0.122	,	0.121	,	0.12	,	0.119	,	0.118	},
                                                                        {	0.117	,	0	,	0	,	0	,	0	,	0	,	0	,	0	,	0	,	0	}
                                                                    };
                #endregion
            #region ���ֹ��ô����������
            //LXtabItem5
            string pc5_1 = "";
            double pc5_3=0;
            int pc5_2=0,pc5_4=0;
            //LXtabItem1
            double pc1_1 = 0, pc1_2 = 0, pc1_3 = 0, pc1_4 = 0, pc1_5 = 0, pc1_6 = 0, pc1_7 = 0, pc1_8 = 0, pc1_9 = 0, pc1_10 = 0;
            //LXtabItem2
            double pc2_7 = 0, pc2_5 = 0;
            string pc2_2="", pc2_1="", pc2_4="";
            //LXtabItem3
            string pc3_1 = "", pc3_2 = "";
            double pc3_3 = 0;
            //LXtabItem4
            string pc4_1 = "", pc4_3 = "";
            double pc4_2 = 0, pc4_4 = 0, pc4_6 = 0;
            int pc4_5 = 0;
            double gk = 0;//ÿ���������ر�׼ֵ
            //LXtabItem8
            string pc8_1 = "", pc8_2 = "", pc8_3 = "";
            double  pc8_5 = 0, pc8_12 = 0, pc8_13 = 0 ;
            double ��s = 0; //���������ϵ����s
            //LXtabItem9
            string pc9_1 = "";
            double pc9_2 = 0, pc9_3 = 0, pc9_4 = 0, pc9_5 = 1;
            //LXtabItem10
            string pc10_1 = "", pc10_4 = "";
            double pc10_2 = 0, pc10_3 = 0, pc10_5 = 0;
            //LXtabItem11
            double pc11_1 = 0, pc11_2 = 0;
            string pc11_3 = "";
            //LXtabItem16
            string pc16_5 = "", pc16_6 = "", pc16_7 = "", pc16_8 = "", pc16_9 = "", pc16_15 = "";
            double pc16_1 = 0, pc16_2 = 0, pc16_3 = 0, pc16_4 = 0;
            int pc16_10 = 0, pc16_11 = 0, pc16_12 = 0, pc16_13 = 0, pc16_14 = 0;
            //LXtabItem17
            string pc17_6 = "";
            double pc17_1 = 0, pc17_2 = 0, pc17_3 = 0, pc17_4 = 0, pc17_5 = 0, pc17_9 = 0, pc17_10 = 0, pc17_11 = 0;
            #endregion
            #endregion
            #region ǰ���������ʽ���õ�
            if (CbxScaffoldType.SelectedIndex == 0 || CbxScaffoldType.SelectedIndex == 1 || CbxScaffoldType.SelectedIndex == 2 || CbxScaffoldType.SelectedIndex == 4)
            {
                //LXtabItem5
                pc5_1 = Cb_Item5YT.Text;//���ּ���;
                pc5_2 = IntInput_Item5SGCS.Value;//ͬʱʩ������
                pc5_3 = DbInput_Item5HZBZ.Value;//ʩ������ر�׼ֵ
                pc5_4 = IntInput_Item5PSCS.Value;//���ְ塢���ˡ����Ű��������,���ʽר��
            }
            #endregion
            #region ǰ����������
            if (CbxScaffoldType.SelectedIndex == 0||CbxScaffoldType.SelectedIndex == 1||CbxScaffoldType.SelectedIndex == 2)
            {
                //LXtabItem1
                pc1_1 = DbInput_Item1LGZJ.Value; //�����ݾ�
                pc1_2 = DbInput_Item1LGHJ.Value;//���˺��
                pc1_3 = DbInput_Item1BJ.Value;//���˲���
                pc1_4 = DbInput_Item1DSGD.Value;//���ּܴ���߶�
                pc1_5 = DbInput_Item1LQJL.Value;//���ּ����ŵ���ǽ����
                pc1_6 = DbInput_Item1XHGWSCD.Value;//С��˼������쳤��
                pc1_7 = DbInput_Item1DKJ.Value;//���ۼ�����������
                pc1_8 = DbInput_Item1SKJ.Value;//˫�ۼ�����������
                pc1_9 = Convert.ToDouble(Tb_Item1BH.Text);//�ں�
                pc1_10 = Convert.ToDouble(Tb_Item1GGWJ.Text);//�ֹ��⾶
                //LXtabItem2
                pc2_2 = Rdo_Item2DHG.Text;
                pc2_7 = Convert.ToDouble(Cb_Item2DHGGS.Text);
                pc2_1 = Rdo_Item2XHG.Text;
                pc2_4 = Cb_Item2LGZJ.Text;
                pc2_5 = Convert.ToDouble(Tb_Item2XHGJJ.Text);
                //LXtabItem3
                pc3_1 = Cb_Item3JJ.Text; //��ǽ�����
                pc3_2 = Cb_Item3FS.Text; //��ǽ����ʽ
                pc3_3 = DbInput_Item3ZXL.Value;//��ǽ��Լ�����ּ�ƽ��������
                //LXtabItem4
                pc4_1 = Cb_Item4JSBLB.Text;//���ְ����
                pc4_2 =Convert.ToDouble( Tb_Item4JSBZZBZZ.Text);//���ְ����ر�׼ֵ
                pc4_3 = Cb_Item4JBLB.Text;//���ˡ����Ű����
                pc4_4 =Convert.ToDouble( Tb_Item4JBZZBZZ.Text);//���ˡ����Ű����ر�׼ֵ
                pc4_5 = IntInput_Item4PSCS.Value;//���ְ��������
                pc4_6 = Convert.ToDouble(Tb_Item4AQW.Text);//��ȫ�����ر�׼ֵ
                #region ÿ���������ر�׼ֵ,���ú���ErweiShuzu()
                double[,] gksArray = new double[,] { { 0.1538, 0.1667, 0.1796, 0.1882, 0.1925 },
                                                                        { 0.1426, 0.1543, 0.1660, 0.1739, 0.1778},
                                                                        {0.1336, 0.1444, 0.1552, 0.1324, 0.1660 },
                                                                        { 0.1202, 0.1295, 0.1389, 0.1451, 0.1482},
                                                                        {0.1134, 0.1221, 0.1307, 0.1365, 0.1394} };//˫������
                double[,] gkdArray = new double[,] { { 0.1642,0.1793,0.1945,0.2046,0.2097 },
                                                                        { 0.1530, 0.1670,	0.1809 ,0.1903, 0.1949 },
                                                                        {0.1440,0.1570,0.1701,0.1788 ,0.1831 },
                                                                        { 0.1305,0.1422 ,0.1538,	0.1615 ,0.1654 },
                                                                        {0.1238 ,0.1347 ,0.1456,	0.1529 ,0.1565 } };//��������
                double[] bjArray = new double[] { 1.20, 1.35, 1.50, 1.80, 2.00 };
                double[] zjArray = new double[] { 1.2, 1.5, 1.8, 2.0, 2.1 };
                if (CbxScaffoldType.SelectedIndex  == 0 || CbxScaffoldType.SelectedIndex  == 1)//˫�Ž��ּ�
                { gk = ErweiShuzu(gksArray, zjArray, bjArray, pc1_1, pc1_3); }
                else if (CbxScaffoldType.SelectedIndex == 2)//���Ž��ּ�
                { gk = ErweiShuzu(gkdArray, zjArray, bjArray, pc1_1, pc1_3); }
                Tb_Item4GK.Text = gk.ToString();
                #endregion
                //LXtabItem6+7
                ��z=FengYaXiShu(DbInput_Item1DSGD.Value, Cb_Item7DMCCD.SelectedIndex);//��ѹ�߶ȱ仯ϵ��
               //LXtabItem8
                pc8_1 = Rdo_Item8WMMW.Text;//������ʽ���ּܣ�����Ŀ������
                pc8_2 = Rdo_Item8FBSK.Text;//�����ʽ���ּܱ�����������ܺͿ���ǽ��
                pc8_3 = Rdo_Item8FBSQ.Text;//�����ʽ���ּܱ���ȫ���ǽ��
                pc8_5 =Convert.ToDouble( Tb_Item8DFXS1.Text);//����ϵ��
                pc8_12 =Convert.ToDouble( Tb_Item8YFMJ.Text);//ӭ�����
                pc8_13 = DbIput_Item8DFMJ.Value; //�������
                #region ���õ���ϵ���������������ϵ����s�Ĺ���
                if (Rdo_Item8WMMW.Checked)
                {
                    ��s = Convert.ToDouble(Tb_Item8DFXS1.Text) * 0.6;
                }
                else if (Rdo_Item8FBSK.Checked)
                {
                    if (Convert.ToDouble(Tb_Item8DFXS1.Text) >= 0.8)
                        ��s = Convert.ToDouble(Tb_Item8DFXS1.Text) * 1.3;
                    else
                        ��s = 0.8 * 1.3;
                }
                else if (Rdo_Item8FBSQ.Checked)
                {
                    if (Convert.ToDouble(Tb_Item8DFXS1.Text) >= 0.8)
                        ��s = Convert.ToDouble(Tb_Item8DFXS1.Text);
                    else
                        ��s = 0.8;
                }
                #endregion
            }
            #endregion
            #region ˫�š����ź����ʽ���õ�
            if (CbxScaffoldType.SelectedIndex == 0 || CbxScaffoldType.SelectedIndex == 2 || CbxScaffoldType.SelectedIndex == 4)
            {
                //LXtabItem9
                pc9_1 = Cb_Item9DJTLX.Text;//�ػ�������
                pc9_2 =Convert.ToDouble( Tb_Item9DJCZL.Text);//�ػ���������׼ֵ��kN/m2��
                pc9_3 = DbIput_Item9DBK.Value;//���ּܵ�����ף�
                pc9_4 =Convert.ToDouble( Tb_Item9ZYCD.Text);//���ó��ȣ�m��
                //�ػ�����
                double[] djArray = new double[] {1,0.4, 0.4 ,0.4, 0.5};
                pc9_5 = djArray[Cb_Item9DJLX.SelectedIndex];
            }
            #endregion
            #region �͸�����ר��
            if (CbxScaffoldType.SelectedIndex == 1) //2ѡ���͸�������ּ�
            {
                //LXtabItem10
                pc10_1 = Cb_Item10GLXH.Text;//�����ͺ�
                pc10_2 = DbInput_Item10MGD.Value;//������ê�̶γ��ȣ�m��
                pc10_3 = DbInput_Item10XTD.Value;//����������γ��ȣ�m��
                pc10_4 = Cb_Item10RXND.Text;//�����������Ӷ�ѡ��
                pc10_5 = Convert.ToDouble(Tb_Item10RXND.Text); //�����������Ӷȣ�m��
                //LXtabItem11
                pc11_1 = Convert.ToDouble(Cb_Item11ULSZJ.Text);// U �͸ֽ���������˨ֱ����mm��
                pc11_2 = Convert.ToDouble(Tb_Item11MGXGJL.Text);//ê��λ�����͸�β�����루m��
                pc11_3 = Cb_Item11LBHNTQD.Text;//¥�������ǿ�ȵȼ�
            }
            #endregion
            #region ���ʽר��
            if (CbxScaffoldType.SelectedIndex == 4) //5���ʽ���ּ�
            {
                //LXtabItem16
                pc16_1 = DbInput_Lx5Item1BJ.Value;//	����h(m)
                pc16_2 = DbInput_Lx5Item2GD.Value;//���ּܴ���߶�
                pc16_3 = Convert.ToDouble(Cbx_Lx5Item1ZJ.Text);//�����ݾ�la(m)
                pc16_4 = Convert.ToDouble(Cbx_Lx5Item1HJ.Text);//���˺��lb(m)
                pc16_5 = Cbx_Lx5Item1JHG.Text;//���˸ֹ�����
                pc16_6 = Cbx_Lx5Item1LGG.Text;	//���˸ֹ�����
                pc16_7 = Cbx_Lx5Item1WXG.Text;	//��б�˸ֹ�����
                pc16_8 = Cbx_Lx5Item1SPX.Text;	//ˮƽб�˸ֹ�����
                pc16_9 = Cbx_Lx5Item1LDX.Text;//�ȵ�б�˸ֹ�����
                pc16_10 = Convert.ToInt32(Cbx_Lx5Item1DKJ.Text);	//������˸���njg
                pc16_11 = Convert.ToInt32(Cbx_Lx5Item1WXGBZ.Text);	//��б�˲���(����һ��)
                pc16_12 = IntInput_Lx5Item1SPX.Value;	//ˮƽб�˲���(����һ��)
                pc16_13 = IntInput_Lx5Item1LDX.Value;	//�ȵ�б�˲���(����һ��)
                pc16_14 = IntInput_Lx5Item1NO.Value;	//�ɵ���������������ֵN0(kN)
                pc16_15 = Cbx_Lx5Item1LGJXG.Text;	//���˼�б������
                //LXtabItem17
                pc17_1 = DbInput_Lx5Item2SX.Value;//	��ǽ��������H1��m��
                pc17_2 = DbInput_Lx5Item2SP.Value;//	��ǽ��ˮƽ���L1��m��
                pc17_3 = DbInput_Lx5Item2L0.Value;//	��ǽ�����㳤��l0 (mm)
                pc17_4 = DbInput_Lx5Item2BJ.Value;//	��ǽ�������ת�뾶i(mm)
                pc17_5 = DbInput_Lx5Item2MJ.Value;//	��ǽ���������Ac(mm2)
                pc17_6 = Cbx_Lx5Item2LQJ.Text;//	��ǽ����ʽ
                pc17_9 = DbInput_Lx5Item2KJ.Value;//	�ۼ��������ۼ�ϵ��:
                pc17_10 = DbInput_Lx5Item2DJ.Value;//	�ԽӺ���Ŀ�����ѹǿ�ȣ�N/mm2��
                pc17_11 = DbInput_Lx5Item2LJ.Value;//	���Ӹֽ�Ŀ���ǿ�ȣ�N/mm2��
            }
            #endregion

            #region �ж�ѡ�����ֽ��ּ�ģ��, �ܹ�������ּ�, 11��ģ��(3+3+3+1+1)
            if (CbxScaffoldType.SelectedIndex == 0 || CbxScaffoldType.SelectedIndex == 1 || CbxScaffoldType.SelectedIndex == 2)
            {
                #region (˫��+����+����)�����������,һ����
                #region  ������ʼ��
                //�������ϣ�һ������������ʼ��
                double Sum1D1P2 = 0, Sum1D1Q = 0, Sum1D1q1 = 0, Sum1D1q2 = 0;//һ��1.��������ֵ����
                double Sum1D2M1 = 0, Sum1D2M2 = 0, Sum1D2�� = 0; //һ��2.����ǿ�ȼ���
                string CompareD2�� = "";
                double Sum1D3q1 = 0, Sum1D3V = 0;//һ��3.�Ӷȼ���
                string CompareD3V = "";
                double Sum1X1P1 = 0, Sum1X1P2 = 0, Sum1X1Q = 0, Sum1X1P = 0; //1.����ֵ����
                double Sum1X1M = 0, Sum1X2�� = 0; //��2.����ǿ�ȼ���
                string CompareX2�� = "";
                double Sum1X3V1 = 0, Sum1X3P = 0, Sum1X3V2 = 0, Sum1X3V = 0;  //��3.�Ӷȼ���
                string CompareX3V1 = "";
                double Sum1K1P1 = 0, Sum1K1P2 = 0, Sum1K1Q = 0, Sum1K1R = 0;  //�����ۼ��������ļ���:
                string CompareK1R = "";
                //С������ϣ�һ������������ʼ��
                double Sum2X1q2 = 0, Sum2X1dQ = 0, Sum2X1xq = 0, Sum2X2M = 0, Sum2X2�� = 0, Sum2X3V1 = 0;//һ��С�������,la2+la,������������
                string Compare2X2�� = "" , Compare2X3V1 = ""; //С��˵ļ���ǿ�ȣ�С��˵�����Ӷ�
                double Sum2D1Fk = 0, Sum2D1F = 0, Sum2D2Mmax = 0, Sum2D2�� = 0, Sum2D3V = 0, Sum2KR = 0;//�������������,la2+la,������������
                string Compare2D2�� = "",Compare2D3V = "",Compare2K1R = "";//���˵ļ���ǿ�ȱȽϣ����˵�����ӶȱȽϣ����ۼ�����������
                #endregion
                #region �������
                if (Rdo_Item2DHG.Checked) //��������
                {
                    #region �������� ���������һ����
                    //һ�����˵ļ���:
                    //һ��1.��������ֵ����
                    Sum1D1P2 = pc4_2 * pc1_2 / (pc2_7 + 1);//���ְ�ĺ��ر�׼ֵ
                    Sum1D1Q = pc5_3 * pc1_2 / (pc2_7 + 1);// ����ر�׼ֵ
                    Sum1D1q1 = 1.2 * 0.04 + 1.2 * Sum1D1P2;//�����ص����ֵ
                    Sum1D1q2 = 1.4 * Sum1D1Q;// ����ص����ֵ
                    //һ��2.����ǿ�ȼ���
                    Sum1D2M1 = (0.08 * Sum1D1q1 + 0.10 * Sum1D1q2) * pc1_1 * pc1_1;// ����������
                    Sum1D2M2 = -(0.10 * Sum1D1q1 + 0.117 * Sum1D1q2) * pc1_1 * pc1_1;//֧��������
                    Sum1D2�� = Math.Max(Math.Abs(Sum1D2M1), Math.Abs(Sum1D2M2)) * Math.Pow(10, 6) / 5260; //ѡ��֧�����M2�Ϳ������M1�����ֵ����ǿ������
                    if (Sum1D2�� <= 205) { CompareD2�� = "���˵ļ���ǿ��С��205.0N/mm2,����Ҫ��!"; }
                    else if (Sum1D2�� == 205) { CompareD2�� = "���˵ļ���ǿ�ȵ���205.0N/mm2,����Ҫ��!"; }
                    else if (Sum1D2�� >= 205) { CompareD2�� = "���˵ļ���ǿ��С��205.0N/mm2,������Ҫ��!"; }
                    //һ��3.�Ӷȼ���
                    Sum1D3q1 = 0.040 + Sum1D1P2;
                    Sum1D3V = (0.677 * Sum1D3q1 + 0.990 * Sum1D1Q) * (pc1_1) * 4 / (100 * 2.06 * 105 * 127100.0);
                    if ((Sum1D3V <= (pc1_1 / 150)) && (Sum1D3V <= 10)) { CompareD3V = "���˵�����Ӷ�С�������ݾ�/150��10mm,����Ҫ��!"; }
                    else if ((Sum1D3V == (pc1_1 / 150)) && (Sum1D3V == 10)) { CompareD3V = "���˵�����Ӷȵ��������ݾ�/150��10mm,����Ҫ��!"; }
                    else if ((Sum1D3V >= (pc1_1 / 150)) && (Sum1D3V >= 10)) { CompareD3V = "���˵�����Ӷȴ��������ݾ�/150��10mm,������Ҫ��!"; }
                    //����С��˵ļ���:
                    //��1.����ֵ����
                    Sum1X1P1 = 0.040 * pc1_1;//���˵����ر�׼ֵ
                    Sum1X1P2 = pc4_2 * pc1_2 * pc1_1 / (pc2_7 + 1);//���ְ�ĺ��ر�׼ֵ
                    Sum1X1Q = pc5_3 * pc1_2 * pc1_1 / (pc2_7 + 1);  //����ر�׼ֵ
                    Sum1X1P = 1.2 * Sum1X1P1 + 1.2 * Sum1X1P2 + 1.4 * Sum1X1Q;//���ص����ֵ
                    //��2.����ǿ�ȼ���
                    Sum1X1M = (1.2 * 0.040) * Math.Pow(pc1_2, 2) / 8 + (Sum1X1P * pc1_2) / (pc2_7 + 1);
                    Sum1X2�� = Sum1X1M * Math.Pow(10, 6) / 5260.0;
                    if (Sum1X2�� <= 205) { CompareX2�� = "С��˵ļ���ǿ��С��205.0N/mm2,����Ҫ��!"; }
                    else if (Sum1X2�� == 205) { CompareX2�� = "С��˵ļ���ǿ��С��205.0N/mm2,����Ҫ��!"; }
                    else if (Sum1X2�� >= 205) { CompareX2�� = "С��˵ļ���ǿ��С��205.0N/mm2,����Ҫ��!"; }
                    //��3.�Ӷȼ���
                    Sum1X3V1 = 5.0 * 0.040 * Math.Pow(pc1_2, 4) / (384 * 2.060 * Math.Pow(10, 5) * 127100.000); //С������ؾ����������������Ӷ�
                    Sum1X3P = Sum1X1P1 + Sum1X1P2 + Sum1X1Q;//���к��ر�׼ֵ
                    Sum1X3V2 = Sum1X3P * 1000 * pc1_2 * (3 * Math.Pow(pc1_2, 2) - 4 * Math.Pow(pc1_2, 2) / 9) / (72 * 2.06 * Math.Pow(10, 5) * 127100.0);//���к��ر�׼ֵ����������������Ӷ�
                    Sum1X3V = Sum1X3V1 + Sum1X3V2;//����ӶȺ�
                    if ((Sum1X3V1 <= (pc1_2 / 150)) && (Sum1X3V1 <= 10)) { CompareX3V1 = " С��˵�����Ӷ�С�� ���˺��/150��10mm,����Ҫ��!"; }
                    else if ((Sum1X3V1 == (pc1_2 / 150)) && (Sum1X3V1 == 10)) { CompareX3V1 = "С��˵�����Ӷȵ��� ���˺��/150��10mm,����Ҫ��!"; }
                    else if ((Sum1X3V1 >= (pc1_2 / 150)) && (Sum1X3V1 >= 10)) { CompareX3V1 = "С��˵�����Ӷȴ��� ���˺��/150��10mm,������Ҫ��!"; }
                    //�����ۼ��������ļ���:
                    Sum1K1P1 = 0.040 * pc1_2; //��˵����ر�׼ֵ
                    Sum1K1P2 = pc1_2 * pc1_2 * pc1_1 / 2;//���ְ�ĺ��ر�׼ֵ
                    Sum1K1Q = @pc5_3 * pc1_2 * pc1_1 / 2; //����ر�׼ֵ
                    Sum1K1R = 1.2 * Sum1K1P1 + 1.2 * Sum1K1P2 + 1.4 * Sum1K1Q;//���ص����ֵ
                    if (Sum1K1R <= pc1_7) { CompareK1R = "С��˵ļ���ǿ��С��205.0N/mm2,����Ҫ��!"; }
                    else if (Sum1K1R == pc1_7) { CompareK1R = "С��˵ļ���ǿ��С��205.0N/mm2,����Ҫ��!"; }
                    #region ������������ת��
                    Sum1D1P2 = Convert.ToDouble(Sum1D1P2.ToString("f3"));
                    Sum1D1Q = Convert.ToDouble(Sum1D1Q.ToString("f3"));
                    Sum1D1q1 = Convert.ToDouble(Sum1D1q1.ToString("f3"));
                    Sum1D1q2 = Convert.ToDouble(Sum1D1q2.ToString("f3"));
                    Sum1D2M1 = Convert.ToDouble(Sum1D2M1.ToString("f3"));
                    Sum1D2M2 = Convert.ToDouble(Sum1D2M2.ToString("f3"));
                    Sum1D2�� = Convert.ToDouble(Sum1D2��.ToString("f3"));
                    Sum1D3q1 = Convert.ToDouble(Sum1D3q1.ToString("f3"));
                    Sum1D3V = Convert.ToDouble(Sum1D3V.ToString("f3"));
                    Sum1X1P1 = Convert.ToDouble(Sum1X1P1.ToString("f3"));
                    Sum1X1P2 = Convert.ToDouble(Sum1X1P2.ToString("f3"));
                    Sum1X1Q = Convert.ToDouble(Sum1X1Q.ToString("f3"));
                    Sum1X1P = Convert.ToDouble(Sum1X1P.ToString("f3"));
                    Sum1X1M = Convert.ToDouble(Sum1X1M.ToString("f3"));
                    Sum1X2�� = Convert.ToDouble(Sum1X2��.ToString("f3"));
                    Sum1X3V1 = Convert.ToDouble(Sum1X3V1.ToString("f3"));
                    Sum1X3P = Convert.ToDouble(Sum1X3P.ToString("f3"));
                    Sum1X3V2 = Convert.ToDouble(Sum1X3V2.ToString("f3"));
                    Sum1X3V = Convert.ToDouble(Sum1X3V.ToString("f3"));
                    Sum1K1P1 = Convert.ToDouble(Sum1K1P1.ToString("f3"));
                    Sum1K1P2 = Convert.ToDouble(Sum1K1P2.ToString("f3"));
                    Sum1K1Q = Convert.ToDouble(Sum1K1Q.ToString("f3"));
                    Sum1K1R = Convert.ToDouble(Sum1K1R.ToString("f3"));
                    #endregion

                    #endregion
                }
                else if(Rdo_Item2XHG.Checked==true ) //�������
                {
                    #region һ��С�������,la2+la,�����ļ������,һ:
                    Sum2X1q2 = pc4_2 * pc1_2 / pc2_5;
                    Sum2X1dQ = pc5_3 * pc1_1 / pc2_5;
                    Sum2X1xq = 1.2 * 0.040 + 1.2 * Sum2X1q2 + 1.4 * Sum2X1dQ;
                    Sum2X2M = Sum2X1xq * pc1_2 * pc1_2 / 8;
                    Sum2X2�� = Sum2X2M * Math.Pow(10, 6) / 5260.0;
                    Sum2X3V1 = 5.0 * (0.040 + Sum2X1q2) * Math.Pow(pc1_2, 4) / (384 * 2.060 * Math.Pow(10, 5) * 127100.000);
                    if (Sum2X2�� <= 205) { Compare2X2�� = "С��˵ļ���ǿ��С��205.0N/mm2,����Ҫ��!"; }
                    else if (Sum2X2�� == 205) { Compare2X2�� = "С��˵ļ���ǿ�ȵ���205.0N/mm2,����Ҫ��!"; }
                    else if (Sum2X2�� >= 205) { Compare2X2�� = "С��˵ļ���ǿ�ȴ���205.0N/mm2,������Ҫ��!"; }
                    if ((Sum2X3V1 <= (pc1_2 / 150)) && (Sum2X3V1 <= 10)) { Compare2X3V1 = "С��˵�����Ӷ�С�����˺��/150��10mm,����Ҫ��!"; }
                    else if ((Sum2X3V1 == (pc1_2 / 150)) && (Sum2X3V1 == 10)) { Compare2X3V1 = "С��˵�����Ӷȵ������˺��/150��10mm,����Ҫ��!"; }
                    else if ((Sum2X3V1 >= (pc1_2 / 150)) && (Sum2X3V1 >= 10)) { Compare2X3V1 = "С��˵�����Ӷȴ������˺��/150��10mm,������Ҫ��!"; }
                    #endregion
                    if (Cb_Item2LGZJ.SelectedIndex == 0)//С������������ݾ�la2
                    {
                        #region С�������la2,������̶���
                        //�������˵ļ���:
                        Sum2D1Fk = 0.5 * (0.040 + Sum2X1q2 + Sum2X1dQ) * pc1_2 * (1 + pc1_6 / pc1_2);
                        Sum2D1F = 0.5 * Sum2X1xq * pc1_2 * (1 + pc1_6 / pc1_2);
                        Sum2D2Mmax = 0.175 * Sum2D1F * pc1_1 + 0.1 * 0.040 * pc1_1 * pc1_1;
                        Sum2D2�� = Sum2D2Mmax * Math.Pow(10, 6) / 5260.0;
                        Sum2D3V = (0.677 * 0.04 * pc1_1 + 1.146 * Sum2D1Fk) * Math.Pow(pc1_1, 3) / (100 * 2.06 * Math.Pow(10, 5) * 127100.0);
                        //�����ۼ��������ļ���:
                        Sum2KR = 2.15 * 3.412 + 0.040 * pc1_1 / 3;
                        #endregion
                    }
                    else if (Cb_Item2LGZJ.SelectedIndex == 1)//С������������ݾ�la
                    {
                        #region С�������la,������̶���
                        //�������˵ļ���:
                        Sum2D1Fk = 0.5 * (0.040 + Sum2X1q2 + Sum2X1dQ) * pc1_2 * (1 + pc1_6 / pc1_2);
                        Sum2D1F = 0.5 * Sum2X1xq * pc1_2 * (1 + pc1_6 / pc1_2);
                        Sum2D2Mmax = 0.1 * 0.040 * pc1_1 * pc1_1;//��ͬ��la2֮��
                        Sum2D2�� = Sum2D2Mmax * Math.Pow(10, 6) / 5260.0;
                        Sum2D3V = (0.677 * 0.04 * Math.Pow(pc1_1, 4)) / (100 * 2.06 * Math.Pow(10, 5) * 127100.0);
                        //�����ۼ��������ļ���:
                        Sum2KR = 3.412 + 0.040 * pc1_1 / 3;
                        #endregion
                    }
                    if (Sum2D2�� <= 205) { Compare2D2�� = "���˵ļ���ǿ��С��205.0N/mm2,����Ҫ��!"; }
                    else if (Sum2D2�� == 205) { Compare2D2�� = "���˵ļ���ǿ�ȵ���205.0N/mm2,����Ҫ��!"; }
                    else if (Sum2D2�� >= 205) { Compare2D2�� = "���˵ļ���ǿ�ȴ���205.0N/mm2,������Ҫ��!"; }
                    if ((Sum2D3V <= (pc1_1 / 150)) && (Sum2D3V <= 10)) { Compare2D3V = "���˵�����Ӷ�С�������ݾ�/150��10mm,����Ҫ��!"; }
                    else if ((Sum2D3V == (pc1_1 / 150)) && (Sum2D3V == 10)) { Compare2D3V = "���˵�����Ӷȵ��������ݾ�/150��10mm,����Ҫ��!"; }
                    else if ((Sum2D3V >= (pc1_1 / 150)) && (Sum2D3V >= 10)) { Compare2D3V = "���˵�����Ӷȴ��������ݾ�/150��10mm,������Ҫ��!"; }
                    if (Sum2KR <= pc1_7) { Compare2K1R = "���ۼ���������������Ƽ�������Ҫ��!"; }
                    else if (Sum2KR == pc1_7) { Compare2K1R = "���ۼ���������������Ƽ��㲻����Ҫ��!"; }
                }
                #endregion
                #region С�����������ת��
                Sum2X1q2 = Convert.ToDouble(Sum2X1q2.ToString("f3"));
                Sum2X1dQ = Convert.ToDouble(Sum2X1dQ.ToString("f3"));
                Sum2X1xq = Convert.ToDouble(Sum2X1xq.ToString("f3"));
                Sum2X2M = Convert.ToDouble(Sum2X2M.ToString("f3"));
                Sum2X2�� = Convert.ToDouble(Sum2X2��.ToString("f3"));
                Sum2X3V1 = Convert.ToDouble(Sum2X3V1.ToString("f3"));
                Sum2D1Fk = Convert.ToDouble(Sum2D1Fk.ToString("f3"));
                Sum2D1F = Convert.ToDouble(Sum2D1F.ToString("f3"));
                Sum2D2Mmax = Convert.ToDouble(Sum2D2Mmax.ToString("f3"));
                Sum2D2�� = Convert.ToDouble(Sum2D2��.ToString("f3"));
                Sum2D3V = Convert.ToDouble(Sum2D3V.ToString("f3"));
                Sum2KR = Convert.ToDouble(Sum2KR.ToString("f3"));
                #endregion

                #endregion

                #region (˫��+����+����)�����������,��������
                //�ġ����ּܺ��ر�׼ֵ:
                double Sum1NG1 = 0, Sum1NG2 = 0, Sum1NG3 = 0, Sum1NG4 = 0, Sum1NG = 0, Sum1NQ = 0, Sum1Wk = 0, Sum1YesN = 0, Sum1NoN = 0, Sum1MW = 0;
                Sum1NG1 = gk * pc1_4;
                if (CbxScaffoldType.SelectedIndex == 0 || CbxScaffoldType.SelectedIndex == 1)//(˫��+����)���ּ�
                {Sum1NG2 = pc4_2 * pc4_5 * pc1_1 * (pc1_2 + pc1_6) / 2;}
                else if (CbxScaffoldType.SelectedIndex == 2)//���Ž��ּ�
                { Sum1NG2 = pc4_2 * pc4_5 * pc1_1 * pc1_2  / 2; }
                Sum1NG3 = pc4_4 * pc1_1 * pc4_5 / 2;
                Sum1NG4 = pc4_6 * pc1_1 * pc1_4;
                Sum1NG = Sum1NG1 + Sum1NG2 + Sum1NG3 + Sum1NG4; //�����ر�׼ֵ
                Sum1NQ = pc5_3 * pc5_2 * pc1_1 * pc1_2 / 2;
                Sum1Wk = 0.7 * pc6_4 * ��z * ��s;
                Sum1YesN = 1.2 * Sum1NG + 0.9 * 1.4 * Sum1NQ;//���Ƿ����ʱ,���˵�����ѹ�����ֵ
                Sum1NoN = 1.2 * Sum1NG + 1.4 * Sum1NQ;//�����Ƿ����ʱ,���˵�����ѹ�����ֵ
                Sum1MW = 0.9 * 1.4 * Sum1Wk * pc1_1 * Math.Pow(pc1_3, 2) / 10;
                //�塢���˵��ȶ��Լ���:
                double LgU = 0, LgL0 = 0, Lg�� = 0, Lg�� = 0, Sum1No�� = 0, Sum1Yes�� = 0;
                LgU = YiweiShuzu(DbInput_Item1LGHJ.Value, Cb_Item3JJ.SelectedIndex);//���ú���,���㳤��ϵ��u
                LgL0 = 1.155 * LgU * pc1_3;
                Lg�� = LgL0 / 159;
                if (Lg�� > 250)
                {
                    Lg�� = 7320 / (Lg�� * Lg��);
                }
                else
                {
                    int Lg��y1 = Convert.ToInt32(Lg�� / 10);//�ڦ�y1��
                    int Lg��x1 = Convert.ToInt32(Lg�� % 10);// �ڦ�x1��
                    Lg�� = ��Array[Lg��y1, Lg��x1]; //��Array����Ϊȫ�ֱ���,�μ�����B.0.6������ѹ�������ȶ�ϵ����(Q235��)��
Пример #42
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
            }
        }
Пример #43
0
        private void Btn_CESubmit_Click(object sender, EventArgs e)
        {
            Framework.Entity.Template item = new Framework.Entity.Template();
            string itemtext = "LEC";
            object[] obj = new object[] { };

            double[] LEC_L = new double[] { 10, 6, 3, 1, 0.5, 0.2, 0.1 };
            double[] LEC_E = new double[] { 10, 6, 3, 2, 1, 0.5 };
            double[] LEC_C = new double[] { 100, 40, 15, 7, 3, 1 };

            //�ߴ�׹�� U1
            double D1_1, D1_2, D1_3, D1_4, D1_5, D1_6, D1_7, D1_8, D1_9, D1_10;
            string S1_1, S1_2, S1_3, S1_4, S1_5, S1_6, S1_7, S1_8, S1_9, S1_10;

            double L1_1, L1_2, L1_3, L1_4, L1_5, L1_6, L1_7, L1_8, L1_9, L1_10,
                   E1_1, E1_2, E1_3, E1_4, E1_5, E1_6, E1_7, E1_8, E1_9, E1_10,
                   C1_1, C1_2, C1_3, C1_4, C1_5, C1_6, C1_7, C1_8, C1_9, C1_10;

            L1_1 = LEC_L[cB_U1_a1L.SelectedIndex];
            L1_2 = LEC_L[cB_U1_a2L.SelectedIndex];
            L1_3 = LEC_L[cB_U1_a3L.SelectedIndex];
            L1_4 = LEC_L[cB_U1_a4L.SelectedIndex];
            L1_5 = LEC_L[cB_U1_a5L.SelectedIndex];
            L1_6 = LEC_L[cB_U1_a6L.SelectedIndex];
            L1_7 = LEC_L[cB_U1_a7L.SelectedIndex];
            L1_8 = LEC_L[cB_U1_a8L.SelectedIndex];
            L1_9 = LEC_L[cB_U1_a9L.SelectedIndex];
            L1_10 = LEC_L[cB_U1_a10L.SelectedIndex];

            E1_1 = LEC_E[cB_U1_a1E.SelectedIndex];
            E1_2 = LEC_E[cB_U1_a2E.SelectedIndex];
            E1_3 = LEC_E[cB_U1_a3E.SelectedIndex];
            E1_4 = LEC_E[cB_U1_a4E.SelectedIndex];
            E1_5 = LEC_E[cB_U1_a5E.SelectedIndex];
            E1_6 = LEC_E[cB_U1_a6E.SelectedIndex];
            E1_7 = LEC_E[cB_U1_a7E.SelectedIndex];
            E1_8 = LEC_E[cB_U1_a8E.SelectedIndex];
            E1_9 = LEC_E[cB_U1_a9E.SelectedIndex];
            E1_10 = LEC_E[cB_U1_a10E.SelectedIndex];

            C1_1 = LEC_C[cB_U1_a1C.SelectedIndex];
            C1_2 = LEC_C[cB_U1_a2C.SelectedIndex];
            C1_3 = LEC_C[cB_U1_a3C.SelectedIndex];
            C1_4 = LEC_C[cB_U1_a4C.SelectedIndex];
            C1_5 = LEC_C[cB_U1_a5C.SelectedIndex];
            C1_6 = LEC_C[cB_U1_a6C.SelectedIndex];
            C1_7 = LEC_C[cB_U1_a7C.SelectedIndex];
            C1_8 = LEC_C[cB_U1_a8C.SelectedIndex];
            C1_9 = LEC_C[cB_U1_a9C.SelectedIndex];
            C1_10 = LEC_C[cB_U1_a10C.SelectedIndex];

            D1_1 = LEC_L[cB_U1_a1L.SelectedIndex] * LEC_E[cB_U1_a1E.SelectedIndex] * LEC_C[cB_U1_a1C.SelectedIndex];
            D1_2 = LEC_L[cB_U1_a2L.SelectedIndex] * LEC_E[cB_U1_a2E.SelectedIndex] * LEC_C[cB_U1_a2C.SelectedIndex];
            D1_3 = LEC_L[cB_U1_a3L.SelectedIndex] * LEC_E[cB_U1_a3E.SelectedIndex] * LEC_C[cB_U1_a3C.SelectedIndex];
            D1_4 = LEC_L[cB_U1_a4L.SelectedIndex] * LEC_E[cB_U1_a4E.SelectedIndex] * LEC_C[cB_U1_a4C.SelectedIndex];
            D1_5 = LEC_L[cB_U1_a5L.SelectedIndex] * LEC_E[cB_U1_a5E.SelectedIndex] * LEC_C[cB_U1_a5C.SelectedIndex];
            D1_6 = LEC_L[cB_U1_a6L.SelectedIndex] * LEC_E[cB_U1_a6E.SelectedIndex] * LEC_C[cB_U1_a6C.SelectedIndex];
            D1_7 = LEC_L[cB_U1_a7L.SelectedIndex] * LEC_E[cB_U1_a7E.SelectedIndex] * LEC_C[cB_U1_a7C.SelectedIndex];
            D1_8 = LEC_L[cB_U1_a8L.SelectedIndex] * LEC_E[cB_U1_a8E.SelectedIndex] * LEC_C[cB_U1_a8C.SelectedIndex];
            D1_9 = LEC_L[cB_U1_a9L.SelectedIndex] * LEC_E[cB_U1_a9E.SelectedIndex] * LEC_C[cB_U1_a9C.SelectedIndex];
            D1_10 = LEC_L[cB_U1_a10L.SelectedIndex] * LEC_E[cB_U1_a10E.SelectedIndex] * LEC_C[cB_U1_a10C.SelectedIndex];

            S1_1 = level(D1_1);
            S1_2 = level(D1_2);
            S1_3 = level(D1_3);
            S1_4 = level(D1_4);
            S1_5 = level(D1_5);
            S1_6 = level(D1_6);
            S1_7 = level(D1_7);
            S1_8 = level(D1_8);
            S1_9 = level(D1_9);
            S1_10 = level(D1_10);

            //̮��U2
            double D2_1, D2_2, D2_3, D2_4, D2_5, D2_6, D2_7, D2_8;
            string S2_1, S2_2, S2_3, S2_4, S2_5, S2_6, S2_7, S2_8;

            double L2_1, L2_2, L2_3, L2_4, L2_5, L2_6, L2_7, L2_8,
                   E2_1, E2_2, E2_3, E2_4, E2_5, E2_6, E2_7, E2_8,
                   C2_1, C2_2, C2_3, C2_4, C2_5, C2_6, C2_7, C2_8;

            L2_1 = LEC_L[cB_U2_a1L.SelectedIndex];
            L2_2 = LEC_L[cB_U2_a2L.SelectedIndex];
            L2_3 = LEC_L[cB_U2_a3L.SelectedIndex];
            L2_4 = LEC_L[cB_U2_a4L.SelectedIndex];
            L2_5 = LEC_L[cB_U2_a5L.SelectedIndex];
            L2_6 = LEC_L[cB_U2_a6L.SelectedIndex];
            L2_7 = LEC_L[cB_U2_a7L.SelectedIndex];
            L2_8 = LEC_L[cB_U2_a8L.SelectedIndex];

            E2_1 = LEC_E[cB_U2_a1E.SelectedIndex];
            E2_2 = LEC_E[cB_U2_a2E.SelectedIndex];
            E2_3 = LEC_E[cB_U2_a3E.SelectedIndex];
            E2_4 = LEC_E[cB_U2_a4E.SelectedIndex];
            E2_5 = LEC_E[cB_U2_a5E.SelectedIndex];
            E2_6 = LEC_E[cB_U2_a6E.SelectedIndex];
            E2_7 = LEC_E[cB_U2_a7E.SelectedIndex];
            E2_8 = LEC_E[cB_U2_a8E.SelectedIndex];

            C2_1 = LEC_C[cB_U2_a1C.SelectedIndex];
            C2_2 = LEC_C[cB_U2_a2C.SelectedIndex];
            C2_3 = LEC_C[cB_U2_a3C.SelectedIndex];
            C2_4 = LEC_C[cB_U2_a4C.SelectedIndex];
            C2_5 = LEC_C[cB_U2_a5C.SelectedIndex];
            C2_6 = LEC_C[cB_U2_a6C.SelectedIndex];
            C2_7 = LEC_C[cB_U2_a7C.SelectedIndex];
            C2_8 = LEC_C[cB_U2_a8C.SelectedIndex];

            D2_1 = LEC_L[cB_U2_a1L.SelectedIndex] * LEC_E[cB_U2_a1E.SelectedIndex] * LEC_C[cB_U2_a1C.SelectedIndex];
            D2_2 = LEC_L[cB_U2_a2L.SelectedIndex] * LEC_E[cB_U2_a2E.SelectedIndex] * LEC_C[cB_U2_a2C.SelectedIndex];
            D2_3 = LEC_L[cB_U2_a3L.SelectedIndex] * LEC_E[cB_U2_a3E.SelectedIndex] * LEC_C[cB_U2_a3C.SelectedIndex];
            D2_4 = LEC_L[cB_U2_a4L.SelectedIndex] * LEC_E[cB_U2_a4E.SelectedIndex] * LEC_C[cB_U2_a4C.SelectedIndex];
            D2_5 = LEC_L[cB_U2_a5L.SelectedIndex] * LEC_E[cB_U2_a5E.SelectedIndex] * LEC_C[cB_U2_a5C.SelectedIndex];
            D2_6 = LEC_L[cB_U2_a6L.SelectedIndex] * LEC_E[cB_U2_a6E.SelectedIndex] * LEC_C[cB_U2_a6C.SelectedIndex];
            D2_7 = LEC_L[cB_U2_a7L.SelectedIndex] * LEC_E[cB_U2_a7E.SelectedIndex] * LEC_C[cB_U2_a7C.SelectedIndex];
            D2_8 = LEC_L[cB_U2_a8L.SelectedIndex] * LEC_E[cB_U2_a8E.SelectedIndex] * LEC_C[cB_U2_a8C.SelectedIndex];

            S2_1 = level(D2_1);
            S2_2 = level(D2_2);
            S2_3 = level(D2_3);
            S2_4 = level(D2_4);
            S2_5 = level(D2_5);
            S2_6 = level(D2_6);
            S2_7 = level(D2_7);
            S2_8 = level(D2_8);

            //������U3
            double D3_1, D3_2, D3_3, D3_4;
            string S3_1, S3_2, S3_3, S3_4;

            double L3_1, L3_2, L3_3, L3_4,
                   E3_1, E3_2, E3_3, E3_4,
                   C3_1, C3_2, C3_3, C3_4;

            L3_1 = LEC_L[cB_U3_a1L.SelectedIndex];
            L3_2 = LEC_L[cB_U3_a2L.SelectedIndex];
            L3_3 = LEC_L[cB_U3_a3L.SelectedIndex];
            L3_4 = LEC_L[cB_U3_a4L.SelectedIndex];

            E3_1 = LEC_E[cB_U3_a1E.SelectedIndex];
            E3_2 = LEC_E[cB_U3_a2E.SelectedIndex];
            E3_3 = LEC_E[cB_U3_a3E.SelectedIndex];
            E3_4 = LEC_E[cB_U3_a4E.SelectedIndex];

            C3_1 = LEC_C[cB_U3_a1C.SelectedIndex];
            C3_2 = LEC_C[cB_U3_a2C.SelectedIndex];
            C3_3 = LEC_C[cB_U3_a3C.SelectedIndex];
            C3_4 = LEC_C[cB_U3_a4C.SelectedIndex];

            D3_1 = LEC_L[cB_U3_a1L.SelectedIndex] * LEC_E[cB_U3_a1E.SelectedIndex] * LEC_C[cB_U3_a1C.SelectedIndex];
            D3_2 = LEC_L[cB_U3_a2L.SelectedIndex] * LEC_E[cB_U3_a2E.SelectedIndex] * LEC_C[cB_U3_a2C.SelectedIndex];
            D3_3 = LEC_L[cB_U3_a3L.SelectedIndex] * LEC_E[cB_U3_a3E.SelectedIndex] * LEC_C[cB_U3_a3C.SelectedIndex];
            D3_4 = LEC_L[cB_U3_a4L.SelectedIndex] * LEC_E[cB_U3_a4E.SelectedIndex] * LEC_C[cB_U3_a4C.SelectedIndex];

            S3_1 = level(D3_1);
            S3_2 = level(D3_2);
            S3_3 = level(D3_3);
            S3_4 = level(D3_4);

            //����U4
            double D4_1, D4_2;
            string S4_1, S4_2;

            double L4_1, L4_2,
                   E4_1, E4_2,
                   C4_1, C4_2;

            L4_1 = LEC_L[cB_U4_a1L.SelectedIndex];
            L4_2 = LEC_L[cB_U4_a2L.SelectedIndex];

            E4_1 = LEC_E[cB_U4_a1E.SelectedIndex];
            E4_2 = LEC_E[cB_U4_a2E.SelectedIndex];

            C4_1 = LEC_C[cB_U4_a1C.SelectedIndex];
            C4_2 = LEC_C[cB_U4_a2C.SelectedIndex];

            D4_1 = LEC_L[cB_U4_a1L.SelectedIndex] * LEC_E[cB_U4_a1E.SelectedIndex] * LEC_C[cB_U4_a1C.SelectedIndex];
            D4_2 = LEC_L[cB_U4_a2L.SelectedIndex] * LEC_E[cB_U4_a2E.SelectedIndex] * LEC_C[cB_U4_a2C.SelectedIndex];

            S4_1 = level(D4_1);
            S4_2 = level(D4_2);

            //����U5
            double D5_1, D5_2, D5_3;
            string S5_1, S5_2, S5_3;

            double L5_1, L5_2, L5_3,
                   E5_1, E5_2, E5_3,
                   C5_1, C5_2, C5_3;

            L5_1 = LEC_L[cB_U5_a1L.SelectedIndex];
            L5_2 = LEC_L[cB_U5_a2L.SelectedIndex];
            L5_3 = LEC_L[cB_U5_a3L.SelectedIndex];

            E5_1 = LEC_E[cB_U5_a1E.SelectedIndex];
            E5_2 = LEC_E[cB_U5_a2E.SelectedIndex];
            E5_3 = LEC_E[cB_U5_a3E.SelectedIndex];

            C5_1 = LEC_C[cB_U5_a1C.SelectedIndex];
            C5_2 = LEC_C[cB_U5_a2C.SelectedIndex];
            C5_3 = LEC_C[cB_U5_a3C.SelectedIndex];

            D5_1 = LEC_L[cB_U5_a1L.SelectedIndex] * LEC_E[cB_U5_a1E.SelectedIndex] * LEC_C[cB_U5_a1C.SelectedIndex];
            D5_2 = LEC_L[cB_U5_a2L.SelectedIndex] * LEC_E[cB_U5_a2E.SelectedIndex] * LEC_C[cB_U5_a2C.SelectedIndex];
            D5_3 = LEC_L[cB_U5_a3L.SelectedIndex] * LEC_E[cB_U5_a3E.SelectedIndex] * LEC_C[cB_U5_a3C.SelectedIndex];

            S5_1 = level(D5_1);
            S5_2 = level(D5_2);
            S5_3 = level(D5_3);

            obj = new object[] { D1_1, D1_2, D1_3, D1_4, D1_5, D1_6, D1_7, D1_8, D1_9, D1_10, D2_1, D2_2, D2_3, D2_4,
                D2_5, D2_6, D2_7, D2_8, D3_1, D3_2, D3_3, D3_4, D4_1, D4_2, D5_1, D5_2, D5_3, S1_1, S1_2, S1_3, S1_4,
                S1_5, S1_6, S1_7, S1_8, S1_9, S1_10, S2_1, S2_2, S2_3, S2_4, S2_5, S2_6, S2_7, S2_8, S3_1, S3_2, S3_3,
                S3_4, S4_1, S4_2, S5_1, S5_2, S5_3, L1_1, L1_2, L1_3, L1_4, L1_5, L1_6, L1_7, L1_8, L1_9, L1_10, E1_1,
                E1_2, E1_3, E1_4, E1_5, E1_6, E1_7, E1_8, E1_9, E1_10, C1_1, C1_2, C1_3, C1_4, C1_5, C1_6, C1_7, C1_8,
                C1_9, C1_10, L2_1, L2_2, L2_3, L2_4, L2_5, L2_6, L2_7, L2_8, E2_1, E2_2, E2_3, E2_4, E2_5, E2_6, E2_7,
                E2_8, C2_1, C2_2, C2_3, C2_4, C2_5, C2_6, C2_7, C2_8, L3_1, L3_2, L3_3, L3_4, E3_1, E3_2, E3_3, E3_4,
                C3_1, C3_2, C3_3, C3_4, L4_1, L4_2, E4_1, E4_2, C4_1, C4_2, L5_1, L5_2, L5_3, E5_1, E5_2, E5_3, C5_1,
                C5_2, C5_3};

            foreach (Framework.Entity.Template template in templateList)
            {
                if (itemtext == template.Title)
                {
                    item = template;
                    break;
                }
            }
            CreateModuleIntance(item, null, @class, obj);
            this.Close();
        }
Пример #44
0
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            #region  //获取模板的内容
            string templatename = "";
            if (Rdo_Item1DP.Checked)
            {
                templatename = "扣件式钢管脚手架(落地)单排";
            }
            else if (Rdo_Item1SP.Checked)
            {
                templatename = "扣件式钢管脚手架(落地)双排";
            }
            Framework.Entity.Template    templatetemp = new Framework.Entity.Template();
            System.Collections.ArrayList templateList = contentService.GetContentTemplateByTitle(chaptertemp.Title);
            foreach (Framework.Entity.Template template in templateList)
            {
                if (template.Title == templatename)
                {
                    templatetemp = template;
                    break;
                }
            }
            #endregion

            System.Collections.ArrayList array  = new System.Collections.ArrayList();
            System.Collections.ArrayList array1 = new System.Collections.ArrayList();
            System.Collections.ArrayList array2 = new System.Collections.ArrayList();
            System.Collections.ArrayList array3 = new System.Collections.ArrayList();
            for (int i = 0; i < Dgv_Recommend1Material.Rows.Count; i++)
            {
                if (Dgv_Recommend1Material.Rows[i].Cells[1].Value != null)
                {
                    array1.Add(new object[] { i + 1, Dgv_Recommend1Material.Rows[i].Cells[1].Value, Dgv_Recommend1Material.Rows[i].Cells[2].Value, Dgv_Recommend1Material.Rows[i].Cells[3].Value });
                }
            }
            for (int i = 0; i < Dgv_Recommend1Labor.Rows.Count; i++)
            {
                if (Dgv_Recommend1Labor.Rows[i].Cells[1].Value != null)
                {
                    array2.Add(new object[] { i + 1, Dgv_Recommend1Labor.Rows[i].Cells[1].Value, Dgv_Recommend1Labor.Rows[i].Cells[2].Value });
                }
            }
            for (int i = 0; i < Dgv_Recommend1Tool.Rows.Count; i++)
            {
                if (Dgv_Recommend1Tool.Rows[i].Cells[1].Value != null)
                {
                    array3.Add(new object[] { i + 1, Dgv_Recommend1Tool.Rows[i].Cells[1].Value, Dgv_Recommend1Tool.Rows[i].Cells[2].Value, Dgv_Recommend1Tool.Rows[i].Cells[3].Value });
                }
            }
            array.Add(array1);
            array.Add(array2);
            array.Add(array3);


            string   textDxhg = "";
            string   textLqj  = "";
            object[] data     = new object[] { };
            if (Rdo_Item1DHG.Checked)
            {
                textDxhg = Rdo_Item1DHG.Text;
            }
            else if (Rdo_Item1XHG.Checked)
            {
                textDxhg = Rdo_Item1XHG.Text;
            }
            if (Rdo_Item1LBSK.Checked)
            {
                textLqj = Rdo_Item1LBSK.Text;
            }
            else if (Rdo_Item1SBSK.Checked)
            {
                textLqj = Rdo_Item1SBSK.Text;
            }

            if (Rdo_Item1DP.Checked)
            {
                data = new object[] { Tb_Item1DSGD.Text, Tb_Item1HJ.Text, Tb_Item1ZJ.Text, Tb_Item1BJ.Text, textLqj, textDxhg };
            }
            if (Rdo_Item1SP.Checked)
            {
                data = new object[] { Tb_Item1DSGD.Text, Tb_Item1HJ.Text, Tb_Item1ZJ.Text, Tb_Item1BJ.Text, Tb_Item1NLGJWQ.Text, Tb_Item1XHGLDJQ.Text, textLqj, textDxhg };
            }

            CreateModuleIntance(templatetemp, array, @class, data); //4.通过delegate数据变量执行实例方法
            this.Close();
        }
Пример #45
0
        private void BtnSubmit_Click(object sender, EventArgs e)
        {
            object[] obj = new object[] { };
            Framework.Entity.Template item = new Framework.Entity.Template();
            string itemtext = "��ģ��(����ʽ)";

            #region ��A.0.6������ѹ�������ȶ�ϵ����(Q235��)
            double[,] ��Array = new double[,] {  {	1	,	0.997	,	0.995	,	0.992	,	0.989	,	0.987	,	0.984	,	0.981	,	0.979	,	0.976	},
                                                                        {	0.974	,	0.971	,	0.968	,	0.966	,	0.963	,	0.96	,	0.958	,	0.955	,	0.952	,	0.949	},
                                                                        {	0.947	,	0.944	,	0.941	,	0.938	,	0.936	,	0.933	,	0.93	,	0.927	,	0.924	,	0.921	},
                                                                        {	0.918	,	0.915	,	0.912	,	0.909	,	0.906	,	0.903	,	0.899	,	0.896	,	0.893	,	0.889	},
                                                                        {	0.886	,	0.882	,	0.879	,	0.875	,	0.872	,	0.868	,	0.864	,	0.861	,	0.858	,	0.855	},
                                                                        {	0.852	,	0.849	,	0.846	,	0.843	,	0.839	,	0.836	,	0.832	,	0.829	,	0.825	,	0.822	},
                                                                        {	0.818	,	0.814	,	0.81	,	0.806	,	0.802	,	0.797	,	0.793	,	0.789	,	0.784	,	0.779	},
                                                                        {	0.775	,	0.77	,	0.765	,	0.76	,	0.755	,	0.75	,	0.744	,	0.739	,	0.733	,	0.728	},
                                                                        {	0.722	,	0.716	,	0.71	,	0.704	,	0.698	,	0.692	,	0.686	,	0.68	,	0.673	,	0.667	},
                                                                        {	0.661	,	0.654	,	0.648	,	0.641	,	0.634	,	0.626	,	0.618	,	0.611	,	0.603	,	0.595	},
                                                                        {	0.588	,	0.58	,	0.573	,	0.566	,	0.558	,	0.551	,	0.544	,	0.537	,	0.53	,	0.523	},
                                                                        {	0.516	,	0.509	,	0.502	,	0.496	,	0.489	,	0.483	,	0.476	,	0.47	,	0.464	,	0.458	},
                                                                        {	0.452	,	0.446	,	0.44	,	0.434	,	0.428	,	0.423	,	0.417	,	0.412	,	0.406	,	0.401	},
                                                                        {	0.396	,	0.391	,	0.386	,	0.381	,	0.376	,	0.371	,	0.367	,	0.362	,	0.357	,	0.353	},
                                                                        {	0.349	,	0.344	,	0.34	,	0.336	,	0.332	,	0.328	,	0.324	,	0.32	,	0.316	,	0.312	},
                                                                        {	0.308	,	0.305	,	0.301	,	0.298	,	0.294	,	0.291	,	0.287	,	0.284	,	0.281	,	0.277	},
                                                                        {	0.274	,	0.271	,	0.268	,	0.265	,	0.262	,	0.259	,	0.256	,	0.253	,	0.251	,	0.248	},
                                                                        {	0.245	,	0.243	,	0.24	,	0.237	,	0.235	,	0.232	,	0.23	,	0.227	,	0.225	,	0.223	},
                                                                        {	0.22	,	0.218	,	0.216	,	0.214	,	0.211	,	0.209	,	0.207	,	0.205	,	0.203	,	0.201	},
                                                                        {	0.199	,	0.197	,	0.195	,	0.193	,	0.191	,	0.189	,	0.188	,	0.186	,	0.184	,	0.182	},
                                                                        {	0.18	,	0.179	,	0.177	,	0.175	,	0.174	,	0.172	,	0.171	,	0.169	,	0.167	,	0.166	},
                                                                        {	0.164	,	0.163	,	0.161	,	0.16	,	0.159	,	0.157	,	0.156	,	0.154	,	0.153	,	0.152	},
                                                                        {	0.15	,	0.149	,	0.148	,	0.146	,	0.145	,	0.144	,	0.143	,	0.141	,	0.14	,	0.139	},
                                                                        {	0.138	,	0.137	,	0.136	,	0.135	,	0.133	,	0.132	,	0.131	,	0.13	,	0.129	,	0.128	},
                                                                        {	0.127	,	0.126	,	0.125	,	0.124	,	0.123	,	0.122	,	0.121	,	0.12	,	0.119	,	0.118	},
                                                                        {	0.117	,	0	,	0	,	0	,	0	,	0	,	0	,	0	,	0	,	0	}
                                                                    };
            #endregion
            //FKtabItem1�������
            double fk1_1, fk1_2, fk1_3, fk1_4, fk1_5, fk1_6, fk1_7, fk1_9, fk1_10, fk1_12, fk1_13, fk1_13_2, fk1_14;
            string fk1_8, fk1_11;

            fk1_1 = Db_FK_GD.Value;
            fk1_2 = Db_FK_HD.Value;
            fk1_3 = Db_FK_LBCB.Value;
            fk1_4 = Db_FK_LBDB.Value;
            fk1_5 = Db_FK_SPLGBJ.Value;
            fk1_6 = Db_FK_ZXJJ.Value;
            fk1_7 = Db_FK_HXJJ.Value;
            fk1_8 = Tb_FK_WZ.Text;
            fk1_9 = Convert.ToDouble(Tb_FK_DBJL.Text);
            fk1_10 = Convert.ToDouble(Tb_FK_CBJL.Text);
            fk1_11 = Tb_FK_ZLBZFX.Text;
            fk1_12 = Db_FK_XLJJ.Value;
            fk1_13 = Db_FK_XTCD.Value;
            fk1_13_2 = Db_FK_XTCD2.Value;
            fk1_14 = Db_FK_XLDBJL.Value;

            //FKtabItem2֧�Ų���+���
            string fk2_1, fk2_2;
            double fk2_3, fk2_4, fk2_5;

            //֧�Ų���
            fk2_1 = Cb_FK_2JDCLX.Text;

            //���
            fk2_2 = Cb_FK_2MBLX.Text;
            fk2_3 = Db_FK_2MBHD.Value;
            fk2_4 = Db_FK_2QD.Value;
            fk2_5 = Db_FK_2TXML.Value;

            //FKtabItem3��
            string fk3_1, fk3_2;
            double fk3_3, fk3_4, fk3_5, fk3_6, fk3_7, fk3_8, fk3_9,fk3_10;

            fk3_1 = Cb_FK_3XLCZ.Text;
            fk3_2 = Cb_FK_3JMLX.Text;
            fk3_3 = Db_FK_3FMK.Value;
            fk3_4 = Db_FK_3FMG.Value;
            fk3_5 = Db_FK_3KWQD.Value;
            fk3_6 = Db_FK_3KJQD.Value;
            fk3_7 = Db_FK_3TXML.Value;
            fk3_8 = Db_FK_3GXJ.Value;
            fk3_9 = Db_FK_3DKJ.Value;
            fk3_10 = Db_FK_3MJJ.Value;

            //FKtabItem4����
            string fk4_1, fk4_2;
            double fk4_3, fk4_4, fk4_5, fk4_6, fk4_7, fk4_8, fk4_9, fk4_10;

            fk4_1 = Cb_FK_4ZLCZ.Text;
            fk4_2 = Cb_FK_4JMLX.Text;
            fk4_3 = Db_FK_4FMK.Value;
            fk4_4 = Db_FK_4FMG.Value;
            fk4_5 = Db_FK_4KWQD.Value;
            fk4_6 = Db_FK_4KJQD.Value;
            fk4_7 = Db_FK_4TXML.Value;
            fk4_8 = Db_FK_4GXJ.Value;
            fk4_9 = Db_FK_4DKJ.Value;
            fk4_10 = Db_FK_4MJJ.Value;

            //FKtabItem5����+����
            string fk5_1;
            double fk5_2, fk5_3, fk5_4, fk5_5, fk5_6, fk5_7, fk5_8, fk5_9, fk5_10, fk5_11, fk5_12, fk5_13, fk5_14, fk5_15, fk5_16, fk5_17;
            //����
            fk5_1 = Cb_FK_5LZXH.Text;
            fk5_2 = Convert.ToDouble(Tb_FK_5RXHZ.Text);
            fk5_3 = Db_FK_5KYQD.Value;
            fk5_4 = Convert.ToDouble(Tb_FK_5CGHZBJ.Text);
            fk5_5 = Convert.ToDouble(Tb_FK_5TGHZBJ.Text);
            fk5_6 = Convert.ToDouble(Tb_FK_5CGJMMJ.Text);
            fk5_7 = Convert.ToDouble(Tb_FK_5TGJMMJ.Text);
            fk5_8 = Convert.ToDouble(Tb_FK_5CGGXJ.Text);
            fk5_9 = Convert.ToDouble(Tb_FK_5TGGXJ.Text);
            fk5_10 = Convert.ToDouble(Tb_FK_5CGDKJ.Text);
            fk5_11 = Convert.ToDouble(Tb_FK_5TGDKJ.Text);
            fk5_12 = Convert.ToDouble(Tb_FK_5CGBH.Text);
            fk5_13 = Convert.ToDouble(Tb_FK_5TGBH.Text);
            //����
            fk5_14 = Convert.ToDouble(Cb_FK_5CXZJ.Text);
            fk5_15 = Convert.ToDouble(Tb_FK_5CXJMMJ.Text);
            fk5_16 = Convert.ToDouble(Tb_FK_5KJQD.Text);
            fk5_17 = Convert.ToDouble(Tb_FK_5CYQD.Text);

            //FKtabItem6����ز���+��ѹ�߶ȱ仯ϵ��

            //FKtabItem7�ɵ�����+�ػ�����
            string fk7_3, fk7_4;
            double fk7_1, fk7_2, fk7_5, fk7_6, fk7_7;
            double[] zjxs = new double[] { 1.0,0.9,0.5,0.8,0.4};

            //�ɵ�����
            fk7_1 = Convert.ToDouble(Cb_FK_7ZLGS.Text);
            fk7_2 = Db_FK_7CZL.Value;

            //�ػ�����
            fk7_3 = Cb_FK_7ZYWZ.Text;
            fk7_4 = Cb_FK_7DJTLX.Text;
            fk7_5 = Db_FK_7CZL.Value;
            fk7_6 = zjxs[Cb_FK_7ZJXS.SelectedIndex];
            fk7_7 = Db_FK_7DMMJ.Value;

            //FKtabItem8���ز���
            double fk8_1, fk8_2, fk8_3, fk8_4, fk8_5, fk8_6, fk8_8, fk8_9, fk8_10, fk8_11;
            string fk8_7;

            //���ú���
            fk8_1 = Db_FK_8MBZZ.Value;
            fk8_2 = Db_FK_8MBJXLZZ.Value;
            fk8_3 = Db_FK_8LBMBZZ.Value;
            fk8_4 = Db_FK_8MBJZJZZ.Value;
            fk8_5 = Db_FK_8XJHNTZZ.Value;
            fk8_6 = Db_FK_8GJZZ.Value;
            //�ɱ����
            fk8_7 = Cbx_FK_8JSJYT.Text;
            fk8_8 = Db_FK_8MBXLJB.Value;
            fk8_9 = Db_FK_8MBXLJZ.Value;
            fk8_10 = Db_FK_8ZLJB.Value;
            fk8_11 = Db_FK_8LGJB.Value;

            #region һ���������
            double sum1I, sum1W, sum1G1k, sum1G2k, sum1G3k, sum1Gk, sum1Q1k, sum1P, sum1q, sum1q11, sum1q22, sum1q1, sum1P1, sum1q2, sum1P2, sum1M, sum1MA, sum1MB1, sum1MB2, sum1��, sum1��, sum1��2;
            string compare1_1, compare1_2;

            sum1I = 1000 / 12 * fk2_3 * fk2_3 * fk2_3;//��������Ծ�I
            sum1W = 1000 / 6 * fk2_3 * fk2_3;//������ֿ���W
            sum1G1k = fk8_1 * 1.000;//ģ�����ر�׼ֵG1k
            sum1G2k = fk8_5 * 1.00 * fk1_2;//�½��������ر�׼ֵG2k
            sum1G3k = fk8_6 * 1.00 * fk1_2;//�ֽ����ر�׼ֵG3k
            sum1Gk = sum1G1k + sum1G2k + sum1G3k;//���ú��ر�׼ֵGk
            sum1Q1k = fk8_8 * 1.00;//ʩ����Ա���豸���ر�׼ֵQ1k
            sum1P = fk8_9 * 1.00;//����ģ�����ʱ�ü��л���ؽ�������P
            sum1q11 = 0.9 * ((1.2 * sum1Gk) + (1.4 * sum1Q1k));//�ɱ����ЧӦ���Ƶ����
            sum1q22 = 0.9 * ((1.35 * sum1Gk) + (1.4 * 0.7 * sum1Q1k));//���ú���ЧӦ���Ƶ����
            /*
            if (sum1q11 > sum1q22)
                sum1q = sum1q11;
            else
                sum1q = sum1q22;
            */
            sum1q = sum1q11 > sum1q22 ? sum1q11 : sum1q22;
            sum1q1 = 0.9 * 1.2 * sum1Gk;
            sum1P1 = 0.9 * 1.4 * sum1P;
            sum1q2 = 0.9 * 1.35 * sum1Gk;
            sum1P2 = 0.9 * 1.4 * 0.7 * sum1P;
            sum1MA = 0.125 * sum1q * fk1_12 * fk1_12 / 1000 / 1000;
            sum1MB1 = (0.125 * sum1q1 * fk1_12 * fk1_12 / 1000 / 1000) + (0.25 * sum1P1 * fk1_12 / 1000);
            sum1MB2 = (0.125 * sum1q2 * fk1_12 * fk1_12 / 1000 / 1000) + (0.25 * sum1P2 * fk1_12 / 1000);
            if (sum1MA > sum1MB1)
            {
                if (sum1MA > sum1MB2)
                    sum1M = sum1MA;
                else
                    sum1M = sum1MB2;
            }
            else
            {
                if (sum1MB1 > sum1MB2)
                    sum1M = sum1MB1;
                else
                    sum1M = sum1MB2;
            }
            sum1�� = sum1M / sum1W;
            sum1�� = Math.Round(sum1��, 4);
            if (sum1�� <= fk2_4)
                compare1_1 = "���ļ���ǿ��" + sum1�� + "С�ڵ�����忹��ǿ�����ֵ" + fk2_4 + "N/mm2,����Ҫ��!";
            else
                compare1_1 = "���ļ���ǿ��" + sum1�� + "������忹��ǿ�����ֵ" + fk2_4 + "N/mm2,������Ҫ��!";
            sum1�� = 5 * sum1Gk * fk1_12 * fk1_12 * fk1_12 * fk1_12 / (384 * fk2_5 * sum1I);
            sum1��2 = Math.Floor(fk1_12 / 250) < 10 ? Math.Floor(fk1_12 / 250) : 10;
            sum1�� = Math.Round(sum1��, 2);
            if (sum1�� <= sum1��2)
                compare1_2 = "�����Ӷ�" + sum1�� + "С�ڵ��������������Ӷ�ֵ" + sum1��2 + "mm,����Ҫ��!";
            else
                compare1_2 = "�����Ӷ�" + sum1�� + "���������������Ӷ�ֵ" + sum1��2 + "mm,������Ҫ��!";

            sum1M = Math.Round(sum1M, 2);
            sum1MA = Math.Round(sum1MA, 2);
            sum1MB1 = Math.Round(sum1MB1, 2);
            sum1MB2 = Math.Round(sum1MB2, 2);
            sum1q22 = Math.Round(sum1q22, 2);
            sum1q11 = Math.Round(sum1q11, 2);
            sum1q = Math.Round(sum1q, 2);
            sum1q1 = Math.Round(sum1q1, 2);
            sum1q2 = Math.Round(sum1q2, 2);
            sum1P2 = Math.Round(sum1P2, 2);

            #endregion

            #region ����������
            double sum2n, sum2min, sum2max, sum2G1k, sum2G2k, sum2G3k, sum2Gk, sum2Q1k, sum2P, sum2qa11, sum2qa12, sum2qa21, sum2qa22, sum2q1, sum2P1, sum2q2, sum2P2, sum2MA1, sum2MA2, sum2MB1, sum2MB2, sum2M, sum2��,
                sum2VA1, sum2VA2, sum2VB1, sum2VB2, sum2V, sum2��, sum2q, sum2kz��, sum2kz��2, sum2xbd��, sum2xbd��2;
            string compare2_1, compare2_2, compare2_3, compare2_4, str2_��;

            sum2n = Math.Floor(fk1_4 / fk1_6);
            sum2min = sum2n < 5 ? sum2n : 5;
            sum2max = fk1_13 > fk1_13_2 ? fk1_13 : fk1_13_2;//С���ϴ��������
            sum2G1k = fk8_2 * fk1_12 / 1000;//��弰С�����ر�׼ֵG1k
            sum2G2k = fk8_5 * fk1_12 / 1000 * fk1_2 / 1000;//�½��������ر�׼ֵG2k
            sum2G3k = fk8_6 * fk1_12 / 1000 * fk1_2 / 1000;//�ֽ����ر�׼ֵG3k
            sum2Gk = sum2G1k + sum2G2k + sum2G3k;//���ú��ر�׼ֵGk
            sum2Q1k = fk8_8 * fk1_12 / 1000;//ʩ����Ա���豸���ر�׼ֵQ1k
            sum2P = fk8_9;//����ģ�����ʱ�ü��л���ؽ�������P
            sum2qa11 = 0.9 * 1.2 * sum2Gk;
            sum2qa12 = 0.9 * 1.4 * sum2Q1k;
            sum2qa21 = 0.9 * 1.35 * sum2Gk;
            sum2qa22 = 0.9 * 1.4 * 0.7 * sum2Q1k;
            sum2q1 = 0.9 * 1.2 * sum2Gk;
            sum2P1 = 0.9 * 1.4 * sum2P;
            sum2q2 = 0.9 * 1.35 * sum2Gk;
            sum2P2 = 0.9 * 1.4 * 0.7 * sum2P;
            sum2MA1 = 0.078 * sum2qa11 * fk1_7 * fk1_7 + 0.1 * sum2qa12 * fk1_7 * fk1_7;
            sum2MA2 = 0.078 * sum2qa21 * fk1_7 * fk1_7 + 0.1 * sum2qa22 * fk1_7 * fk1_7;
            sum2MB1 = 0.078 * sum2q1 * fk1_7 * fk1_7 + 0.2 * sum2P1 * fk1_7;
            sum2MB2 = 0.078 * sum2q2 * fk1_7 * fk1_7 + 0.2 * sum2P2 * fk1_7;
            double[] sum2M_array = new double[] { sum2MA1, sum2MA2, sum2MB1, sum2MB2 };
            Array.Sort(sum2M_array);
            sum2M = sum2M_array[3];//����������M
            sum2�� = sum2M * 1000000 / fk3_9 / 1000;
            sum2�� = Math.Round(sum2��, 2);
            if (sum2�� <= fk3_5)
                compare2_1 = "С���ļ���ǿ��" + sum2�� + "С�ڵ���С������ǿ�����ֵ" + fk3_5 + "N/mm2,����Ҫ��!";
            else
                compare2_1 = "С���ļ���ǿ��" + sum2�� + "����С������ǿ�����ֵ" + fk3_5 + "N/mm2,������Ҫ��!";
            sum2VA1 = 0.606 * sum2qa11 * fk1_7 + 0.620 * sum2qa12 * fk1_7;
            sum2VA2 = 0.606 * sum2qa21 * fk1_7 + 0.620 * sum2qa22 * fk1_7;
            sum2VB1 = 0.606 * sum2q1 * fk1_7 + 0.679 * sum2P1;
            sum2VB2 = 0.606 * sum2q2 * fk1_7 + 0.679 * sum2P2;
            double[] sum2V_array = new double[] { sum2VA1, sum2VA2, sum2VB1, sum2VB2 };
            Array.Sort(sum2V_array);
            sum2V = sum2V_array[3];
            if (Cb_FK_3XLCZ.SelectedIndex == 0)//С��ѡ�� ��ľʱ
            {
                sum2�� = sum2V * 1000 / fk3_3 / fk3_4;
                sum2�� = Math.Round(sum2��, 2);
                str2_�� = "�� =V/bh0=С����������/��ľ��/��ľ��=" + sum2�� + "N/mm2";
            }
            else//С��ѡ�� ���ָ֡��۸֡����ֹܡ��ֹ�ʱ
            {
                sum2�� = sum2V * 1000 * fk3_10 * 1000 / fk3_8 / 10000 / 7.6;
                sum2�� = Math.Round(sum2��, 2);
                str2_�� = "�� =VS0/Itw=�����������������������/37.13/�����=" + sum2�� + "N/mm2";
            }
            if (sum2�� <= fk3_6)
            {
                compare2_2 = "С���ļ���ǿ��" + sum2�� + "С�ڵ���С������ǿ�����ֵ" + fk3_6 + "N/mm2,����Ҫ��!";
            }
            else
            {
                compare2_2 = "С���ļ���ǿ��" + sum2�� + "����С������ǿ�����ֵ" + fk3_6 + "N/mm2,������Ҫ��!";
            }
            sum2q = sum2Gk;
            sum2kz�� = 0.632 * sum2q * Math.Pow(fk1_7 * 1000, 4) / (100 * fk3_7 * fk3_8);
            sum2kz��2 = fk1_7 * 1000 / 400;
            sum2kz�� = Math.Round(sum2kz��, 2);
            sum2kz��2 = Math.Round(sum2kz��2, 2);
            if (sum2kz�� <= sum2kz��2)
            {
                compare2_3 = "С�����е��Ӷ�" + sum2kz�� + "С�ڵ���С�����е���������Ӷ�ֵ" + sum2kz��2 + "mm,����Ҫ��!";
            }
            else
            {
                compare2_3 = "С�����е��Ӷ�" + sum2kz�� + "����С�����е���������Ӷ�ֵ" + sum2kz��2 + "mm,������Ҫ��!";
            }
            sum2xbd�� = sum2q * Math.Pow(sum2max, 4) / (8 * fk3_7 * fk3_8);
            sum2xbd��2 = sum2max / 400;
            sum2xbd�� = Math.Round(sum2xbd��, 2);
            sum2xbd��2 = Math.Round(sum2xbd��2, 2);
            if (sum2xbd�� <= sum2xbd��2)
            {
                compare2_4 = "С�����۶˵��Ӷ�" + sum2xbd�� + "С�ڵ���С�����۶˵���������Ӷ�ֵ" + sum2xbd��2 + "mm,����Ҫ��!";
            }
            else
            {
                compare2_4 = "С�����۶˵��Ӷ�" + sum2xbd�� + "����С�����۶˵���������Ӷ�ֵ" + sum2xbd��2 + "mm,������Ҫ��!";
            }

            sum2G1k = Math.Round(sum2G1k, 2);
            sum2G2k = Math.Round(sum2G2k, 2);
            sum2G3k = Math.Round(sum2G3k, 2);
            sum2Gk = Math.Round(sum2Gk, 2);
            sum2qa11 = Math.Round(sum2qa11, 2);
            sum2qa12 = Math.Round(sum2qa12, 2);
            sum2qa21 = Math.Round(sum2qa21, 2);
            sum2qa22 = Math.Round(sum2qa22, 2);
            sum2q1 = Math.Round(sum2q1, 2);
            sum2q2 = Math.Round(sum2q2, 2);
            sum2q = Math.Round(sum2q, 2);
            sum2M = Math.Round(sum2M, 2);
            sum2MA1 = Math.Round(sum2MA1, 2);
            sum2MA2 = Math.Round(sum2MA2, 2);
            sum2MB1 = Math.Round(sum2MB1, 2);
            sum2MB2 = Math.Round(sum2MB2, 2);
            sum2VA1 = Math.Round(sum2VA1, 2);
            sum2VA2 = Math.Round(sum2VA2, 2);
            sum2VB1 = Math.Round(sum2VB1, 2);
            sum2VB2 = Math.Round(sum2VB2, 2);
            sum2V = Math.Round(sum2V, 2);

            #endregion

            #region ������������
            double sum3G1k, sum3G2k, sum3G3k, sum3Gk, sum3Q1k, sum3q11, sum3q12, sum3q21, sum3q22, sum3F1, sum3F2, sum3FA, sum3FB, sum3q1, sum3q2, sum3n, sum3min, sum3M,
                sum3V, sum3��, sum3��, sum3��, sum3��2;
            string compare3_1, compare3_2, compare3_3, str3_��;

            sum3G1k = fk8_2 * fk1_12 / 1000; //��弰С�����ر�׼ֵG1k
            sum3G2k = fk8_5 * fk1_12 / 1000 * fk1_2 / 1000; //�½��������ر�׼ֵG2k
            sum3G3k = fk8_6 * fk1_12 / 1000 * fk1_2 / 1000;//�ֽ����ر�׼ֵG3k
            sum3Gk = sum3G1k + sum3G2k + sum3G3k;//���ú��ر�׼ֵGk
            sum3Q1k = fk8_10 * fk1_7;//ʩ����Ա���豸���ر�׼ֵQ1k
            sum3q11 = 0.9 * 1.2 * sum3Gk;
            sum3q12 = 0.9 * 1.4 * sum3Q1k;
            sum3q21 = 0.9 * 1.35 * sum3Gk;
            sum3q22 = 0.9 * 1.4 * 0.7 * sum3Q1k;
            sum3F1 = 1.132 * sum3q11 * fk1_6 + 1.218 * sum3q12 * fk1_6;
            sum3F2 = 1.132 * sum3q21 * fk1_6 + 1.218 * sum3q22 * fk1_6;
            sum3FA = sum3F1 > sum3F2 ? sum3F1 : sum3F2;
            sum3FB = 1.100 * sum3Gk * fk1_6;
            sum3q1 = 1.4 * fk8_3 * 0.1;
            sum3q2 = fk8_3 * 0.1;
            sum3n = Math.Floor(fk1_3 / fk1_6);
            sum3min = sum3n < 5 ? sum3n : 5;
            sum3M = 0.078 * sum3q1 * fk1_6 * fk1_6 + 0.24 * sum3FA * fk1_6;//������M
            sum3V = 0.606 * sum3q1 * fk1_6 + 1.281 * sum3FA;//������V
            sum3�� = 0.632 * sum3q2 * Math.Pow(fk1_6 * 1000, 4) / (100 * fk4_7 * fk4_8) + 6.81 * sum3FB * Math.Pow(fk1_6 * 1000, 3) / (384 * fk4_7 * fk4_8);//������
            sum3�� = sum3M * 1000000 / fk4_9 / 1000;//����ǿ�Ȧ�
            sum3�� = Math.Round(sum3��, 2);
            if (sum3�� <= fk4_5)
            {
                compare3_1 = "�����ļ���ǿ��" + sum3�� + "С�ڵ�����������ǿ�����ֵ" + fk4_5 + "N/mm2,����Ҫ��!";
            }
            else
            {
                compare3_1 = "�����ļ���ǿ��" + sum3�� + "������������ǿ�����ֵ" + fk4_5 + "N/mm2,������Ҫ��!";
            }
            if (Cb_FK_4ZLCZ.SelectedIndex == 0)//����ѡ�� ��ľʱ
            {
                sum3�� = sum3V * 1000 / fk4_3 / fk4_4;
                sum3�� = Math.Round(sum3��, 2);
                str3_�� = "�� =V/bh0=������������/��ľ��/��ľ��=" + sum3�� + "N/mm2";
            }
            else//����ѡ�� ���ָ֡��۸֡����ֹܡ��ֹ�ʱ
            {
                sum3�� = sum3V * 1000 * fk4_10 * 1000 / fk4_8 / 10000 / 7.6;//�������δ֪
                sum3�� = Math.Round(sum3��, 2);
                str3_�� = "�� =VS0/Itw=���������������������������/37.13/�������=" + sum3�� + "N/mm2";
            }
            if(sum3��<=fk4_6)
            {
                compare3_2 = "�����ļ���ǿ��" + sum3�� + "С�ڵ�����������ǿ�����ֵ" + fk4_6 + "N/mm2,����Ҫ��!";
            }
            else
            {
                compare3_2 = "�����ļ���ǿ��" + sum3�� + "������������ǿ�����ֵ" + fk4_6 + "N/mm2,������Ҫ��!";
            }
            sum3��2 = fk1_6 / 400;
            sum3�� = Math.Round(sum3��, 2);
            if(sum3��<=sum3��2)
            {
                compare3_3 = "�������е��Ӷ�" + sum3�� + "С�ڵ����������е���������Ӷ�ֵ" + sum3��2 + "mm,����Ҫ��!";
            }
            else
            {
                compare3_3 = "�������е��Ӷ�" + sum3�� + "�����������е���������Ӷ�ֵ" + sum3��2 + "mm,������Ҫ��!";
            }

            sum3G1k = Math.Round(sum3G1k, 2);
            sum3G2k = Math.Round(sum3G2k, 2);
            sum3G3k = Math.Round(sum3G3k, 2);
            sum3F1 = Math.Round(sum3F1, 2);
            sum3F2 = Math.Round(sum3F2, 2);
            sum3M = Math.Round(sum3M, 2);
            sum3V = Math.Round(sum3V, 2);
            sum3�� = Math.Round(sum3��, 2);
            sum3Gk = Math.Round(sum3Gk, 2);
            sum3q11 = Math.Round(sum3q11, 2);
            sum3q12 = Math.Round(sum3q12, 2);
            sum3q21 = Math.Round(sum3q21, 2);
            sum3q22 = Math.Round(sum3q22, 2);
            sum3FA = Math.Round(sum3FA, 2);
            sum3FB = Math.Round(sum3FB, 2);

            #endregion

            #region �ġ������ȶ�������
            double sum4_1��,sum4_1��2,sum4_1��,sum4_1G1k,sum4_1G2k,sum4_1G3k,sum4_1Gk,sum4_1Qk,sum4_1N,sum4_1NEX,sum4_1Mx,sum4_1f,sum4_1f2,
                sum4_2��,sum4_2��2,sum4_2��,sum4_2G1k,sum4_2G2k,sum4_2G3k,sum4_2Gk,sum4_2Qk,sum4_2N,sum4_2f,sum4_2f2;
            string compare4_1, compare4_2, compare4_3, compare4_4;

            sum4_1�� = Math.Pow((1 + fk5_9 / fk5_8), 0.5) * fk1_5 * 1000 / fk5_5;//������ϸ�Ȧ�
            sum4_1��2 = 150;//Math.Floor(sum4_1��);//������������ϸ��[��]
            sum4_1�� = Math.Round(sum4_1��, 2);
            sum4_1��2 = Math.Round(sum4_1��2, 2);
            if(sum4_1��<sum4_1��2)
                compare4_1 = "������ϸ��" + sum4_1�� + "С�ڵ���������������ϸ��" + sum4_1��2 + "mm,����Ҫ��!";
            else
                compare4_1 = "������ϸ��" + sum4_1�� + "����������������ϸ��" + sum4_1��2 + "mm,������Ҫ��!";
            //sum4_1�� = 0;//�ȶ�ϵ���ղ��A.0.6�õ�
            /*
            if (sum4_1�� > 250)
            {
                sum4_1�� = 7320 / (sum4_1�� * sum4_1��);
            }
            else
            {
                int sum4_1��y1 = Convert.ToInt32(sum4_1�� / 10);//�ڦ�y1��
                int sum4_1��x1 = Convert.ToInt32(sum4_1�� % 10);// �ڦ�x1��
                sum4_1�� = ��Array[sum4_1��y1, sum4_1��x1]; //��Array����Ϊȫ�ֱ���,�μ�����B.0.6������ѹ�������ȶ�ϵ����(Q235��)��
            }
            */
            if (sum4_1�� > 250)
            {
                sum4_1�� = 7320 / sum4_1�� / sum4_1��;
            }
            else if (Math.Floor(sum4_1��) == sum4_1��)
            {
                int sum4_1��y = Convert.ToInt32(sum4_1�� / 10);//�ڦ�y1��
                int sum4_1��x = Convert.ToInt32(sum4_1�� % 10);// �ڦ�x1��
                sum4_1�� = ��Array[sum4_1��y, sum4_1��x]; //��Array����Ϊȫ�ֱ���,�μ�����B.0.6������ѹ�������ȶ�ϵ����(Q235��)��
Пример #46
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);
     }
 }
Пример #47
0
 public FrmTemplate(bool _flag, Framework.Entity.Template _template)
 {
     InitializeComponent();
     flag = _flag;
     template = _template;
 }
Пример #48
0
        private void BtnSubmit_Click(object sender, System.EventArgs e)
        {
            System.Collections.ArrayList array = new System.Collections.ArrayList();
            if (@class.GetType().Equals(new Framework.Model.InsertTextWinterMeasure().GetType()))
            {
                object[] data = new object[8];
                int[] selectState = new int[8];
                for (int i = 0; i < 8; i++)
                {
                    selectState[i] = 0;
                }
                int count = 0;
                for (int i = 0; i < DataGridView.RowCount; i++)
                {
                    if (DataGridView.Rows[i].Cells[0].Value.ToString().Equals("True"))
                    {
                        selectState[i + 1] = 1;
                        count++;
                    }
                }
                int dataNum = 0;
                for (int i = 1; i <= 7; i++)
                {
                    Framework.Entity.Template insertText1 = new Framework.Entity.Template();
                    insertText1 = (Framework.Entity.Template)templateList[i];
                    if (selectState[i] == 1)
                    {
                        data[dataNum] = insertText1.Title;
                        dataNum++;
                    }
                }
                data[7] = count;
                CreateModuleIntance(tempInsertText, array, @class, data);
            }
            else if (@class.GetType().Equals(new Framework.Model.InsertTextWinterMaintain().GetType()))
            {
                object[] data = new object[3];
                int[] selectState = new int[3];
                for (int i = 0; i < 3; i++)
                {
                    selectState[i] = 0;
                }
                int count = 0;
                for (int i = 0; i < DataGridView.RowCount; i++)
                {
                    if (DataGridView.Rows[i].Cells[0].Value.ToString().Equals("True"))
                    {
                        selectState[i + 1] = 1;
                        count++;
                    }
                }
                int dataNum = 0;
                for (int i = 1; i <= 2; i++)
                {
                    Framework.Entity.Template insertText1 = new Framework.Entity.Template();
                    insertText1 = (Framework.Entity.Template)templateList[i];

                    if (selectState[i] == 1)
                    {
                        data[dataNum] = insertText1.Title;
                        dataNum++;
                    }
                }
                data[2] = count;
                CreateModuleIntance(tempInsertText, array, @class, data);
            }
            else if (@class.GetType().Equals(new Framework.Model.InsertTextPileProject().GetType()))
            {
                object[] data = new object[8];
                int[] selectState = new int[8];
                for (int i = 0; i < 8; i++)
                {
                    selectState[i] = 0;
                }
                int count = 0;
                for (int i = 0; i < DataGridView.RowCount; i++)
                {
                    if (DataGridView.Rows[i].Cells[0].Value.ToString().Equals("True"))
                    {
                        selectState[i + 1] = 1;
                        count++;
                    }
                }
                int dataNum = 0;
                for (int i = 1; i <= 7; i++)
                {
                    Framework.Entity.Template insertText1 = new Framework.Entity.Template();
                    insertText1 = (Framework.Entity.Template)templateList[i];
                    if (selectState[i] == 1)
                    {
                        data[dataNum] = insertText1.Title;
                        dataNum++;
                    }
                }
                data[7] = count;
                CreateModuleIntance(tempInsertText, array, @class, data);
            }
            else if (@class.GetType().Equals(new Framework.Model.InsertTextRoof().GetType()))
            {
                object[] data = new object[11];
                int[] selectState = new int[5];
                for (int i = 0; i < 5; i++)
                {
                    selectState[i] = 0;
                }
                int count1 = 0;
                for (int i = 0; i < DataGridView.RowCount; i++)
                {
                    if (DataGridView.Rows[i].Cells[0].Value.ToString().Equals("True"))
                    {
                        selectState[i + 1] = 1;
                        count1++;
                    }
                }
                int dataNum = 0;
                for (int i = 1; i <= 4; i++)
                {
                    Framework.Entity.Template insertText1 = new Framework.Entity.Template();
                    insertText1 = (Framework.Entity.Template)templateList[i];
                    if (selectState[i] == 1)
                    {
                        data[dataNum] = insertText1.Title;
                        dataNum++;
                    }
                }
                data[8] = count1;
                count1 = 0;
                if (selectState[1] == 1 | selectState[2] == 1)
                {
                    count1++;
                    Framework.Entity.Template insertText2 = new Framework.Entity.Template();
                    insertText2 = (Framework.Entity.Template)templateList[5];
                    data[4] = insertText2.Title;
                    insertText2 = (Framework.Entity.Template)templateList[7];
                    data[6] = insertText2.Title;
                    data[9] = count1;
                    data[10] = count1;
                }
                if (selectState[3] == 1 | selectState[4] == 1)
                {
                    count1++;
                    if (count1 == 1)
                    {
                        Framework.Entity.Template insertText3 = new Framework.Entity.Template();
                        insertText3 = (Framework.Entity.Template)templateList[6];
                        data[4] = insertText3.Title;
                        insertText3 = (Framework.Entity.Template)templateList[8];
                        data[6] = insertText3.Title;
                        data[9] = count1;
                        data[10] = count1;
                    }
                    else
                    {
                        Framework.Entity.Template insertText4 = new Framework.Entity.Template();
                        insertText4 = (Framework.Entity.Template)templateList[6];
                        data[5] = insertText4.Title;
                        insertText4 = (Framework.Entity.Template)templateList[8];
                        data[7] = insertText4.Title;
                        data[9] = count1;
                        data[10] = count1;
                    }
                }
                CreateModuleIntance(tempInsertText, array, @class, data);
            }
            this.Close();
        }
Пример #49
0
        private void Btn_CESubmit_Click(object sender, EventArgs e)
        {
            Framework.Entity.Template item = new Framework.Entity.Template();
            string itemtext = "";
            object[] obj = new object[] { };

            #region ����

            #region �������
            double[] socre = new double[] { 1.0, 0.8, 0.6, 0.4 };
            double u11, u12, u13, u14, u15, u21, u22, u23, u24, u25, u31, u32, u33, u34, u41, u42, u43, u44, u51, u52, u53, u54, u55, u61, u62, u63, u64, u65, u66;

            u11 = socre[CB_U11.SelectedIndex];
            u12 = socre[CB_U12.SelectedIndex];
            u13 = socre[CB_U13.SelectedIndex];
            u14 = socre[CB_U14.SelectedIndex];
            u15 = socre[CB_U15.SelectedIndex];
            u21 = socre[CB_U21.SelectedIndex];
            u22 = socre[CB_U22.SelectedIndex];
            u23 = socre[CB_U23.SelectedIndex];
            u24 = socre[CB_U24.SelectedIndex];
            u25 = socre[CB_U25.SelectedIndex];
            u31 = socre[CB_U31.SelectedIndex];
            u32 = socre[CB_U32.SelectedIndex];
            u33 = socre[CB_U33.SelectedIndex];
            u34 = socre[CB_U34.SelectedIndex];
            u41 = socre[CB_U41.SelectedIndex];
            u42 = socre[CB_U42.SelectedIndex];
            u43 = socre[CB_U43.SelectedIndex];
            u44 = socre[CB_U44.SelectedIndex];
            u51 = socre[CB_U51.SelectedIndex];
            u52 = socre[CB_U52.SelectedIndex];
            u53 = socre[CB_U53.SelectedIndex];
            u54 = socre[CB_U54.SelectedIndex];
            u55 = socre[CB_U55.SelectedIndex];
            u61 = socre[CB_U61.SelectedIndex];
            u62 = socre[CB_U62.SelectedIndex];
            u63 = socre[CB_U63.SelectedIndex];
            u64 = socre[CB_U64.SelectedIndex];
            u65 = socre[CB_U65.SelectedIndex];
            u66 = socre[CB_U66.SelectedIndex];
            #endregion

            #region ����ʩ�����������жϾ���
            double a12, a13, a14, a15, a16, a23, a24, a25, a26, a34, a35, a36, a45, a46, a56,
                a21, a31, a32, a41, a42, a43, a51, a52, a53, a54, a61, a62, a63, a64, a65;

            a12 = Convert.ToDouble(dataGridViewX1.Rows[0].Cells[2].Value);
            a13 = Convert.ToDouble(dataGridViewX1.Rows[0].Cells[3].Value);
            a14 = Convert.ToDouble(dataGridViewX1.Rows[0].Cells[4].Value);
            a15 = Convert.ToDouble(dataGridViewX1.Rows[0].Cells[5].Value);
            a16 = Convert.ToDouble(dataGridViewX1.Rows[0].Cells[6].Value);
            a21 = Convert.ToDouble(dataGridViewX1.Rows[1].Cells[1].Value);
            a31 = Convert.ToDouble(dataGridViewX1.Rows[2].Cells[1].Value);
            a41 = Convert.ToDouble(dataGridViewX1.Rows[3].Cells[1].Value);
            a51 = Convert.ToDouble(dataGridViewX1.Rows[4].Cells[1].Value);
            a61 = Convert.ToDouble(dataGridViewX1.Rows[5].Cells[1].Value);

            a23 = Convert.ToDouble(dataGridViewX1.Rows[1].Cells[3].Value);
            a24 = Convert.ToDouble(dataGridViewX1.Rows[1].Cells[4].Value);
            a25 = Convert.ToDouble(dataGridViewX1.Rows[1].Cells[5].Value);
            a26 = Convert.ToDouble(dataGridViewX1.Rows[1].Cells[6].Value);
            a32 = Convert.ToDouble(dataGridViewX1.Rows[2].Cells[2].Value);
            a42 = Convert.ToDouble(dataGridViewX1.Rows[3].Cells[2].Value);
            a52 = Convert.ToDouble(dataGridViewX1.Rows[4].Cells[2].Value);
            a62 = Convert.ToDouble(dataGridViewX1.Rows[5].Cells[2].Value);

            a34 = Convert.ToDouble(dataGridViewX1.Rows[2].Cells[4].Value);
            a35 = Convert.ToDouble(dataGridViewX1.Rows[2].Cells[5].Value);
            a36 = Convert.ToDouble(dataGridViewX1.Rows[2].Cells[6].Value);
            a43 = Convert.ToDouble(dataGridViewX1.Rows[3].Cells[3].Value);
            a53 = Convert.ToDouble(dataGridViewX1.Rows[4].Cells[3].Value);
            a63 = Convert.ToDouble(dataGridViewX1.Rows[5].Cells[3].Value);

            a45 = Convert.ToDouble(dataGridViewX1.Rows[3].Cells[5].Value);
            a46 = Convert.ToDouble(dataGridViewX1.Rows[3].Cells[6].Value);
            a54 = Convert.ToDouble(dataGridViewX1.Rows[4].Cells[4].Value);
            a64 = Convert.ToDouble(dataGridViewX1.Rows[5].Cells[4].Value);

            a56 = Convert.ToDouble(dataGridViewX1.Rows[4].Cells[6].Value);
            a65 = Convert.ToDouble(dataGridViewX1.Rows[5].Cells[5].Value);

            double A1, A2, A3, A4, A5, A6, w1, w2, w3, w4, w5, w6, wa11, wa12, wa13, wa14, wa15, wa16, wa21, wa22, wa23, wa24, wa25, wa26, wa31, wa32,
                    wa33, wa34, wa35, wa36, wa41, wa42, wa43, wa44, wa45, wa46, wa51, wa52, wa53, wa54, wa55, wa56, wa61, wa62,
                    wa63, wa64, wa65, wa66;
            #endregion

            #region ��ҵ��Ա
            double b12, b13, b14, b15, b21, b23, b24, b25, b31, b32, b34, b35, b41, b42, b43, b45,
                   b51, b52, b53, b54;

            b12 = Convert.ToDouble(dataGridViewX2.Rows[0].Cells[2].Value);
            b13 = Convert.ToDouble(dataGridViewX2.Rows[0].Cells[3].Value);
            b14 = Convert.ToDouble(dataGridViewX2.Rows[0].Cells[4].Value);
            b15 = Convert.ToDouble(dataGridViewX2.Rows[0].Cells[5].Value);
            b21 = Convert.ToDouble(dataGridViewX2.Rows[1].Cells[1].Value);
            b31 = Convert.ToDouble(dataGridViewX2.Rows[2].Cells[1].Value);
            b41 = Convert.ToDouble(dataGridViewX2.Rows[3].Cells[1].Value);
            b51 = Convert.ToDouble(dataGridViewX2.Rows[4].Cells[1].Value);

            b23 = Convert.ToDouble(dataGridViewX2.Rows[1].Cells[3].Value);
            b24 = Convert.ToDouble(dataGridViewX2.Rows[1].Cells[4].Value);
            b25 = Convert.ToDouble(dataGridViewX2.Rows[1].Cells[5].Value);
            b32 = Convert.ToDouble(dataGridViewX2.Rows[2].Cells[2].Value);
            b42 = Convert.ToDouble(dataGridViewX2.Rows[3].Cells[2].Value);
            b52 = Convert.ToDouble(dataGridViewX2.Rows[4].Cells[2].Value);

            b34 = Convert.ToDouble(dataGridViewX2.Rows[2].Cells[4].Value);
            b35 = Convert.ToDouble(dataGridViewX2.Rows[2].Cells[5].Value);
            b43 = Convert.ToDouble(dataGridViewX2.Rows[3].Cells[3].Value);
            b53 = Convert.ToDouble(dataGridViewX2.Rows[4].Cells[3].Value);

            b45 = Convert.ToDouble(dataGridViewX2.Rows[3].Cells[5].Value);
            b54 = Convert.ToDouble(dataGridViewX2.Rows[4].Cells[4].Value);

            double B1, B2, B3, B4, B5, Wb1, Wb2, Wb3, Wb4, Wb5, Cb;
            #endregion

            #region ��е�豸
            double c12, c13, c14, c15, c21, c23, c24, c25, c31, c32, c34, c35, c41, c42, c43, c45,
                    c51, c52, c53, c54;

            c12 = Convert.ToDouble(dataGridViewX3.Rows[0].Cells[2].Value);
            c13 = Convert.ToDouble(dataGridViewX3.Rows[0].Cells[3].Value);
            c14 = Convert.ToDouble(dataGridViewX3.Rows[0].Cells[4].Value);
            c15 = Convert.ToDouble(dataGridViewX3.Rows[0].Cells[5].Value);
            c21 = Convert.ToDouble(dataGridViewX3.Rows[1].Cells[1].Value);
            c31 = Convert.ToDouble(dataGridViewX3.Rows[2].Cells[1].Value);
            c41 = Convert.ToDouble(dataGridViewX3.Rows[3].Cells[1].Value);
            c51 = Convert.ToDouble(dataGridViewX3.Rows[4].Cells[1].Value);

            c23 = Convert.ToDouble(dataGridViewX3.Rows[1].Cells[3].Value);
            c24 = Convert.ToDouble(dataGridViewX3.Rows[1].Cells[4].Value);
            c25 = Convert.ToDouble(dataGridViewX3.Rows[1].Cells[5].Value);
            c32 = Convert.ToDouble(dataGridViewX3.Rows[2].Cells[2].Value);
            c42 = Convert.ToDouble(dataGridViewX3.Rows[3].Cells[2].Value);
            c52 = Convert.ToDouble(dataGridViewX3.Rows[4].Cells[2].Value);

            c34 = Convert.ToDouble(dataGridViewX3.Rows[2].Cells[4].Value);
            c35 = Convert.ToDouble(dataGridViewX3.Rows[2].Cells[5].Value);
            c43 = Convert.ToDouble(dataGridViewX3.Rows[3].Cells[3].Value);
            c53 = Convert.ToDouble(dataGridViewX3.Rows[4].Cells[3].Value);

            c45 = Convert.ToDouble(dataGridViewX3.Rows[3].Cells[5].Value);
            c54 = Convert.ToDouble(dataGridViewX3.Rows[4].Cells[4].Value);

            double C1, C2, C3, C4, C5, Wc1, Wc2, Wc3, Wc4, Wc5, Cc;
            #endregion

            #region ����
            double d12, d13, d14, d21, d23, d24, d31, d32, d34, d41, d42, d43;

            d12 = Convert.ToDouble(dataGridViewX4.Rows[0].Cells[2].Value);
            d13 = Convert.ToDouble(dataGridViewX4.Rows[0].Cells[3].Value);
            d14 = Convert.ToDouble(dataGridViewX4.Rows[0].Cells[4].Value);
            d21 = Convert.ToDouble(dataGridViewX4.Rows[1].Cells[1].Value);
            d31 = Convert.ToDouble(dataGridViewX4.Rows[2].Cells[1].Value);
            d41 = Convert.ToDouble(dataGridViewX4.Rows[3].Cells[1].Value);

            d23 = Convert.ToDouble(dataGridViewX4.Rows[1].Cells[3].Value);
            d24 = Convert.ToDouble(dataGridViewX4.Rows[1].Cells[4].Value);
            d32 = Convert.ToDouble(dataGridViewX4.Rows[2].Cells[2].Value);
            d42 = Convert.ToDouble(dataGridViewX4.Rows[3].Cells[2].Value);

            d34 = Convert.ToDouble(dataGridViewX4.Rows[2].Cells[4].Value);
            d43 = Convert.ToDouble(dataGridViewX4.Rows[3].Cells[3].Value);

            double D1, D2, D3, D4, Wd1, Wd2, Wd3, Wd4, Cd;
            #endregion

            #region ʩ������
            double e12, e13, e14, e21, e23, e24, e31, e32, e34, e41, e42, e43;

            e12 = Convert.ToDouble(dataGridViewX5.Rows[0].Cells[2].Value);
            e13 = Convert.ToDouble(dataGridViewX5.Rows[0].Cells[3].Value);
            e14 = Convert.ToDouble(dataGridViewX5.Rows[0].Cells[4].Value);
            e21 = Convert.ToDouble(dataGridViewX5.Rows[1].Cells[1].Value);
            e31 = Convert.ToDouble(dataGridViewX5.Rows[2].Cells[1].Value);
            e41 = Convert.ToDouble(dataGridViewX5.Rows[3].Cells[1].Value);

            e23 = Convert.ToDouble(dataGridViewX5.Rows[1].Cells[3].Value);
            e24 = Convert.ToDouble(dataGridViewX5.Rows[1].Cells[4].Value);
            e32 = Convert.ToDouble(dataGridViewX5.Rows[2].Cells[2].Value);
            e42 = Convert.ToDouble(dataGridViewX5.Rows[3].Cells[2].Value);

            e34 = Convert.ToDouble(dataGridViewX5.Rows[2].Cells[4].Value);
            e43 = Convert.ToDouble(dataGridViewX5.Rows[3].Cells[3].Value);

            double E1, E2, E3, E4, We1, We2, We3, We4, Ce;
            #endregion

            #region ��ҵ����
            double f12, f13, f14, f15, f21, f23, f24, f25, f31, f32, f34, f35, f41, f42, f43, f45, f51, f52, f53, f54;

            f12 = Convert.ToDouble(dataGridViewX6.Rows[0].Cells[2].Value);
            f13 = Convert.ToDouble(dataGridViewX6.Rows[0].Cells[3].Value);
            f14 = Convert.ToDouble(dataGridViewX6.Rows[0].Cells[4].Value);
            f15 = Convert.ToDouble(dataGridViewX6.Rows[0].Cells[5].Value);
            f21 = Convert.ToDouble(dataGridViewX6.Rows[1].Cells[1].Value);
            f31 = Convert.ToDouble(dataGridViewX6.Rows[2].Cells[1].Value);
            f41 = Convert.ToDouble(dataGridViewX6.Rows[3].Cells[1].Value);
            f51 = Convert.ToDouble(dataGridViewX6.Rows[4].Cells[1].Value);

            f23 = Convert.ToDouble(dataGridViewX6.Rows[1].Cells[3].Value);
            f24 = Convert.ToDouble(dataGridViewX6.Rows[1].Cells[4].Value);
            f25 = Convert.ToDouble(dataGridViewX6.Rows[1].Cells[5].Value);
            f32 = Convert.ToDouble(dataGridViewX6.Rows[2].Cells[2].Value);
            f42 = Convert.ToDouble(dataGridViewX6.Rows[3].Cells[2].Value);
            f52 = Convert.ToDouble(dataGridViewX6.Rows[4].Cells[2].Value);

            f34 = Convert.ToDouble(dataGridViewX6.Rows[2].Cells[4].Value);
            f35 = Convert.ToDouble(dataGridViewX6.Rows[2].Cells[5].Value);
            f43 = Convert.ToDouble(dataGridViewX6.Rows[3].Cells[3].Value);
            f53 = Convert.ToDouble(dataGridViewX6.Rows[4].Cells[3].Value);

            f45 = Convert.ToDouble(dataGridViewX6.Rows[3].Cells[5].Value);
            f54 = Convert.ToDouble(dataGridViewX6.Rows[4].Cells[4].Value);

            double F1, F2, F3, F4, F5, Wf1, Wf2, Wf3, Wf4, Wf5, Cf;
            #endregion

            #region ��ȫ����
            double g12, g13, g14, g15, g16, g23, g24, g25, g26, g34, g35, g36, g45, g46, g56,
                    g21, g31, g32, g41, g42, g43, g51, g52, g53, g54, g61, g62, g63, g64, g65;

            g12 = Convert.ToDouble(dataGridViewX7.Rows[0].Cells[2].Value);
            g13 = Convert.ToDouble(dataGridViewX7.Rows[0].Cells[3].Value);
            g14 = Convert.ToDouble(dataGridViewX7.Rows[0].Cells[4].Value);
            g15 = Convert.ToDouble(dataGridViewX7.Rows[0].Cells[5].Value);
            g16 = Convert.ToDouble(dataGridViewX7.Rows[0].Cells[6].Value);
            g21 = Convert.ToDouble(dataGridViewX7.Rows[1].Cells[1].Value);
            g31 = Convert.ToDouble(dataGridViewX7.Rows[2].Cells[1].Value);
            g41 = Convert.ToDouble(dataGridViewX7.Rows[3].Cells[1].Value);
            g51 = Convert.ToDouble(dataGridViewX7.Rows[4].Cells[1].Value);
            g61 = Convert.ToDouble(dataGridViewX7.Rows[5].Cells[1].Value);

            g23 = Convert.ToDouble(dataGridViewX7.Rows[1].Cells[3].Value);
            g24 = Convert.ToDouble(dataGridViewX7.Rows[1].Cells[4].Value);
            g25 = Convert.ToDouble(dataGridViewX7.Rows[1].Cells[5].Value);
            g26 = Convert.ToDouble(dataGridViewX7.Rows[1].Cells[6].Value);
            g32 = Convert.ToDouble(dataGridViewX7.Rows[2].Cells[2].Value);
            g42 = Convert.ToDouble(dataGridViewX7.Rows[3].Cells[2].Value);
            g52 = Convert.ToDouble(dataGridViewX7.Rows[4].Cells[2].Value);
            g62 = Convert.ToDouble(dataGridViewX7.Rows[5].Cells[2].Value);

            g34 = Convert.ToDouble(dataGridViewX7.Rows[2].Cells[4].Value);
            g35 = Convert.ToDouble(dataGridViewX7.Rows[2].Cells[5].Value);
            g36 = Convert.ToDouble(dataGridViewX7.Rows[2].Cells[6].Value);
            g43 = Convert.ToDouble(dataGridViewX7.Rows[3].Cells[3].Value);
            g53 = Convert.ToDouble(dataGridViewX7.Rows[4].Cells[3].Value);
            g63 = Convert.ToDouble(dataGridViewX7.Rows[5].Cells[3].Value);

            g45 = Convert.ToDouble(dataGridViewX7.Rows[3].Cells[5].Value);
            g46 = Convert.ToDouble(dataGridViewX7.Rows[3].Cells[6].Value);
            g54 = Convert.ToDouble(dataGridViewX7.Rows[4].Cells[4].Value);
            g64 = Convert.ToDouble(dataGridViewX7.Rows[5].Cells[4].Value);

            g56 = Convert.ToDouble(dataGridViewX7.Rows[4].Cells[6].Value);
            g65 = Convert.ToDouble(dataGridViewX7.Rows[5].Cells[5].Value);

            double G1, G2, G3, G4, G5, G6, Wg1, Wg2, Wg3, Wg4, Wg5, Wg6, Cg;
            #endregion

            #endregion

            if (CBX_CE_method.SelectedIndex == 0)//AHP�ͷ�
            {
                itemtext = "AHP�ͷ�";

                #region ����ʩ�����������жϾ���
                A1 = Math.Round(Math.Pow(1 * a12 * a13 * a14 * a15 * a16, 1f / 6), 2);
                A2 = Math.Round(Math.Pow(a21 * 1 * a23 * a24 * a25 * a26, 1f / 6), 2);
                A3 = Math.Round(Math.Pow(a31 * a32 * 1 * a34 * a35 * a36, 1f / 6), 2);
                A4 = Math.Round(Math.Pow(a41 * a42 * a43 * 1 * a45 * a46, 1f / 6), 2);
                A5 = Math.Round(Math.Pow(a51 * a52 * a53 * a54 * 1 * a56, 1f / 6), 2);
                A6 = Math.Round(Math.Pow(a61 * a62 * a63 * a64 * a65 * 1, 1f / 6), 2);

                wa11 = Math.Round(1 / A1, 2);
                wa12 = Math.Round(a12 / A1, 2);
                wa13 = Math.Round(a13 / A1, 2);
                wa14 = Math.Round(a14 / A1, 2);
                wa15 = Math.Round(a15 / A1, 2);
                wa16 = Math.Round(a16 / A1, 2);
                w1 = Math.Round((wa11 + wa12 + wa13 + wa14 + wa15 + wa16) / 6, 2);
                wa21 = Math.Round(a21 / A2, 2);
                wa22 = Math.Round(1 / A2, 2);
                wa23 = Math.Round(a23 / A2, 2);
                wa24 = Math.Round(a24 / A2, 2);
                wa25 = Math.Round(a25 / A2, 2);
                wa26 = Math.Round(a26 / A2, 2);
                w2 = Math.Round((wa21 + wa22 + wa23 + wa24 + wa25 + wa26) / 6, 2);
                wa31 = Math.Round(a31 / A3, 2);
                wa32 = Math.Round(a32 / A3, 2);
                wa33 = Math.Round(1 / A3, 2);
                wa34 = Math.Round(a34 / A3, 2);
                wa35 = Math.Round(a35 / A3, 2);
                wa36 = Math.Round(a36 / A3, 2);
                w3 = Math.Round((wa31 + wa32 + wa33 + wa34 + wa35 + wa36) / 6, 2);
                wa41 = Math.Round(a41 / A4, 2);
                wa42 = Math.Round(a42 / A4, 2);
                wa43 = Math.Round(a43 / A4, 2);
                wa44 = Math.Round(1 / A4, 2);
                wa45 = Math.Round(a45 / A4, 2);
                wa46 = Math.Round(a46 / A4, 2);
                w4 = Math.Round((wa41 + wa42 + wa43 + wa44 + wa45 + wa46) / 6, 2);
                wa51 = Math.Round(a51 / A5, 2);
                wa52 = Math.Round(a52 / A5, 2);
                wa53 = Math.Round(a53 / A5, 2);
                wa54 = Math.Round(a54 / A5, 2);
                wa55 = Math.Round(1 / A5, 2);
                wa56 = Math.Round(a56 / A5, 2);
                w5 = Math.Round((wa51 + wa52 + wa53 + wa54 + wa55 + wa56) / 6, 2);
                wa61 = Math.Round(a61 / A6, 2);
                wa62 = Math.Round(a62 / A6, 2);
                wa63 = Math.Round(a63 / A6, 2);
                wa64 = Math.Round(a64 / A6, 2);
                wa65 = Math.Round(a65 / A6, 2);
                wa66 = Math.Round(1 / A6, 2);
                w6 = Math.Round((wa61 + wa62 + wa63 + wa64 + wa65 + wa66) / 6, 2);
                #endregion

                #region ��ҵ��Ա

                B1 = Math.Round(Math.Pow(1 * b12 * b13 * b14 * b15, 1f / 5), 2);
                B2 = Math.Round(Math.Pow(b21 * 1 * b23 * b24 * b25, 1f / 5), 2);
                B3 = Math.Round(Math.Pow(b31 * b32 * 1 * b34 * b35, 1f / 5), 2);
                B4 = Math.Round(Math.Pow(b41 * b42 * b43 * 1 * b45, 1f / 5), 2);
                B5 = Math.Round(Math.Pow(b51 * b52 * b53 * b54 * 1, 1f / 5), 2);
                Wb1 = Math.Round((1 + b12 + b13 + b14 + b15) / B1 / 5, 2);
                Wb2 = Math.Round((b21 + 1 + b23 + b24 + b25) / B2 / 5, 2);
                Wb3 = Math.Round((b31 + b32 + 1 + b34 + b35) / B3 / 5, 2);
                Wb4 = Math.Round((b41 + b42 + b43 + 1 + b45) / B4 / 5, 2);
                Wb5 = Math.Round((b51 + b52 + b53 + b54 + 1) / B5 / 5, 2);
                Cb = Math.Round(Wb1 * u11 + Wb2 * u12 + Wb3 * u13 + Wb4 * u14 + Wb5 * u15, 2);
                #endregion

                #region ��е�豸

                C1 = Math.Round(Math.Pow(1 * c12 * c13 * c14 * c15, 1f / 5), 2);
                C2 = Math.Round(Math.Pow(c21 * 1 * c23 * c24 * c25, 1f / 5), 2);
                C3 = Math.Round(Math.Pow(c31 * c32 * 1 * c34 * c35, 1f / 5), 2);
                C4 = Math.Round(Math.Pow(c41 * c42 * c43 * 1 * c45, 1f / 5), 2);
                C5 = Math.Round(Math.Pow(c51 * c52 * c53 * c54 * 1, 1f / 5), 2);
                Wc1 = Math.Round((1 + c12 + c13 + c14 + c15) / C1 / 5, 2);
                Wc2 = Math.Round((c21 + 1 + c23 + c24 + c25) / C2 / 5, 2);
                Wc3 = Math.Round((c31 + c32 + 1 + c34 + c35) / C3 / 5, 2);
                Wc4 = Math.Round((c41 + c42 + c43 + 1 + c45) / C4 / 5, 2);
                Wc5 = Math.Round((c51 + c52 + c53 + c54 + 1) / C5 / 5, 2);
                Cc = Math.Round(Wc1 * u21 + Wc2 * u22 + Wc3 * u23 + Wc4 * u24 + Wc5 * u25, 2);
                #endregion

                #region ����

                D1 = Math.Round(Math.Pow(1 * d12 * d13 * d14, 1f / 4), 2);
                D2 = Math.Round(Math.Pow(d21 * 1 * d23 * d24, 1f / 4), 2);
                D3 = Math.Round(Math.Pow(d31 * d32 * 1 * d34, 1f / 4), 2);
                D4 = Math.Round(Math.Pow(d41 * d42 * d43 * 1, 1f / 4), 2);
                Wd1 = Math.Round((1 + d12 + d13 + d14) / D1 / 4, 2);
                Wd2 = Math.Round((d21 + 1 + d23 + d24) / D2 / 4, 2);
                Wd3 = Math.Round((d31 + d32 + 1 + d34) / D3 / 4, 2);
                Wd4 = Math.Round((d41 + d42 + d43 + 1) / D4 / 4, 2);
                Cd = Math.Round(Wd1 * u31 + Wd2 * u32 + Wd3 * u33 + Wd4 * u34, 2);
                #endregion

                #region ʩ������

                E1 = Math.Round(Math.Pow(1 * e12 * e13 * e14, 1f / 4), 2);
                E2 = Math.Round(Math.Pow(e21 * 1 * e23 * e24, 1f / 4), 2);
                E3 = Math.Round(Math.Pow(e31 * e32 * 1 * e34, 1f / 4), 2);
                E4 = Math.Round(Math.Pow(e41 * e42 * e43 * 1, 1f / 4), 2);
                We1 = Math.Round((1 + e12 + e13 + e14) / E1 / 4, 2);
                We2 = Math.Round((e21 + 1 + e23 + e24) / E2 / 4, 2);
                We3 = Math.Round((e31 + e32 + 1 + e34) / E3 / 4, 2);
                We4 = Math.Round((e41 + e42 + e43 + 1) / E4 / 4, 2);
                Ce = Math.Round(We1 * u41 + We2 * u42 + We3 * u43 + We4 * u44, 2);
                #endregion

                #region ��ҵ����

                F1 = Math.Round(Math.Pow(1 * f12 * f13 * f14 * f15, 1f / 5), 2);
                F2 = Math.Round(Math.Pow(f21 * 1 * f23 * f24 * f25, 1f / 5), 2);
                F3 = Math.Round(Math.Pow(f31 * f32 * 1 * f34 * f35, 1f / 5), 2);
                F4 = Math.Round(Math.Pow(f41 * f42 * f43 * 1 * f45, 1f / 5), 2);
                F5 = Math.Round(Math.Pow(f51 * f52 * f53 * f54 * 1, 1f / 5), 2);
                Wf1 = Math.Round((1 + f12 + f13 + f14 + f15) / F1 / 5, 2);
                Wf2 = Math.Round((f21 + 1 + f23 + f24 + f25) / F2 / 5, 2);
                Wf3 = Math.Round((f31 + f32 + 1 + f34 + f35) / F3 / 5, 2);
                Wf4 = Math.Round((f41 + f42 + f43 + 1 + f45) / F4 / 5, 2);
                Wf5 = Math.Round((f51 + f52 + f53 + f54 + 1) / F5 / 5, 2);
                Cf = Math.Round(Wf1 * u51 + Wf2 * u52 + Wf3 * u53 + Wf4 * u54 + Wf5 * u55, 2);
                #endregion

                #region ��ȫ����

                G1 = Math.Round(Math.Pow(1 * g12 * g13 * g14 * g15 * g16, 1f / 6), 2);
                G2 = Math.Round(Math.Pow(g21 * 1 * g23 * g24 * g25 * g26, 1f / 6), 2);
                G3 = Math.Round(Math.Pow(g31 * g32 * 1 * g34 * g35 * g36, 1f / 6), 2);
                G4 = Math.Round(Math.Pow(g41 * g42 * g43 * 1 * g45 * g46, 1f / 6), 2);
                G5 = Math.Round(Math.Pow(g51 * g52 * g53 * g54 * 1 * g56, 1f / 6), 2);
                G6 = Math.Round(Math.Pow(g61 * g62 * g63 * g64 * g65 * 1, 1f / 6), 2);
                Wg1 = Math.Round((1 + g12 + g13 + g14 + g15 + g16) / G1 / 6, 2);
                Wg2 = Math.Round((g21 + 1 + g23 + g24 + g25 + g26) / G2 / 6, 2);
                Wg3 = Math.Round((g31 + g32 + 1 + g34 + g35 + g36) / G3 / 6, 2);
                Wg4 = Math.Round((g41 + g42 + g43 + 1 + g45 + g46) / G4 / 6, 2);
                Wg5 = Math.Round((g51 + g52 + g53 + g54 + 1 + g56) / G5 / 6, 2);
                Wg6 = Math.Round((g61 + g62 + g63 + g64 + g65 + 1) / G6 / 6, 2);
                Cg = Math.Round(Wg1 * u61 + Wg2 * u62 + Wg3 * u63 + Wg4 * u64 + Wg5 * u65 + Wg6 * u66, 2);
                #endregion

                #region ����
                double C;
                string result;

                C = Math.Round(w1 * Cb + w2 * Cc + w3 * Cd + w4 * Ce + w5 * Cf + w6 * Cg, 2);

                if (C >= 90)
                {
                    result = "����С���ɿ�";
                }
                else if (C < 80)
                {
                    result = "���մ��ѿ�";
                }
                else
                {
                    result = "�з��ա�Ӧ�Ľ�";
                }
                #endregion

                obj = new object[] { u11, u12, u13, u14, u15, u21, u22, u23, u24,u25, u31, u32, u33, u34,
                    u41, u42, u43, u44, u51, u52, u53, u54, u55, u61, u62, u63, u64, u65, u66,a12, a13, a14,
                    a15, a16, a23, a24, a25, a26, a34, a35, a36, a45, a46, a56,a21, a31, a32, a41, a42, a43,
                    a51, a52, a53, a54, a61, a62, a63, a64, a65 ,A1, A2, A3, A4, A5, A6, w1, w2, w3, w4, w5, w6,
                    wa11, wa12, wa13, wa14, wa15, wa16, wa21, wa22, wa23, wa24, wa25, wa26, wa31, wa32,
                    wa33, wa34, wa35, wa36, wa41, wa42, wa43, wa44, wa45, wa46, wa51, wa52, wa53, wa54, wa55,
                    wa56, wa61, wa62, wa63, wa64, wa65, wa66,b12, b13, b14, b15, b21, b23, b24, b25 ,b31, b32,
                    b34, b35, b41, b42, b43, b45, b51, b52, b53, b54,B1, B2, B3, B4, B5, Wb1, Wb2, Wb3, Wb4, Wb5, Cb,
                    c12, c13, c14, c15, c21, c23, c24, c25, c31, c32, c34, c35, c41, c42, c43, c45, c51, c52, c53, c54,
                    C1, C2, C3, C4, C5, Wc1, Wc2, Wc3, Wc4, Wc5, Cc,d12, d13, d14, d21, d23, d24, d31, d32, d34, d41, d42, d43,
                    D1, D2, D3, D4, Wd1, Wd2, Wd3, Wd4, Cd,e12, e13, e14, e21, e23, e24, e31, e32, e34, e41, e42, e43,
                    E1, E2, E3, E4, We1, We2, We3, We4, Ce,f12, f13, f14, f15, f21, f23, f24, f25, f31, f32, f34, f35,
                    f41, f42, f43, f45, f51, f52, f53, f54,F1, F2, F3, F4, F5, Wf1, Wf2, Wf3, Wf4, Wf5, Cf,g12, g13, g14, g15,
                    g16, g23, g24, g25, g26, g34, g35, g36, g45, g46, g56,g21, g31, g32, g41, g42, g43, g51, g52, g53, g54,
                    g61, g62, g63, g64, g65,G1, G2, G3, G4, G5, G6, Wg1, Wg2, Wg3, Wg4, Wg5, Wg6, Cg,C,result};

            }
            else if (CBX_CE_method.SelectedIndex == 1)//AHP��ֵ��
            {
                itemtext = "AHP��ֵ��";

                #region ����ʩ�����������жϾ���
                A1 = Math.Round(1 + a21 + a31 + a41 + a51 + a61, 2);
                A2 = Math.Round(a12 + 1 + a32 + a42 + a52 + a62, 2);
                A3 = Math.Round(a13 + a23 + 1 + a43 + a53 + a63, 2);
                A4 = Math.Round(a14 + a24 + a34 + 1 + a54 + a64, 2);
                A5 = Math.Round(a15 + a25 + a35 + a45 + 1 + a65, 2);
                A6 = Math.Round(a16 + a26 + a36 + a46 + a56 + 1, 2);

                wa11 = Math.Round(1 / A1, 2);
                wa12 = Math.Round(a12 / A2, 2);
                wa13 = Math.Round(a13 / A3, 2);
                wa14 = Math.Round(a14 / A4, 2);
                wa15 = Math.Round(a15 / A5, 2);
                wa16 = Math.Round(a16 / A6, 2);
                w1 = Math.Round((wa11 + wa12 + wa13 + wa14 + wa15 + wa16) / 6, 2);
                wa21 = Math.Round(a21 / A1, 2);
                wa22 = Math.Round(1 / A2, 2);
                wa23 = Math.Round(a23 / A3, 2);
                wa24 = Math.Round(a24 / A4, 2);
                wa25 = Math.Round(a25 / A5, 2);
                wa26 = Math.Round(a26 / A6, 2);
                w2 = Math.Round((wa21 + wa22 + wa23 + wa24 + wa25 + wa26) / 6, 2);
                wa31 = Math.Round(a31 / A1, 2);
                wa32 = Math.Round(a32 / A2, 2);
                wa33 = Math.Round(1 / A3, 2);
                wa34 = Math.Round(a34 / A4, 2);
                wa35 = Math.Round(a35 / A5, 2);
                wa36 = Math.Round(a36 / A6, 2);
                w3 = Math.Round((wa31 + wa32 + wa33 + wa34 + wa35 + wa36) / 6, 2);
                wa41 = Math.Round(a41 / A1, 2);
                wa42 = Math.Round(a42 / A2, 2);
                wa43 = Math.Round(a43 / A3, 2);
                wa44 = Math.Round(1 / A4, 2);
                wa45 = Math.Round(a45 / A5, 2);
                wa46 = Math.Round(a46 / A6, 2);
                w4 = Math.Round((wa41 + wa42 + wa43 + wa44 + wa45 + wa46) / 6, 2);
                wa51 = Math.Round(a51 / A1, 2);
                wa52 = Math.Round(a52 / A2, 2);
                wa53 = Math.Round(a53 / A3, 2);
                wa54 = Math.Round(a54 / A4, 2);
                wa55 = Math.Round(1 / A5, 2);
                wa56 = Math.Round(a56 / A6, 2);
                w5 = Math.Round((wa51 + wa52 + wa53 + wa54 + wa55 + wa56) / 6, 2);
                wa61 = Math.Round(a61 / A1, 2);
                wa62 = Math.Round(a62 / A2, 2);
                wa63 = Math.Round(a63 / A3, 2);
                wa64 = Math.Round(a64 / A4, 2);
                wa65 = Math.Round(a65 / A5, 2);
                wa66 = Math.Round(1 / A6, 2);
                w6 = Math.Round((wa61 + wa62 + wa63 + wa64 + wa65 + wa66) / 6, 2);
                #endregion

                #region ��ҵ��Ա

                B1 = Math.Round(1 + b21 + b31 + b41 + b51, 2);
                B2 = Math.Round(b12 + 1 + b32 + b42 + b52, 2);
                B3 = Math.Round(b13 + b23 + 1 + b43 + b53, 2);
                B4 = Math.Round(b14 + b24 + b34 + 1 + b54, 2);
                B5 = Math.Round(b15 + b25 + b35 + b45 + 1, 2);
                Wb1 = Math.Round((1 / B1 + b12 / B2 + b13 / B3 + b14 / B4 + b15 / B5) / 5, 2);
                Wb2 = Math.Round((b21 / B1 + 1 / B2 + b23 / B3 + b24 / B4 + b25 / B5) / 5, 2);
                Wb3 = Math.Round((b31 / B1 + b32 / B2 + 1 / B3 + b34 / B4 + b35 / B5) / 5, 2);
                Wb4 = Math.Round((b41 / B1 + b42 / B2 + b43 / B3 + 1 / B4 + b45 / B5) / 5, 2);
                Wb5 = Math.Round((b51 / B1 + b52 / B2 + b53 / B3 + b54 / B4 + 1 / B5) / 5, 2);
                Cb = Math.Round(Wb1 * u11 + Wb2 * u12 + Wb3 * u13 + Wb4 * u14 + Wb5 * u15, 2);
                #endregion

                #region ��е�豸

                C1 = Math.Round(1 + c21 + c31 + c41 + c51,  2);
                C2 = Math.Round(c12 + 1 + c32 + c42 + c52,  2);
                C3 = Math.Round(c13 + c23 + 1 + c43 + c53,  2);
                C4 = Math.Round(c14 + c24 + c34 + 1 + c54,  2);
                C5 = Math.Round(c15 + c25 + c35 + c45 + 1,  2);
                Wc1 = Math.Round((1 / C1 + c12 / C2 + c13 / C3 + c14 / C4 + c15 / C5) / 5, 2);
                Wc2 = Math.Round((c21 / C1 + 1 / C2 + c23 / C3 + c24 / C4 + c25 / C5) / 5, 2);
                Wc3 = Math.Round((c31 / C1 + c32 / C2 + 1 / C3 + c34 / C4 + c35 / C5) / 5, 2);
                Wc4 = Math.Round((c41 / C1 + c42 / C2 + c43 / C3 + 1 / C4 + c45 / C5) / 5, 2);
                Wc5 = Math.Round((c51 / C1 + c52 / C2 + c53 / C3 + c54 / C4 + 1 / C5) / 5, 2);
                Cc = Math.Round(Wc1 * u21 + Wc2 * u22 + Wc3 * u23 + Wc4 * u24 + Wc5 * u25, 2);
                #endregion

                #region ����

                D1 = Math.Round(1 + d21 + d31 + d41, 2);
                D2 = Math.Round(d12 + 1 + d32 + d42, 2);
                D3 = Math.Round(d13 + d23 + 1 + d43, 2);
                D4 = Math.Round(d14 + d24 + d34 + 1, 2);
                Wd1 = Math.Round((1 / D1 + d12 / D2 + d13 / D3 + d14 / D4) / 4, 2);
                Wd2 = Math.Round((d21 / D1 + 1 / D2 + d23 / D3 + d24 / D4) / 4, 2);
                Wd3 = Math.Round((d31 / D1 + d32 / D2 + 1 / D3 + d34 / D4) / 4, 2);
                Wd4 = Math.Round((d41 / D1 + d42 / D2 + d43 / D3 + 1 / D4) / 4, 2);
                Cd = Math.Round(Wd1 * u31 + Wd2 * u32 + Wd3 * u33 + Wd4 * u34, 2);
                #endregion

                #region ʩ������

                E1 = Math.Round(1 + e21 + e31 + e41, 2);
                E2 = Math.Round(e12 + 1 + e32 + e42, 2);
                E3 = Math.Round(e13 + e23 + 1 + e43, 2);
                E4 = Math.Round(e14 + e24 + e34 + 1, 2);
                We1 = Math.Round((1 / E1 + e12 / E2 + e13 / E3 + e14 / E4) / 4, 2);
                We2 = Math.Round((e21 / E1 + 1 / E2 + e23 / E3 + e24 / E4) / 4, 2);
                We3 = Math.Round((e31 / E1 + e32 / E2 + 1 / E3 + e34 / E4) / 4, 2);
                We4 = Math.Round((e41 / E1 + e42 / E2 + e43 / E3 + 1 / E4) / 4, 2);
                Ce = Math.Round(We1 * u41 + We2 * u42 + We3 * u43 + We4 * u44, 2);
                #endregion

                #region ��ҵ����

                F1 = Math.Round(1 + f21 + f31 + f41 + f51, 2);
                F2 = Math.Round(f12 + 1 + f32 + f42 + f52, 2);
                F3 = Math.Round(f13 + f23 + 1 + f43 + f53, 2);
                F4 = Math.Round(f14 + f24 + f34 + 1 + f54, 2);
                F5 = Math.Round(f15 + f25 + f35 + f45 + 1, 2);
                Wf1 = Math.Round((1 / F1 + f12 / F2 + f13 / F3 + f14 / F4 + f15 / F5) / 5, 2);
                Wf2 = Math.Round((f21 / F1 + 1 / F2 + f23 / F3 + f24 / F4 + f25 / F5) / 5, 2);
                Wf3 = Math.Round((f31 / F1 + f32 / F2 + 1 / F3 + f34 / F4 + f35 / F5) / 5, 2);
                Wf4 = Math.Round((f41 / F1 + f42 / F2 + f43 / F3 + 1 / F4 + f45 / F5) / 5, 2);
                Wf5 = Math.Round((f51 / F1 + f52 / F2 + f53 / F3 + f54 / F4 + 1 / F5) / 5, 2);
                Cf = Math.Round(Wf1 * u51 + Wf2 * u52 + Wf3 * u53 + Wf4 * u54 + Wf5 * u55, 2);
                #endregion

                #region ��ȫ����

                G1 = Math.Round(1 + g21 + g31 + g41 + g51 + g61, 2);
                G2 = Math.Round(g12 + 1 + g32 + g42 + g52 + g62, 2);
                G3 = Math.Round(g13 + g23 + 1 + g43 + g53 + g63, 2);
                G4 = Math.Round(g14 + g24 + g34 + 1 + g54 + g64, 2);
                G5 = Math.Round(g15 + g25 + g35 + g45 + 1 + g65, 2);
                G6 = Math.Round(g16 + g26 + g36 + g46 + g56 + 1, 2);
                Wg1 = Math.Round((1 / G1 + g12 / G2 + g13 / G3 + g14 / G4 + g15 / G5 + g16 / G6) / 6, 2);
                Wg2 = Math.Round((g21 / G1 + 1 / G2 + g23 / G3 + g24 / G4 + g25 / G5 + g26 / G6) / 6, 2);
                Wg3 = Math.Round((g31 / G1 + g32 / G2 + 1 / G3 + g34 / G4 + g35 / G5 + g36 / G6) / 6, 2);
                Wg4 = Math.Round((g41 / G1 + g42 / G2 + g43 / G3 + 1 / G4 + g45 / G5 + g46 / G6) / 6, 2);
                Wg5 = Math.Round((g51 / G1 + g52 / G2 + g53 / G3 + g54 / G4 + 1 / G5 + g56 / G6) / 6, 2);
                Wg6 = Math.Round((g61 / G1 + g62 / G2 + g63 / G3 + g64 / G4 + g65 / G5 + 1 / G6) / 6, 2);
                Cg = Math.Round(Wg1 * u61 + Wg2 * u62 + Wg3 * u63 + Wg4 * u64 + Wg5 * u65 + Wg6 * u66, 2);
                #endregion

                #region ����
                double C;
                string result;

                C = Math.Round(w1 * Cb + w2 * Cc + w3 * Cd + w4 * Ce + w5 * Cf + w6 * Cg, 2);

                if (C >= 90)
                {
                    result = "����С���ɿ�";
                }
                else if (C < 80)
                {
                    result = "���մ��ѿ�";
                }
                else
                {
                    result = "�з��ա�Ӧ�Ľ�";
                }
                #endregion

                obj = new object[] { u11, u12, u13, u14, u15, u21, u22, u23, u24,u25, u31, u32, u33, u34,
                    u41, u42, u43, u44, u51, u52, u53, u54, u55, u61, u62, u63, u64, u65, u66,a12, a13, a14,
                    a15, a16, a23, a24, a25, a26, a34, a35, a36, a45, a46, a56,a21, a31, a32, a41, a42, a43,
                    a51, a52, a53, a54, a61, a62, a63, a64, a65 ,A1, A2, A3, A4, A5, A6, w1, w2, w3, w4, w5, w6,
                    wa11, wa12, wa13, wa14, wa15, wa16, wa21, wa22, wa23, wa24, wa25, wa26, wa31, wa32,
                    wa33, wa34, wa35, wa36, wa41, wa42, wa43, wa44, wa45, wa46, wa51, wa52, wa53, wa54, wa55,
                    wa56, wa61, wa62, wa63, wa64, wa65, wa66,b12, b13, b14, b15, b21, b23, b24, b25 ,b31, b32,
                    b34, b35, b41, b42, b43, b45, b51, b52, b53, b54,B1, B2, B3, B4, B5, Wb1, Wb2, Wb3, Wb4, Wb5, Cb,
                    c12, c13, c14, c15, c21, c23, c24, c25, c31, c32, c34, c35, c41, c42, c43, c45, c51, c52, c53, c54,
                    C1, C2, C3, C4, C5, Wc1, Wc2, Wc3, Wc4, Wc5, Cc,d12, d13, d14, d21, d23, d24, d31, d32, d34, d41, d42, d43,
                    D1, D2, D3, D4, Wd1, Wd2, Wd3, Wd4, Cd,e12, e13, e14, e21, e23, e24, e31, e32, e34, e41, e42, e43,
                    E1, E2, E3, E4, We1, We2, We3, We4, Ce,f12, f13, f14, f15, f21, f23, f24, f25, f31, f32, f34, f35,
                    f41, f42, f43, f45, f51, f52, f53, f54,F1, F2, F3, F4, F5, Wf1, Wf2, Wf3, Wf4, Wf5, Cf,g12, g13, g14, g15,
                    g16, g23, g24, g25, g26, g34, g35, g36, g45, g46, g56,g21, g31, g32, g41, g42, g43, g51, g52, g53, g54,
                    g61, g62, g63, g64, g65,G1, G2, G3, G4, G5, G6, Wg1, Wg2, Wg3, Wg4, Wg5, Wg6, Cg,C,result};
            }

            foreach (Framework.Entity.Template template in templateList)
            {
                if (itemtext == template.Title)
                {
                    item = template;
                    break;
                }
            }
            CreateModuleIntance(item, null, @class, obj);
            this.Close();
        }
Пример #50
0
        private void BtnSubmit_Click(object sender, EventArgs e)
        {
            object[] obj = new object[] { };
                Framework.Entity.Template item = new Framework.Entity.Template();
                string itemtext = "";

                #region 表A.0.6轴心受压构件的稳定系数Φ(Q235钢)
                double[,] λArray = new double[,] {  {	1	,	0.997	,	0.995	,	0.992	,	0.989	,	0.987	,	0.984	,	0.981	,	0.979	,	0.976	},
                                                                        {	0.974	,	0.971	,	0.968	,	0.966	,	0.963	,	0.96	,	0.958	,	0.955	,	0.952	,	0.949	},
                                                                        {	0.947	,	0.944	,	0.941	,	0.938	,	0.936	,	0.933	,	0.93	,	0.927	,	0.924	,	0.921	},
                                                                        {	0.918	,	0.915	,	0.912	,	0.909	,	0.906	,	0.903	,	0.899	,	0.896	,	0.893	,	0.889	},
                                                                        {	0.886	,	0.882	,	0.879	,	0.875	,	0.872	,	0.868	,	0.864	,	0.861	,	0.858	,	0.855	},
                                                                        {	0.852	,	0.849	,	0.846	,	0.843	,	0.839	,	0.836	,	0.832	,	0.829	,	0.825	,	0.822	},
                                                                        {	0.818	,	0.814	,	0.81	,	0.806	,	0.802	,	0.797	,	0.793	,	0.789	,	0.784	,	0.779	},
                                                                        {	0.775	,	0.77	,	0.765	,	0.76	,	0.755	,	0.75	,	0.744	,	0.739	,	0.733	,	0.728	},
                                                                        {	0.722	,	0.716	,	0.71	,	0.704	,	0.698	,	0.692	,	0.686	,	0.68	,	0.673	,	0.667	},
                                                                        {	0.661	,	0.654	,	0.648	,	0.641	,	0.634	,	0.626	,	0.618	,	0.611	,	0.603	,	0.595	},
                                                                        {	0.588	,	0.58	,	0.573	,	0.566	,	0.558	,	0.551	,	0.544	,	0.537	,	0.53	,	0.523	},
                                                                        {	0.516	,	0.509	,	0.502	,	0.496	,	0.489	,	0.483	,	0.476	,	0.47	,	0.464	,	0.458	},
                                                                        {	0.452	,	0.446	,	0.44	,	0.434	,	0.428	,	0.423	,	0.417	,	0.412	,	0.406	,	0.401	},
                                                                        {	0.396	,	0.391	,	0.386	,	0.381	,	0.376	,	0.371	,	0.367	,	0.362	,	0.357	,	0.353	},
                                                                        {	0.349	,	0.344	,	0.34	,	0.336	,	0.332	,	0.328	,	0.324	,	0.32	,	0.316	,	0.312	},
                                                                        {	0.308	,	0.305	,	0.301	,	0.298	,	0.294	,	0.291	,	0.287	,	0.284	,	0.281	,	0.277	},
                                                                        {	0.274	,	0.271	,	0.268	,	0.265	,	0.262	,	0.259	,	0.256	,	0.253	,	0.251	,	0.248	},
                                                                        {	0.245	,	0.243	,	0.24	,	0.237	,	0.235	,	0.232	,	0.23	,	0.227	,	0.225	,	0.223	},
                                                                        {	0.22	,	0.218	,	0.216	,	0.214	,	0.211	,	0.209	,	0.207	,	0.205	,	0.203	,	0.201	},
                                                                        {	0.199	,	0.197	,	0.195	,	0.193	,	0.191	,	0.189	,	0.188	,	0.186	,	0.184	,	0.182	},
                                                                        {	0.18	,	0.179	,	0.177	,	0.175	,	0.174	,	0.172	,	0.171	,	0.169	,	0.167	,	0.166	},
                                                                        {	0.164	,	0.163	,	0.161	,	0.16	,	0.159	,	0.157	,	0.156	,	0.154	,	0.153	,	0.152	},
                                                                        {	0.15	,	0.149	,	0.148	,	0.146	,	0.145	,	0.144	,	0.143	,	0.141	,	0.14	,	0.139	},
                                                                        {	0.138	,	0.137	,	0.136	,	0.135	,	0.133	,	0.132	,	0.131	,	0.13	,	0.129	,	0.128	},
                                                                        {	0.127	,	0.126	,	0.125	,	0.124	,	0.123	,	0.122	,	0.121	,	0.12	,	0.119	,	0.118	},
                                                                        {	0.117	,	0	,	0	,	0	,	0	,	0	,	0	,	0	,	0	,	0	}
                                                                    };
                #endregion
                if (CbxBeamFormType.SelectedIndex == 0)
                {
                 itemtext = "梁模板(碗扣)";

                #region 参数赋值
                //BFtabItem1构造参数
                double bf1_1, bf1_2, bf1_3, bf1_4, bf1_5, bf1_7, bf1_8, bf1_9, bf1_10, bf1_11, bf1_12, bf1_13, bf1_14, bf1_16, bf1_17, bf1_18, bf1_19;
                string bf1_6, bf1_15, ZCJJ;

                bf1_1 = Db_BF_KD.Value;
                bf1_2 = Db_BF_CG.Value;
                bf1_3 = Db_BF_CCG.Value;
                bf1_4 = Db_BF_CCK.Value;
                bf1_5 = Db_BF_HD.Value;
                bf1_6 = Tb_BF_ZCFS.Text;
                bf1_7 = Db_BF_XLSL.Value;
                bf1_8 = Db_BF_ZLCD.Value;
                bf1_9 = Convert.ToDouble(Cb_BF_BJ.Text);
                bf1_10 = Convert.ToDouble(Cb_BF_JJ.Text);
                bf1_11 = Db_BF_JJ.Value;
                bf1_12 = Db_BF_XTCD.Value;
                bf1_13 = Db_BF_XLJJ.Value;
                bf1_14 = Db_BF_LZGS.Value;
                bf1_15 = Tb_BF_ZCFS.Text;
                bf1_16 = Db_BF_ZCJJ1.Value;
                bf1_17 = Db_BF_ZCJJ2.Value;
                bf1_18 = Db_BF_ZCJJ3.Value;
                bf1_19 = Db_BF_ZCJJ4.Value;

                if (bf1_14 == 0)
                {
                    ZCJJ = "";
                }
                else if (bf1_14 == 1)
                {
                    ZCJJ = Convert.ToString(bf1_16);
                }
                else if (bf1_14 == 2)
                {
                    ZCJJ = bf1_16 + "," + bf1_17;
                }
                else if (bf1_14 == 3)
                {
                    ZCJJ = bf1_16 + "," + bf1_17 + "," + bf1_18;
                }
                else
                {
                    ZCJJ = bf1_16 + "," + bf1_17 + "," + bf1_18 + "," + bf1_19;
                }

                //BFtabItem2支撑参数+面板
                double bf2_3, bf2_4, bf2_5;
                string bf2_1, bf2_2;

                bf2_1 = Cb_BF_2JDCLX.Text;
                bf2_2 = Cb_BF_2MBLX.Text;
                bf2_3 = Db_BF_2MBHD.Value;
                bf2_4 = Db_BF_2QD.Value;
                bf2_5 = Db_BF_2TXML.Value;

                //BFtabItem3小梁
                string bf3_1, bf3_2;
                double bf3_3, bf3_4, bf3_5, bf3_6, bf3_7, bf3_8, bf3_9, bf3_10;

                bf3_1 = Cb_BF_3XLCZ.Text;
                bf3_2 = Cb_BF_3JMLX.Text;
                bf3_3 = Db_BF_3FMK.Value;
                bf3_4 = Db_BF_3FMG.Value;
                bf3_5 = Db_BF_3KWQD.Value;
                bf3_6 = Db_BF_3KJQD.Value;
                bf3_7 = Db_BF_3TXML.Value;
                bf3_8 = Db_BF_3GXJ.Value;
                bf3_9 = Db_BF_3DKJ.Value;
                bf3_10 = Db_BF_3MJJ.Value;

                //BFtabItem4主梁
                string bf4_1, bf4_2;
                double bf4_3, bf4_4, bf4_5, bf4_6, bf4_7, bf4_8, bf4_9, bf4_10;

                bf4_1 = Cb_BF_4ZLCZ.Text;
                bf4_2 = Cb_BF_4JMLX.Text;
                bf4_3 = Db_BF_4FMK.Value;
                bf4_4 = Db_BF_4FMG.Value;
                bf4_5 = Db_BF_4KWQD.Value;
                bf4_6 = Db_BF_4KJQD.Value;
                bf4_7 = Db_BF_4TXML.Value;
                bf4_8 = Db_BF_4GXJ.Value;
                bf4_9 = Db_BF_4DKJ.Value;
                bf4_10 = Db_BF_4MJJ.Value;

                //BFtabItem5立柱
                string bf5_1;
                double bf5_2, bf5_3, bf5_4, bf5_5;

                bf5_1 = Cb_BF_5GGLX.Text;
                bf5_2 = Convert.ToDouble(Tb_BF_5HZBJ.Text);
                bf5_3 = Db_BF_5KYQD.Value;
                bf5_4 = Convert.ToDouble(Tb_BF_5LZJMMJ.Text);
                bf5_5 = Convert.ToDouble(Tb_BF_5JMDKJ.Text);

                //BFtabItem6风荷载
                string bf6_1, bf6_2;
                double bf6_3, bf6_4, bf6_5, bf6_6, bf6_7;

                bf6_1 = Cb_BF_6SF.Text;
                bf6_2 = Cb_BF_6DQ.Text;
                bf6_3 = Convert.ToDouble(Tb_BF_6SFDQFY.Text);
                bf6_4 = Db_BF_6GD.Value;
                bf6_5 = Db_BF_6GDBHXS.Value;
                bf6_6 = Db_BF_6TXXS.Value;
                bf6_7 = Db_BF_6BZZ.Value;

                //BFtabItem7可调托座+地基基础
                string bf7_3, bf7_4;
                double bf7_1, bf7_2, bf7_5, bf7_6, bf7_7;
                double[] zjxs = new double[] { 1.0, 0.9, 0.5, 0.8, 0.4 };

                bf7_1 = Convert.ToDouble(Cb_BF_7ZLGS.Text);
                bf7_2 = Db_BF_7CZL.Value;
                bf7_3 = Cb_BF_7ZYWZ.Text;
                bf7_4 = Cb_BF_7DJTLX.Text;
                bf7_5 = Db_BF_7SJZ.Value;
                bf7_6 = zjxs[Cb_BF_7ZJXS.SelectedIndex];
                bf7_7 = Db_BF_7DMMJ.Value;

                //BFtabItem8荷载参数
                double bf8_1, bf8_2, bf8_3, bf8_4, bf8_5, bf8_6, bf8_7, bf8_8;

                bf8_1 = Db_BF_8MBZZ.Value;
                bf8_2 = Db_BF_8MBJXLZZ.Value;
                bf8_3 = Db_BF_8LBMBZZ.Value;
                bf8_4 = Db_BF_8MBJZJZZ.Value;
                bf8_5 = Db_BF_8XJHNTZZ.Value;
                bf8_6 = Db_BF_8HNTLGJ.Value;
                bf8_7 = Db_BF_8HNTBGJ.Value;
                bf8_8 = Db_BF_8QZ.Value;
                #endregion

                #region 一、面板验算
                double sum1I, sum1W, sum1h, sum1L, sum1q1, sum1q1J, sum1q1H, sum1q2, sum1Mmax,
                    sum1σ, sum1vmax, sum1ν, sum1R1, sum1R2, sum1R3, sum1r1, sum1r2, sum1r3;
                double a1, b1;
                string compare1_1, compare1_2, result1_1, result1_2;

                sum1I = 1000 * bf2_3 * bf2_3 * bf2_3 / 12; //面板截面惯性矩I
                sum1W = 1000 * bf2_3 * bf2_3 / 6; //面板截面抵抗矩W
                sum1h = bf1_3 / 1000;
                sum1L = bf1_13 / 1000;
                a1 = 0.9 * (1.2 * (bf8_1 + (bf8_5 + bf8_6) * sum1h) + 1.4 * bf8_8);
                b1 = 0.9 * (1.35 * (bf8_1 + (bf8_5 + bf8_6) * sum1h) + 1.4 * 0.7 * bf8_8);
                sum1q1 = a1 > b1 ? a1 : b1;
                sum1q1J = 0.9 * 1.35 * (bf8_1 + (bf8_5 + bf8_6) * sum1h);
                sum1q1H = 0.9 * 1.4 * 0.7 * bf8_8;
                sum1q2 = (bf8_1 + (bf8_5 + bf8_6) * sum1h) * 1;
                sum1Mmax = -0.107 * sum1q1J * sum1L * sum1L + 0.121 * sum1q1H * sum1L * sum1L;
                sum1σ = sum1Mmax / sum1W;
                sum1Mmax = Math.Round(sum1Mmax, 2);
                sum1σ = Math.Round(sum1σ, 2);
                if (sum1σ <= bf2_4)
                {
                    compare1_1 = "面板的计算强度" + sum1σ + "小于等于面板抗弯强度设计值" + bf2_4 + "N/mm2,满足要求!";
                    result1_1 = "满足要求";
                }
                else
                {
                    compare1_1 = "面板的计算强度" + sum1σ + "大于面板抗弯强度设计值" + bf2_4 + "N/mm2,不满足要求!";
                    result1_1 = "满足要求";
                }
                sum1vmax = 0.632 * sum1q2 * sum1L * sum1L * sum1L * sum1L / 100 / bf2_5 / sum1I;
                sum1ν = sum1L / 400;
                sum1vmax = Math.Round(sum1vmax, 2);
                sum1ν = Math.Round(sum1ν, 2);
                if (sum1vmax < sum1ν)
                {
                    compare1_2 = "面板的挠度" + sum1vmax + "小于等于面板最大允许挠度值" + sum1ν + "mm,满足要求!";
                    result1_2 = "满足要求";
                }
                else
                {
                    compare1_2 = "面板的挠度" + sum1vmax + "大于面板最大允许挠度值" + sum1ν + "mm,不满足要求!";
                    result1_2 = "不满足要求";
                }

                sum1R1 = 0.393 * sum1q1J * sum1L + 0.446 * sum1q1H * sum1L;
                sum1R2 = 1.143 * sum1q1J * sum1L + 1.223 * sum1q1H * sum1L;
                sum1R3 = 0.928 * sum1q1J * sum1L + 1.142 * sum1q1H * sum1L;
                sum1r1 = 0.393 * sum1q2 * sum1L;
                sum1r2 = 1.143 * sum1q2 * sum1L;
                sum1r3 = 0.928 * sum1q2 * sum1L;

                sum1I = Math.Round(sum1I, 2);
                sum1W = Math.Round(sum1W, 2);
                sum1q1 = Math.Round(sum1q1, 2);
                sum1q1J = Math.Round(sum1q1J, 2);
                sum1q1H = Math.Round(sum1q1H, 2);
                sum1q2 = Math.Round(sum1q2, 2);
                sum1R1 = Math.Round(sum1R1, 2);
                sum1R2 = Math.Round(sum1R2, 2);
                sum1R3 = Math.Round(sum1R3, 2);
                sum1r1 = Math.Round(sum1r1, 2);
                sum1r2 = Math.Round(sum1r2, 2);
                sum1r3 = Math.Round(sum1r3, 2);

                #endregion

                #region 二、小梁验算
                double sum2q1, sum2q2, sum2Mmax, sum2σ, sum2Vmax, sum2τ, sum2ν1, sum2ν, sum2ν2, sum2ν_2;
                double a2, b2, c2, d2, e2, f2, g2, h2;
                string compare2_1, str_xlcz, compare2_2, compare2_3, compare2_4, result2_1, result2_2;

                c2 = sum1R1 + (bf8_2 - bf8_1) * (bf1_4 / 1000) / (bf1_7 - 1);
                d2 = sum1R2 + (bf8_2 - bf8_1) * (bf1_4 / 1000) / (bf1_7 - 1);
                sum2q1 = c2 > d2 ? c2 : d2;
                e2 = sum1r1 + (bf8_2 - bf8_1) * (bf1_4 / 1000) / (bf1_7 - 1);
                f2 = sum1r2 + (bf8_2 - bf8_1) * (bf1_4 / 1000) / (bf1_7 - 1);
                sum2q2 = e2 > f2 ? e2 : f2;
                g2 = 0.107 * sum2q1 * bf1_10 * bf1_10 / 1000 / 1000;
                h2 = 0.5 * sum2q1 * bf1_12 * bf1_12 / 1000 / 1000;
                sum2Mmax = g2 > h2 ? g2 : h2;
                sum2σ = sum2Mmax * 1000000 / bf3_9 / 1000;
                sum2σ = Math.Round(sum2σ, 2);
                if (sum2σ < bf3_5)
                {
                    compare2_1 = "小梁的计算强度" + sum2σ + "小于等于小梁抗弯强度设计值" + bf3_5 + "N/mm2,满足要求!";
                    result2_1 = "满足要求";
                }
                else
                {
                    compare2_1 = "小梁的计算强度" + sum2σ + "大于小梁抗弯强度设计值" + bf3_5 + "N/mm2,满足要求!";
                    result2_1 = "不满足要求";
                }

                a2 = 0.607 * sum2q1 * bf1_10 / 1000;
                b2 = sum2q1 * bf1_12 / 1000;
                sum2Vmax = a2 > b2 ? a2 : b2;
                if (Cb_BF_3XLCZ.SelectedIndex == 0)
                {
                    sum2τ = 3 * sum2Vmax * 1000 / (2 * bf3_3 * bf3_4);
                    sum2τ = Math.Round(sum2τ, 2);
                    str_xlcz = "τmax=3Vmax/(2bh0)=" + sum2τ + "N/mm2";
                }
                else
                {
                    sum2τ = sum2Vmax * 1000 * bf3_10 * 1000 / (bf3_8 * 10000 * 7.6);//小梁厚度=7.6
                    sum2τ = Math.Round(sum2τ, 2);
                    str_xlcz = "τ =VSo/Itw=" + sum2τ + "N/mm2";
                }
                if (sum2τ <= bf3_6)
                {
                    compare2_2 = "小梁的计算强度" + sum2τ + "小于等于小梁抗剪强度设计值" + bf3_6 + "N/mm2,满足要求!";
                    result2_2 = "满足要求";
                }
                else
                {
                    compare2_2 = "小梁的计算强度" + sum2τ + "大于小梁抗剪强度设计值" + bf3_6 + "N/mm2,不满足要求!";
                    result2_2 = "不满足要求";
                }

                sum2ν1 = 0.632 * sum2q2 * bf1_10 * bf1_10 * bf1_10 * bf1_10 / (100 * bf3_7 * bf3_8);
                sum2ν = bf1_10 / 400;
                sum2ν1 = Math.Round(sum2ν1, 2);
                sum2ν = Math.Round(sum2ν, 2);
                if (sum2ν1 <= sum2ν)
                    compare2_3 = "小梁跨中的挠度" + sum2ν1 + "小于等于小梁跨中的最大允许挠度值" + sum2ν + "mm,满足要求!";
                else
                    compare2_3 = "小梁跨中的挠度" + sum2ν1 + "大于小梁跨中的最大允许挠度值" + sum2ν + "mm,不满足要求!";

                sum2ν2 = sum2q2 * bf1_12 * bf1_12 * bf1_12 * bf1_12 / (8 * bf3_7 * bf3_8);
                sum2ν_2 = bf1_12 / 400;
                sum2ν2 = Math.Round(sum2ν2, 2);
                sum2ν_2 = Math.Round(sum2ν_2, 2);
                if (sum2ν2 <= sum2ν_2)
                    compare2_4 = "小梁悬臂端的挠度" + sum2ν2 + "小于等于小梁悬臂端的最大允许挠度值" + sum2ν_2 + "mm,满足要求!";
                else
                    compare2_4 = "小梁悬臂端的挠度" + sum2ν2 + "大于小梁悬臂端的最大允许挠度值" + sum2ν_2 + "mm,不满足要求!";

                sum2q1 = Math.Round(sum2q1, 2);
                sum2q2 = Math.Round(sum2q2, 2);
                sum2Mmax = Math.Round(sum2Mmax, 2);
                sum2Vmax = Math.Round(sum2Vmax, 2);
                #endregion

                #region 三、主梁验算
                double sum3G2k, sum3G3k, sum3Gk, sum3q1, sum3q2, sum3q, sum3l, sum3M, sum3W, sum3σ, sum3qN, sum3v, sum3ν;
                string compare3_1, compare3_2, result3_1, result3_2;

                double[] zcjj = new double[] { Db_BF_ZCJJ1.Value, Db_BF_ZCJJ2.Value, Db_BF_ZCJJ3.Value, Db_BF_ZCJJ4.Value };
                double min = 0;

                int i = Convert.ToInt32(Db_BF_LZGS.Value);
                if (i == 0)
                {
                    sum3l = 0;
                }
                else
                {
                    min = zcjj[0];
                    for (int j = 1; j < i; j++)
                    {
                        if (min > zcjj[j])
                        {
                            min = zcjj[j];
                        }
                    }
                    sum3l = min / 1000;
                }

                sum3G2k = bf8_5 * bf1_3 / 1000;
                sum3G3k = bf8_7 * bf1_3 / 1000;
                sum3Gk = bf8_2 + sum3G2k + sum3G3k;
                sum3q1 = 0.9 * (1.2 * sum3Gk + 1.4 * bf8_8) * 0.8;
                sum3q2 = 0.9 * (1.35 * sum3Gk + 1.4 * 0.7 * bf8_8) * 0.8;
                sum3q = sum3q1 > sum3q2 ? sum3q1 : sum3q2;
                sum3M = sum3q * sum3l * sum3l / 8;
                sum3W = bf4_9 * 1000;
                sum3σ = sum3M * 1000 / sum3W;
                sum3σ = Math.Round(sum3σ, 2);
                if (sum3σ > bf4_5)
                {
                    compare3_1 = "主梁的计算强度" + sum3σ + "大于主梁抗弯强度设计值" + bf4_5 + "N/mm2,不满足要求!";
                    result3_1 = "满足要求";
                }
                else
                {
                    compare3_1 = "主梁的计算强度" + sum3σ + "小于等于主梁抗弯强度设计值" + bf4_5 + "N/mm2,满足要求!";
                    result3_1 = "不满足要求";
                }

                sum3qN = 0.8 * sum3Gk;
                sum3v = 5 * sum3qN * min * min * min * min / (384 * bf4_7 * bf4_8 * 10000);
                sum3ν = min / 400;
                sum3v = Math.Round(sum3v, 2);
                sum3ν = Math.Round(sum3ν, 2);
                if (sum3v > sum3ν)
                {
                    compare3_2 = "主梁跨中的挠度" + sum3v + "大于主梁跨中的最大允许挠度值" + sum3ν + "mm,不满足要求!";
                    result3_2 = "满足要求";
                }
                else
                {
                    compare3_2 = "主梁跨中的挠度" + sum3v + "小于等于主梁跨中的最大允许挠度值" + sum3ν + "mm,满足要求!";
                    result3_2 = "不满足要求";
                }

                sum3G2k = Math.Round(sum3G2k, 2);
                sum3G3k = Math.Round(sum3G3k, 2);
                sum3Gk = Math.Round(sum3Gk, 2);
                sum3q1 = Math.Round(sum3q1, 2);
                sum3q2 = Math.Round(sum3q2, 2);
                sum3q = Math.Round(sum3q, 2);
                sum3M = Math.Round(sum3M, 2);
                sum3qN = Math.Round(sum3qN, 2);

                #endregion

                #region 四、立柱稳定性验算
                double sum4λ, sum4φ, sum4G1k, sum4G2k, sum4G3k, sum4Gk, sum4Qk, sum4ωk, sum4Mw, sum4Nw, sum4f;
                string compare4_1, compare4_2, result4_1, result4_2;

                sum4λ = bf1_9 / bf5_2;
                sum4λ = Math.Round(sum4λ, 2);
                if (sum4λ > 250)
                {
                    compare4_1 = "立柱长细比" + sum4λ + "大于立柱最大允许长细比250mm,不满足要求!";
                    result4_1 = "满足要求";
                }
                else
                {
                    compare4_1 = "立柱长细比" + sum4λ + "小于等于立柱最大允许长细比250mm,满足要求!";
                    result4_1 = "不满足要求";
                }

                if (sum4λ > 250)
                {
                    sum4φ = 7320 / sum4λ / sum4λ;
                }
                else if (Math.Floor(sum4λ) == sum4λ)
                {
                    int sum4λy = Convert.ToInt32(sum4λ / 10);//第λy1行
                    int sum4λx = Convert.ToInt32(sum4λ % 10);// 第λx1列
                    sum4φ = λArray[sum4λy, sum4λx]; //λArray数组为全局变量,参见“表B.0.6轴心受压构件的稳定系数Φ(Q235钢)”
                }
                else
                {
                    double sum4λ_1, sum4λ_2, sum4φ1, sum4φ2;
                    sum4λ_1 = Math.Ceiling(sum4λ);//x1
                    sum4λ_2 = Math.Floor(sum4λ);//x0

                    int sum4λy1 = Convert.ToInt32(sum4λ_1 / 10);
                    int sum4λx1 = Convert.ToInt32(sum4λ_1 % 10);
                    sum4φ1 = λArray[sum4λy1, sum4λx1]; //y1

                    int sum4λy2 = Convert.ToInt32(sum4λ_2 / 10);
                    int sum4λx2 = Convert.ToInt32(sum4λ_2 % 10);
                    sum4φ2 = λArray[sum4λy2, sum4λx2]; //y0

                    sum4φ = (sum4λ - sum4λ_1) / (sum4λ_2 - sum4λ_1) * sum4φ2 + (sum4λ - sum4λ_2) / (sum4λ_1 - sum4λ_2) * sum4φ1;//拉格朗日插值
                }

                sum4G1k = bf8_4 * bf1_10 / 1000 * bf1_11 / 1000;
                sum4G2k = bf8_5 * bf1_4 / 1000 * bf1_3 / 1000 * bf1_10 / 1000;
                sum4G3k = bf8_6 * bf1_4 / 1000 * bf1_3 / 1000 * bf1_10 / 1000;
                sum4Gk = sum4G1k + sum4G2k + sum4G3k;
                sum4Qk = bf8_8 * bf1_10 / 1000 * bf1_11 / 1000;
                sum4ωk = 0.7 * bf6_5 * bf6_6 * bf6_3;
                sum4Mw = 0.9 * 1.4 * sum4ωk * bf1_10 / 1000 * bf1_9 / 1000 * bf1_9 / 1000 / 10;
                sum4Nw = 1.2 * sum4Gk + 0.9 * 1.4 * sum4Qk + 0.9 * 1.4 * sum4Mw / (bf1_10 / 1000);
                sum4f = sum4Nw * 1000 / (sum4φ * bf5_4) + sum4Mw * 1000 / bf5_5;
                sum4f = Math.Round(sum4f, 2);
                if (sum4f > 205)
                {
                    compare4_2 = "立柱抗压强度" + sum4f + "大于立柱抗压强度设计值205N/mm2,不满足要求!";
                    result4_2 = "满足要求";
                }
                else
                {
                    compare4_2 = "立柱抗压强度" + sum4f + "小于等于立柱抗压强度设计值205N/mm2,不满足要求!";
                    result4_2 = "不满足要求";
                }

                sum4G1k = Math.Round(sum4G1k, 2);
                sum4G2k = Math.Round(sum4G2k, 2);
                sum4G3k = Math.Round(sum4G3k, 2);
                sum4Gk = Math.Round(sum4Gk, 2);
                sum4Qk = Math.Round(sum4Qk, 2);
                sum4ωk = Math.Round(sum4ωk, 2);
                sum4Mw = Math.Round(sum4Mw, 2);
                sum4Nw = Math.Round(sum4Nw, 2);
                sum4φ = Math.Round(sum4φ, 2);

                #endregion

                #region 五、可调托座验算
                double sum5N;
                string compare5_1, result5_1;

                sum5N = sum4Nw / bf7_1;
                sum5N = Math.Round(sum5N, 2);
                if (sum5N > bf7_2)
                {
                    compare5_1 = "可调托座受力" + sum5N + "大于可调托座承载力容许值" + bf7_2 + "(kN),不满足要求!";
                    result5_1 = "满足要求";
                }
                else
                {
                    compare5_1 = "可调托座受力" + sum5N + "小于等于可调托座承载力容许值" + bf7_2 + "(kN),满足要求!";
                    result5_1 = "不满足要求";
                }
                #endregion

                #region 六、立柱地基基础验算
                double sum6p;
                string compare6_1, result6_1;

                sum6p = sum4Nw / (bf7_6 * bf7_7 * bf7_1);
                sum6p = Math.Round(sum6p, 2);
                if (sum6p > bf7_5)
                {
                    compare6_1 = "立柱底垫板的底面平均压力" + sum6p + "大于地基土承载力设计值" + bf7_5 + "N/mm2,不满足要求!";
                    result6_1 = "满足要求";
                }
                else
                {
                    compare6_1 = "立柱底垫板的底面平均压力" + sum6p + "小于等于地基土承载力设计值" + bf7_5 + "N/mm2,满足要求!";
                    result6_1 = "不满足要求";
                }
                #endregion

                obj = new object[] { ZCJJ,bf1_1,bf1_2,bf1_3,bf1_4,bf1_5,bf1_6,bf1_7,bf1_8,bf1_9,bf1_10,bf1_11,bf1_12,bf1_13,bf1_14,bf1_15,bf2_1,
            bf2_2,bf2_3,bf2_4,bf2_5,bf3_1,bf3_2,bf3_5,bf3_6,bf3_7,bf3_8,bf3_9,bf4_1,bf4_2,bf4_5,bf4_6,bf4_7,bf4_8,bf4_9,bf5_1,bf5_2,bf5_3,
            bf5_4,bf5_5,bf6_1,bf6_2,bf6_3,bf6_4,bf6_5,bf6_6,bf6_7,bf7_1,bf7_2,bf7_3,bf7_4,bf7_5,bf7_6,bf7_7,bf8_1,bf8_2,bf8_3,bf8_4,bf8_5,
            bf8_6,bf8_7,bf8_8,sum1I,sum1W,sum1h,sum1L,sum1q1,sum1q1J,sum1q1H,sum1q2,sum1Mmax,sum1σ,compare1_1,sum1vmax,sum1ν,compare1_2,
            sum1R1,sum1R2,sum1R3,sum1r1,sum1r2,sum1r3,sum2q1,sum2q2,sum2Mmax,sum2σ,compare2_1,sum2Vmax,str_xlcz,compare2_2,sum2ν1,sum2ν,
            compare2_3,sum2ν2,sum2ν_2,compare2_4,sum3G2k,sum3G3k,sum3Gk,sum3q1,sum3q2,sum3q,sum3l,sum3M,sum3W,sum3σ,compare3_1,sum3qN,
            sum3v,min,sum3ν,compare3_2,sum4λ,compare4_1,sum4φ,sum4G1k,sum4G2k,sum4G3k,sum4Gk,sum4Qk,sum4ωk,sum4Mw,sum4Nw,sum4f,compare4_2,
            sum5N,compare5_1,sum6p,compare6_1,result1_1,result1_2,result2_1,result2_2,result3_1,result3_2,result4_1,result4_2,result5_1,result6_1};

                foreach (Framework.Entity.Template template in templateList)
                {
                    if (itemtext == template.Title)
                    {
                        item = template;
                        break;
                    }
                }
                CreateModuleIntance(item, null, @class, obj);
                this.Close();
            }
              else if(CbxBeamFormType.SelectedIndex == 1)
            {

            itemtext = "梁模板(扣件)计算书";

             #region 参数赋值
                //BFtabItem1构造参数
                double bf1_3, bf1_4,bf1_6, bf1_7,  bf1_11, bf1_12, bf1_13, bf1_1, bf1_2, bf1_5, bf1_8, bf1_14, bf1_16, bf1_17, bf1_18, bf1_19;

                string bf1_9="", bf1_10="", bf1_15="", ZCJJ="";

                bf1_1 = BF_KJ_KD.Value;
                bf1_2 = BF_KJ_CG.Value;
                bf1_3 = BF_KJ_CCG.Value;
                bf1_4 = BF_KJ_CCK.Value;
                bf1_5 = BF_KJ_HD.Value;
                bf1_6 = BF_KJ_BJ.Value;
                bf1_7 = BF_KJ_LZJJ.Value;
                bf1_8 = BF_KJ_JLZXJL.Value;
                bf1_9 = BF_KJ_ZCFS.Text;
                bf1_10 = BF_KJ_LZWZ.Text;
                bf1_11 = BF_KJ_LZJJa.Value;
                bf1_12 = BF_KJ_LZJJb.Value;
                bf1_13 = BF_KJ_XLGS.Value;
                bf1_14 = KJ_LZGS.Value;
                bf1_15 = BF_KJ_BZFS.Text;
                bf1_16 = KJ_JL1.Value;
                bf1_17 = KJ_JL2.Value;
                bf1_18=BF_KJ_XLJJ.Value;
                bf1_19=BF_KJ_XTCD.Value;

                if (bf1_14 == 0)
                {
                    ZCJJ = "";
                }
                else if (bf1_14 == 1)
                {
                    ZCJJ = Convert.ToString(bf1_16);
                }
                else
                {
                    ZCJJ = bf1_16 + "," + bf1_17;
                }

                //BFtabItem2支撑参数+面板
                double bf2_3, bf2_4, bf2_5;
                string bf2_1="", bf2_2="";

                bf2_1 = Cb_BF_2JDCLX.Text;
                bf2_2 = Cb_BF_2MBLX.Text;
                bf2_3 = Db_BF_2MBHD.Value;
                bf2_4 = Db_BF_2QD.Value;
                bf2_5 = Db_BF_2TXML.Value;

                //BFtabItem3小梁
                string bf3_1="", bf3_2="";
                double bf3_3, bf3_4, bf3_5, bf3_6, bf3_7, bf3_8, bf3_9, bf3_10;

                bf3_1 = Cb_BF_3XLCZ.Text;
                bf3_2 = Cb_BF_3JMLX.Text;
                bf3_3 = Db_BF_3FMK.Value;
                bf3_4 = Db_BF_3FMG.Value;
                bf3_5 = Db_BF_3KWQD.Value;
                bf3_6 = Db_BF_3KJQD.Value;
                bf3_7 = Db_BF_3TXML.Value;
                bf3_8 = Db_BF_3GXJ.Value;
                bf3_9 = Db_BF_3DKJ.Value;
                bf3_10 = Db_BF_3MJJ.Value;

                //BFtabItem4主梁
                string bf4_1="", bf4_2="";
                double bf4_3, bf4_4, bf4_5, bf4_6, bf4_7, bf4_8, bf4_9, bf4_10;

                bf4_1 = Cb_BF_4ZLCZ.Text;
                bf4_2 = Cb_BF_4JMLX.Text;
                bf4_3 = Db_BF_4FMK.Value;
                bf4_4 = Db_BF_4FMG.Value;
                bf4_5 = Db_BF_4KWQD.Value;
                bf4_6 = Db_BF_4KJQD.Value;
                bf4_7 = Db_BF_4TXML.Value;
                bf4_8 = Db_BF_4GXJ.Value;
                bf4_9 = Db_BF_4DKJ.Value;
                bf4_10 = Db_BF_4MJJ.Value;

                //BFtabItem5立柱
                string bf5_1="";
                double bf5_2, bf5_3, bf5_4, bf5_5;

                bf5_1 = Cb_BF_5GGLX.Text;
                bf5_2 = Convert.ToDouble(Tb_BF_5HZBJ.Text);
                bf5_3 = Db_BF_5KYQD.Value;
                bf5_4 = Convert.ToDouble(Tb_BF_5LZJMMJ.Text);
                bf5_5 = Convert.ToDouble(Tb_BF_5JMDKJ.Text);

                //BFtabItem6风荷载
                string bf6_1="", bf6_2="";
                double bf6_3, bf6_4, bf6_5, bf6_6, bf6_7;

                bf6_1 = Cb_BF_6SF.Text;
                bf6_2 = Cb_BF_6DQ.Text;
                bf6_3 = Convert.ToDouble(Tb_BF_6SFDQFY.Text);
                bf6_4 = Db_BF_6GD.Value;
                bf6_5 = Db_BF_6GDBHXS.Value;
                bf6_6 = Db_BF_6TXXS.Value;
                bf6_7 = Db_BF_6BZZ.Value;

                //BFtabItem7可调托座+地基基础
                string bf7_3="", bf7_4="";
                double bf7_1, bf7_2, bf7_5, bf7_6, bf7_7;
                double[] zjxs = new double[] { 1.0, 0.9, 0.5, 0.8, 0.4 };

                bf7_1 = Convert.ToDouble(Cb_BF_7ZLGS.Text);
                bf7_2 = Db_BF_7CZL.Value;
                bf7_3 = Cb_BF_7ZYWZ.Text;
                bf7_4 = Cb_BF_7DJTLX.Text;
                bf7_5 = Db_BF_7SJZ.Value;
                bf7_6 = zjxs[Cb_BF_7ZJXS.SelectedIndex];
                bf7_7 = Db_BF_7DMMJ.Value;

                //BFtabItem8荷载参数
                double bf8_1, bf8_2, bf8_3, bf8_4, bf8_5, bf8_6, bf8_7, bf8_8,bf8_9;

                bf8_1 = Db_BF_8MBZZ.Value;
                bf8_2 = Db_BF_8MBJXLZZ.Value;
                bf8_3 = Db_BF_8LBMBZZ.Value;
                bf8_4 = Db_BF_8MBJZJZZ.Value;
                bf8_5 = Db_BF_8XJHNTZZ.Value;
                bf8_6 = Db_BF_8HNTLGJ.Value;
                bf8_7 = Db_BF_8HNTBGJ.Value;
                bf8_8 = Db_BF_8QZ.Value;
                bf8_9=Db_BF_8RJS.Value;
                #endregion

                #region 一、面板验算
                double sum1I, sum1W, sum1h, sum1L, sum1q1, sum1q1J, sum1q1H, sum1q2, sum1Mmax,
                    sum1σ, sum1vmax, sum1ν, sum1R1, sum1R2, sum1R3, sum1r1, sum1r2, sum1r3;
                double a1, b1;
                string compare1_1, compare1_2;

                sum1I = 1000 * bf2_3 * bf2_3 * bf2_3 / 12; //面板截面惯性矩I
                sum1W = 1000 * bf2_3 * bf2_3 / 6; //面板截面抵抗矩W
                sum1h = bf1_3 / 1000;
                sum1L = bf1_18 / 1000;
                a1 = 0.9 * (1.2 * (bf8_1 + (bf8_5 + bf8_6) * sum1h) + 1.4 * bf8_8);
                b1 = 0.9 * (1.35 * (bf8_1 + (bf8_5 + bf8_6) * sum1h) + 1.4 * 0.7 * bf8_8);
                sum1q1 = a1 > b1 ? a1 : b1;
                sum1q1J = 0.9 * 1.35 * (bf8_1 + (bf8_5 + bf8_6) * sum1h);
                sum1q1H = 0.9 * 1.4 * 0.7 * bf8_8;
                sum1q2 = (bf8_1 + (bf8_5 + bf8_6) * sum1h) * 1;
                sum1Mmax = (-0.107) * sum1q1J * sum1L * sum1L + 0.121 * sum1q1H * sum1L * sum1L;
                sum1σ = sum1Mmax / sum1W * 1000000;
                sum1Mmax = Math.Abs(sum1Mmax);//数据计算成负数,考虑公式问题或单位换算问题
                sum1σ = Math.Abs(sum1σ);//数据计算成负数,考虑公式问题或单位换算问题
                sum1Mmax = Math.Round(sum1Mmax, 2);
                sum1σ = Math.Round(sum1σ, 2);
                if (sum1σ <= bf2_4)
                    compare1_1 = "面板的计算强度" + sum1σ + "小于等于面板抗弯强度设计值" + bf2_4 + "N/mm2,满足要求!";
                else
                    compare1_1 = "面板的计算强度" + sum1σ + "大于面板抗弯强度设计值" + bf2_4 + "N/mm2,不满足要求!";

                sum1vmax = 0.632 * sum1q2 * sum1L * sum1L * sum1L * sum1L / 100 / bf2_5 / sum1I * 1000 * 1000 * 1000 * 1000;
                sum1ν = sum1L * 1000 / 400;
                sum1vmax = Math.Round(sum1vmax, 2);
                sum1ν = Math.Round(sum1ν, 2);
                if (sum1vmax < sum1ν)
                    compare1_2 = "面板的挠度" + sum1vmax + "小于等于面板最大允许挠度值" + sum1ν + "mm,满足要求!";
                else
                    compare1_2 = "面板的挠度" + sum1vmax + "大于面板最大允许挠度值" + sum1ν + "mm,不满足要求!";

                sum1R1 = 0.393 * sum1q1J * sum1L + 0.446 * sum1q1H * sum1L;
                sum1R2 = 1.143 * sum1q1J * sum1L + 1.223 * sum1q1H * sum1L;
                sum1R3 = 0.928 * sum1q1J * sum1L + 1.142 * sum1q1H * sum1L;
                sum1r1 = 0.393 * sum1q2 * sum1L;
                sum1r2 = 1.143 * sum1q2 * sum1L;
                sum1r3 = 0.928 * sum1q2 * sum1L;

                sum1I = Math.Round(sum1I, 2);
                sum1W = Math.Round(sum1W, 2);
                sum1q1 = Math.Round(sum1q1, 2);
                sum1q1J = Math.Round(sum1q1J, 2);
                sum1q1H = Math.Round(sum1q1H, 2);
                sum1q2 = Math.Round(sum1q2, 2);
                sum1R1 = Math.Round(sum1R1, 2);
                sum1R2 = Math.Round(sum1R2, 2);
                sum1R3 = Math.Round(sum1R3, 2);
                sum1r1 = Math.Round(sum1r1, 2);
                sum1r2 = Math.Round(sum1r2, 2);
                sum1r3 = Math.Round(sum1r3, 2);

                #endregion

                #region 二、小梁验算
                double sum2q1, sum2q2, sum2Mmax, sum2σ, sum2Vmax, sum2τ, sum2ν1, sum2ν, sum2ν2, sum2ν_2;
                double a2, b2, c2, d2, e2, f2, g2, h2;
                string compare2_1, str_xlcz, compare2_2, compare2_3, compare2_4;

                c2 = sum1R1 + (bf8_2 - bf8_1) * (bf1_4 / 1000) / (bf1_13 - 1);
                d2 = sum1R2 + (bf8_2 - bf8_1) * (bf1_4 / 1000) / (bf1_13 - 1);
                sum2q1 = c2 > d2 ? c2 : d2;
                e2 = sum1r1 + (bf8_2 - bf8_1) * (bf1_4 / 1000) / (bf1_13 - 1);
                f2 = sum1r2 + (bf8_2 - bf8_1) * (bf1_4 / 1000) / (bf1_13 - 1);
                sum2q2 = e2 > f2 ? e2 : f2;
                g2 = 0.107 * sum2q1 * bf1_11 * bf1_11 / 1000 / 1000;
                h2 = 0.5 * sum2q1 * bf1_19 * bf1_19 / 1000 / 1000;
                sum2Mmax = g2 > h2 ? g2 : h2;
                sum2σ = sum2Mmax * 1000000 / bf3_9 / 1000;
                sum2σ = Math.Round(sum2σ, 2);
                if (sum2σ < bf3_5)
                    compare2_1 = "小梁的计算强度" + sum2σ + "小于等于小梁抗弯强度设计值" + bf3_5 + "N/mm2,满足要求!";
                else
                    compare2_1 = "小梁的计算强度" + sum2σ + "大于小梁抗弯强度设计值" + bf3_5 + "N/mm2,满足要求!";

                a2 = 0.607 * sum2q1 * bf1_11 / 1000;
                b2 = sum2q1 * bf1_19 / 1000;
                sum2Vmax = a2 > b2 ? a2 : b2;
                if (Cb_BF_3XLCZ.SelectedIndex == 0)
                {
                    sum2τ = 3 * sum2Vmax * 1000 / (2 * bf3_3 * bf3_4);
                    sum2τ = Math.Round(sum2τ, 2);
                    str_xlcz = "τmax=3Vmax/(2bh0)=" + sum2τ + "N/mm2";
                }
                else
                {
                    sum2τ = sum2Vmax * 1000 * bf3_10 * 1000 / (bf3_8 * 10000 * 7.6);//小梁厚度=7.6
                    sum2τ = Math.Round(sum2τ, 2);
                    str_xlcz = "τ =VSo/Itw=" + sum2τ + "N/mm2";
                }
                if (sum2τ <= bf3_6)
                    compare2_2 = "小梁的计算强度" + sum2τ + "小于等于小梁抗剪强度设计值" + bf3_6 + "N/mm2,满足要求!";
                else
                    compare2_2 = "小梁的计算强度" + sum2τ + "大于小梁抗剪强度设计值" + bf3_6 + "N/mm2,不满足要求!";

                sum2ν1 = 0.632 * sum2q2 * bf1_11 * bf1_11 * bf1_11 * bf1_11 / (100 * bf3_7 * bf3_8);
                sum2ν = bf1_11 / 400;
                sum2ν1 = Math.Round(sum2ν1, 2);
                sum2ν = Math.Round(sum2ν, 2);
                if (sum2ν1 <= sum2ν)
                    compare2_3 = "小梁跨中的挠度" + sum2ν1 + "小于等于小梁跨中的最大允许挠度值" + sum2ν + "mm,满足要求!";
                else
                    compare2_3 = "小梁跨中的挠度" + sum2ν1 + "大于小梁跨中的最大允许挠度值" + sum2ν + "mm,不满足要求!";

                sum2ν2 = sum2q2 * bf1_19 * bf1_19 * bf1_19 * bf1_19 / (8 * bf3_7 * bf3_8);
                sum2ν_2 = bf1_19 / 400;
                sum2ν2 = Math.Round(sum2ν2, 2);
                sum2ν_2 = Math.Round(sum2ν_2, 2);
                if (sum2ν2 <= sum2ν_2)
                    compare2_4 = "小梁悬臂端的挠度" + sum2ν2 + "小于等于小梁悬臂端的最大允许挠度值" + sum2ν_2 + "mm,满足要求!";
                else
                    compare2_4 = "小梁悬臂端的挠度" + sum2ν2 + "大于小梁悬臂端的最大允许挠度值" + sum2ν_2 + "mm,不满足要求!";

                sum2q1 = Math.Round(sum2q1, 2);
                sum2q2 = Math.Round(sum2q2, 2);
                sum2Mmax = Math.Round(sum2Mmax, 2);
                sum2Vmax = Math.Round(sum2Vmax, 2);
                #endregion

                #region 三、主梁验算
                double sum3G2k, sum3G3k, sum3Gk, sum3q1, sum3q2, sum3q, sum3l, sum3M, sum3W, sum3σ, sum3qN, sum3v, sum3ν;
                string compare3_1="", compare3_2="";

                double[] zcjj = new double[] {  KJ_JL1.Value, KJ_JL2.Value};
                double min = 0;

                int i = Convert.ToInt32(KJ_LZGS.Value);
                if (i == 0)
                {
                    sum3l = 0;
                }
                else
                {
                    min = zcjj[0];
                    for (int j = 1; j < i; j++)
                    {
                        if (min > zcjj[j])
                        {
                            min = zcjj[j];
                        }
                    }
                    sum3l = min / 1000;
                }

                sum3G2k = bf8_5 * bf1_3 / 1000;
                sum3G3k = bf8_7 * bf1_3 / 1000;
                sum3Gk = bf8_2 + sum3G2k + sum3G3k;
                sum3q1 = 0.9 * (1.2 * sum3Gk + 1.4 * bf8_8) * 0.8;
                sum3q2 = 0.9 * (1.35 * sum3Gk + 1.4 * 0.7 * bf8_8) * 0.8;
                sum3q = sum3q1 > sum3q2 ? sum3q1 : sum3q2;
                sum3M = sum3q * sum3l * sum3l / 8;
                sum3W = bf4_9 * 1000;
                sum3σ = sum3M * 1000 / sum3W;
                sum3σ = Math.Round(sum3σ, 2);
                if (sum3σ > bf4_5)
                    compare3_1 = "主梁的计算强度" + sum3σ + "大于主梁抗弯强度设计值" + bf4_5 + "N/mm2,不满足要求!";
                else
                    compare3_1 = "主梁的计算强度" + sum3σ + "小于等于主梁抗弯强度设计值" + bf4_5 + "N/mm2,满足要求!";

                sum3qN = 0.8 * sum3Gk;
                sum3v = 5 * sum3qN * min * min * min * min / (384 * bf4_7 * bf4_8 * 10000);
                sum3ν = min / 400;
                sum3v = Math.Round(sum3v, 2);
                sum3ν = Math.Round(sum3ν, 2);
                if (sum3v > sum3ν)
                    compare3_2 = "主梁跨中的挠度" + sum3v + "大于主梁跨中的最大允许挠度值" + sum3ν + "mm,不满足要求!";
                else
                    compare3_2 = "主梁跨中的挠度" + sum3v + "小于等于主梁跨中的最大允许挠度值" + sum3ν + "mm,满足要求!";

                sum3G2k = Math.Round(sum3G2k, 2);
                sum3G3k = Math.Round(sum3G3k, 2);
                sum3Gk = Math.Round(sum3Gk, 2);
                sum3q1 = Math.Round(sum3q1, 2);
                sum3q2 = Math.Round(sum3q2, 2);
                sum3q = Math.Round(sum3q, 2);
                sum3M = Math.Round(sum3M, 2);
                sum3qN = Math.Round(sum3qN, 2);

                #endregion

                #region 四、立柱稳定性验算
                double sum4λ, sum4φ, sum4G1k, sum4G2k, sum4G3k, sum4Gk, sum4Qk, sum4ωk, sum4Mw, sum4Nw, sum4f;
                string compare4_1, compare4_2;

                sum4λ = bf1_6 / bf5_2;
                sum4λ = Math.Round(sum4λ, 2);
                if (sum4λ > 250)
                    compare4_1 = "立柱长细比" + sum4λ + "大于立柱最大允许长细比250mm,不满足要求!";
                else
                    compare4_1 = "立柱长细比" + sum4λ + "小于等于立柱最大允许长细比250mm,满足要求!";

                if (sum4λ > 250)
                {
                    sum4φ = 7320 / sum4λ / sum4λ;
                }
                else if (Math.Floor(sum4λ) == sum4λ)
                {
                    int sum4λy = Convert.ToInt32(sum4λ / 10);//第λy1行
                    int sum4λx = Convert.ToInt32(sum4λ % 10);// 第λx1列
                    sum4φ = λArray[sum4λy, sum4λx]; //λArray数组为全局变量,参见“表B.0.6轴心受压构件的稳定系数Φ(Q235钢)”
                }
                else
                {
                    double sum4λ_1, sum4λ_2, sum4φ1, sum4φ2;
                    sum4λ_1 = Math.Ceiling(sum4λ);//x1
                    sum4λ_2 = Math.Floor(sum4λ);//x0

                    int sum4λy1 = Convert.ToInt32(sum4λ_1 / 10);
                    int sum4λx1 = Convert.ToInt32(sum4λ_1 % 10);
                    sum4φ1 = λArray[sum4λy1, sum4λx1]; //y1

                    int sum4λy2 = Convert.ToInt32(sum4λ_2 / 10);
                    int sum4λx2 = Convert.ToInt32(sum4λ_2 % 10);
                    sum4φ2 = λArray[sum4λy2, sum4λx2]; //y0

                    sum4φ = (sum4λ - sum4λ_1) / (sum4λ_2 - sum4λ_1) * sum4φ2 + (sum4λ - sum4λ_2) / (sum4λ_1 - sum4λ_2) * sum4φ1;//拉格朗日插值
                }

                sum4G1k = bf8_4 * bf1_11 / 1000 * bf1_12 / 1000;
                sum4G2k = bf8_5 * bf1_4 / 1000 * bf1_3 / 1000 * bf1_11 / 1000;
                sum4G3k = bf8_6 * bf1_4 / 1000 * bf1_3 / 1000 * bf1_11 / 1000;
                sum4Gk = sum4G1k + sum4G2k + sum4G3k;
                sum4Qk = (bf8_8+bf8_9) * bf1_11 / 1000 * bf1_12 / 1000;
                sum4ωk = 0.7 * bf6_5 * bf6_6 * bf6_3;
                sum4Mw = 0.9 * 1.4 * sum4ωk * bf1_12 / 1000 * bf1_6 / 1000 * bf1_6 / 1000 / 10;
                sum4Nw = 1.2 * sum4Gk + 0.9 * 1.4 * sum4Qk + 0.9 * 1.4 * sum4Mw / (bf1_11 / 1000);
                sum4f = sum4Nw * 1000 / (sum4φ * bf5_4) + sum4Mw * 1000 / bf5_5;
                sum4f = Math.Round(sum4f, 2);
                if (sum4f > 205)
                    compare4_2 = "立柱抗压强度" + sum4f + "大于立柱抗压强度设计值205N/mm2,不满足要求!";
                else
                    compare4_2 = "立柱抗压强度" + sum4f + "小于等于立柱抗压强度设计值205N/mm2,不满足要求!";

                sum4G1k = Math.Round(sum4G1k, 2);
                sum4G2k = Math.Round(sum4G2k, 2);
                sum4G3k = Math.Round(sum4G3k, 2);
                sum4Gk = Math.Round(sum4Gk, 2);
                sum4Qk = Math.Round(sum4Qk, 2);
                sum4ωk = Math.Round(sum4ωk, 2);
                sum4Mw = Math.Round(sum4Mw, 2);
                sum4Nw = Math.Round(sum4Nw, 2);
                sum4φ = Math.Round(sum4φ, 2);

                #endregion

                #region 五、可调托座验算
                double sum5N;
                string compare5_1;

                sum5N = sum4Nw / bf7_1;
                sum5N = Math.Round(sum5N, 2);
                if (sum5N > bf7_2)
                    compare5_1 = "可调托座受力" + sum5N + "大于可调托座承载力容许值" + bf7_2 + "(kN),不满足要求!";
                else
                    compare5_1 = "可调托座受力" + sum5N + "小于等于可调托座承载力容许值" + bf7_2 + "(kN),满足要求!";
                #endregion

                #region 六、立柱地基基础验算
                double sum6p;
                string compare6_1;

                sum6p = sum4Nw / (bf7_6 * bf7_7 * bf7_1);
                sum6p = Math.Round(sum6p, 2);
                if (sum6p > bf7_5)
                    compare6_1 = "立柱底垫板的底面平均压力" + sum6p + "大于地基土承载力设计值" + bf7_5 + "N/mm2,不满足要求!";
                else
                    compare6_1 = "立柱底垫板的底面平均压力" + sum6p + "小于等于地基土承载力设计值" + bf7_5 + "N/mm2,满足要求!";
                #endregion

                obj = new object[] { ZCJJ, bf1_1, bf1_2, bf1_3, bf1_4, bf1_5, bf1_6, bf1_7, bf1_8, bf1_9, bf1_10, bf1_11, bf1_12, bf1_13, bf1_14, bf1_15,bf1_18,bf1_19,bf2_1,
            bf2_2,bf2_3,bf2_4,bf2_5,bf3_1,bf3_2,bf3_5,bf3_6,bf3_7,bf3_8,bf3_9,bf4_1,bf4_2,bf4_5,bf4_6,bf4_7,bf4_8,bf4_9,bf5_1,bf5_2,bf5_3,
            bf5_4,bf5_5,bf6_1,bf6_2,bf6_3,bf6_4,bf6_5,bf6_6,bf6_7,bf7_1,bf7_2,bf7_3,bf7_4,bf7_5,bf7_6,bf7_7,bf8_1,bf8_2,bf8_3,bf8_4,bf8_5,
            bf8_6,bf8_7,bf8_8,bf8_9,sum1I,sum1W,sum1h,sum1L,sum1q1,sum1q1J,sum1q1H,sum1q2,sum1Mmax,sum1σ,compare1_1,sum1vmax,sum1ν,compare1_2,
            sum1R1,sum1R2,sum1R3,sum1r1,sum1r2,sum1r3,sum2q1,sum2q2,sum2Mmax,sum2σ,compare2_1,sum2Vmax,str_xlcz,compare2_2,sum2ν1,sum2ν,
            compare2_3,sum2ν2,sum2ν_2,compare2_4,sum3G2k,sum3G3k,sum3Gk,sum3q1,sum3q2,sum3q,sum3l,sum3M,sum3W,sum3σ,compare3_1,sum3qN,
            sum3v,min,sum3ν,compare3_2,sum4λ,compare4_1,sum4φ,sum4G1k,sum4G2k,sum4G3k,sum4Gk,sum4Qk,sum4ωk,sum4Mw,sum4Nw,sum4f,compare4_2,
            sum5N,compare5_1,sum6p,compare6_1};

                foreach (Framework.Entity.Template template in templateList)
                {
                    if (itemtext == template.Title)
                    {
                        item = template;
                        break;
                    }
                }
                CreateModuleIntance(item, null, @class, obj);
                this.Close();
            }

            else if (CbxBeamFormType.SelectedIndex == 4)
            {

                 itemtext = "梁测模板";
                #region 参数赋值
                //构造+支撑参数
                double lca_2, lca_3, lca_4, lca_5, lca_7, lca_8, lca_9, lca_10, lca_12, lca_13, lca_14, lca_15;
                string lca_6="", lca_16="", lca_1="", lca_17="", lca_18="", lca_11="";
                lca_1 = lc_gzjgqk.Text;
                lca_2 = cl_gzjmg.Value;
                lca_3 = cl_gzjmk.Value;
                lca_4 = cl_gzkd.Value;
                lca_5 = cl_gzlbhd.Value;
                lca_6 = lc_zcxlbz.Text;
                lca_7 = lc_zcju1.Value;
                lca_8 = lc_zcju2.Value;
                lca_9 = lc_zcjl3.Value;
                lca_10 = doubleInput11.Value;
                lca_11 = comboBoxEx2.Text;
                lca_12 = doubleInput6.Value;
                lca_13 = doubleInput10.Value;
                lca_14 = doubleInput16.Value;
                lca_15 = doubleInput5.Value;
                lca_16 = lc_zcxs1.Text;
                lca_17 = lc_zcxs2.Text;
                lca_18 = lc_zcxs3.Text;
                //小梁参数
                double lcb_3, lcb_4, lcb_5, lcb_6, lcb_7, lcb_8, lcb_9;
                string lcb_1="", lcb_2="";
                lcb_1 = lc_xlca.Text;
                lcb_2 = lc_xljmlx.Text;
                lcb_3 = lc_xlfmk.Value;
                lcb_4 = lc_xlfmg.Value;
                lcb_5 = lc_xlf.Value;
                lcb_6 = lc_xlt.Value;
                lcb_7 = lc_xle.Value;
                lcb_8 = lc_xli.Value;
                lcb_9 = lc_xlw.Value;
                //主梁参数
                double lcc_3, lcc_4, lcc_5, lcc_6, lcc_7, lcc_8, lcc_9;
                string lcc_1="", lcc_2="";
                lcc_1 = lc_zlcz.Text;
                lcc_2 = lc_zljm.Text;
                lcc_3 = lc_zlfmk.Value;
                lcc_4 = lc_zlfmg.Value;
                lcc_5 = lc_zlf.Value;
                lcc_6 = lc_zlt.Value;
                lcc_7 = lc_zle.Value;
                lcc_8 = lc_zlci.Value;
                lcc_9 = lc_zlw.Value;
                //面板+对拉螺栓+荷载
                double lcd_2, lcd_3, lcd_4, lcd_6, lcd_7, lcd_9, lcd_10, lcd_11, lcd_12, lcd_13, lcd_5;
                string lcd_1="", lcd_8="";
                double[] p2 = new double[] { 0.85, 1, 1.15 };
                double[] p1 = new double[] { 1, 1.2 };
                lcd_1 = lc_mblx.Text;
                lcd_2 = lc_mbhd.Value;
                lcd_3 = lc_mbf.Value;
                lcd_4 = lc_mbe.Value;
                int temp = cl_hzp2.SelectedIndex;
                lcd_5 = p2[cl_hzp2.SelectedIndex];
                lcd_6 = cl_hzh.Value;
                lcd_7 = cl_hzq2k.Value;
                lcd_8 = cl_dllslx.Text;
                lcd_9 = cl_dllsn.Value;
                lcd_10 = cl_hzr.Value;
                lcd_11 = cl_hzv.Value;
                lcd_12 = cl_hzt0.Value;
                lcd_13 = p1[cl_hzp1.SelectedIndex];
                #endregion
                #region 一、荷载计算
                double sum1g4k, sum1ss, sum1sz;
                //新浇混凝土对模板的侧压力标准值G4k=min[0.22γct0β1β2v1/2,γcH]=min[0.22×γc×t0×β1×β2×v1/2,γc×H]=min[0.22×24×4×1×1.15×2.51/2,24×1.6]=min[38.4,38.4]=38.4kN/m2
                sum1g4k = Math.Min(0.22 * lcd_10 * lcd_12 * lcd_13 * lcd_5 * Math.Sqrt(lcd_11), lcd_10 * lcc_6);
                //承载能力极限状态设计值S承=0.9max[1.2×G4k+1.4×Q2k,1.35×G4k+1.4×0.7×Q2k]
                sum1ss = 0.9 * Math.Max(1.2 * sum1g4k + 1.4 * lcd_7, 1.35 * sum1g4k + 1.4 * 0.7 * lcd_7);
                sum1sz = sum1g4k;
                sum1g4k = Math.Round(sum1g4k, 2);
                sum1ss = Math.Round(sum1ss, 2);
                sum1sz = Math.Round(sum1sz, 2);
                #endregion
                #region 二、面板计算
                double b = 1000, h = 15, sum2w, sum2i, sum2q1, sum2q1j, sum2q1h, sum2m, sum26, sum2q, sum2vmax, sum2v, sum2rmax, sum2r1max;
                string compare_mb1, compare_mb2;
                //W=bh2/6
                sum2w = b * h * h / 6;
                //I=bh3/12
                sum2i = b * h * h * h / 12;
                // q1=bS承
                sum2q1 = b * sum1ss;
                // q1静=0.9×1.35×G4k×b=@sum2q1j@kN/m
                sum2q1j = 0.9 * 1.35 * sum1g4k * b;
                // q1活=0.9×1.4×0.7×Q2k×b=@sum2q1h@kN/m
                sum2q1h = 0.9 * 1.4 * 0.7 * lcd_7 * b;
                //Mmax==max[0.077×q1静×小梁间距2+0.1×q1活×小梁间距2,-0.107×q1静×小梁间距2+0.121×q1活×小梁间距2,-0.071×q1静×小梁间距2-0.107×q1活×小梁间距2]=@sum2m@kN•m
                sum2m = Math.Max(0.077 * sum2q1j * lca_13 * lca_13 + 0.1 * sum2q1h * lca_13 * lca_13, Math.Max((-0.107) * sum2q1j * lca_13 * lca_13 + 0.121 * sum2q1h * lca_13 * lca_13, -0.071 * sum2q1j * lca_13 * lca_13 *(- 0.107) * sum2q1h * lca_13 * lca_13));
                //σ=Mmax/W=@sum26@N/mm2
                sum26 = sum2m / sum2w;
                sum2m = Math.Round(sum2m, 2);
                sum26 = Math.Round(sum26, 2);
                if (sum26 <= lcd_3)
                    compare_mb1 = "面板的计算强度" + sum26 + "小于等于面板抗弯强度设计值" + lcd_3 + "N/mm2,满足要求!";
                else
                    compare_mb1 = "面板的计算强度" + sum26 + "大于面板抗弯强度设计值" + lcd_3 + "N/mm2,不满足要求!";
                //q=bS正
                sum2q = b * sum1sz;
                //νmax=0.632qL4/(100EI)= 0.632×q×(小梁间距×1000) 4/(100×E×I)=0.632×38.4×(0.18×1000) 4/(100×10000×281250)=0.09mm
                sum2vmax = 0.632 * sum2q * (lca_13 * 1000) * (lca_13 * 1000) * (lca_13 * 1000) * (lca_13 * 1000) / (100 * 10000 * sum2i);
                //[ν]=L/0.4=L/0.4=0.18/0.4=0.45mm
                sum2v = (lca_13 * 1000) / 0.4;
                sum2v = Math.Round(sum2v, 2);
                sum2vmax = Math.Round(sum2vmax, 2);
                //面板的挠度ν小于面板最大允许挠度值[ν]mm,满足要求!
                if (sum2v <= sum2vmax)
                    compare_mb2 = "面板的挠度" + sum2v + "小于等于面板最大允许挠度值" + sum2vmax + "mm,满足要求!";
                else
                    compare_mb2 = "面板的挠度" + sum2v + "小于等于面板最大允许挠度值" + sum2vmax + "mm,不满足要求!";
                //Rmax=1.143×q1静×l左+1.223×q1活×l左=1.143×q1静×小梁间距+1.223×q1活×小梁间距=1.143×46.66×0.18+1.223×3.53×0.18=10.45kN
                sum2rmax = 1.143 * sum2q1j * lca_13 + 1.223 * sum2q1h * lca_13;
                //R'max=1.143×l左×G4k=1.143×小梁间距×G4k=1.143×0.18×38.4=7.96kN
                sum2r1max = 1.143 * lca_13 * sum1g4k;
                sum2w = Math.Round(sum2w, 2);
                sum2i = Math.Round(sum2i, 2);
                sum2q1 = Math.Round(sum2q1, 2);
                sum2q1j = Math.Round(sum2q1j, 2);
                sum2q1h = Math.Round(sum2q1h,2);
                sum2q = Math.Round(sum2q, 2);
                sum2rmax = Math.Round(sum2rmax, 2);
                sum2r1max = Math.Round(sum2r1max, 2);
                #endregion
                #region 三、小梁验算
                double sum3q, sum3mmax, sum36, sum3vmax, sum3t, sum3v1max, sum31v1, sum3v2max, sum31v12, sum3rmax, sum3r1max;
                string compare_xl1, compare_xl2, compare_xl3, compare_xl4, str_3t;
                //q=Rmax = Rmax =10.45kN/m
                sum3q = sum2rmax;
                // Mmax=max[0.1×q×l2,0.5×q×l12]= max[0.1×q×主梁间距2,0.5×q×小梁最大悬挑长度2]
                sum3mmax = Math.Max(0.1 * sum3q * lca_14 * lca_14, 0.5 * sum3q * lca_10 * lca_10);
                sum3mmax = Math.Round(sum3mmax, 2);
                //σ=Mmax/W=Mmax×106/W=0.47×103/64=7.35N/mm2
                sum36 = sum3mmax / lca_9;
                sum36 = Math.Round(sum36, 2);
                //小梁的计算强度σ小于小梁抗弯强度设计值小梁抗弯强度设计值N/mm2,满足要求!
                if (sum36 <= lcb_5)
                    compare_xl1 = "小梁的计算强度" + sum36 + "小于等于小梁抗弯强度设计值" + lcb_5 + "N/mm2,满足要求!";
                else
                    compare_xl1 = "小梁的计算强度" + sum36 + "小于等于小梁抗弯强度设计值" + lcb_5 + "N/mm2,不满足要求!";
                //Vmax=max[0.6×q×l,q×l1] =max[0.6×q×主梁间距,q×小梁最大悬挑长度]
                sum3vmax = Math.Max(0.6 * sum3q * lca_14, sum3q * lca_10);
                sum3vmax = Math.Round(sum3vmax, 2);
                if (lc_xlca.SelectedIndex == 0)//小梁选择 方木时
                {   //τmax=3Vmax/(2bh0)= 3小梁的最大剪力/(2方木宽×方木高)
                    sum3t = 3 * sum3vmax / (2 * lcb_3 * lcb_4);
                    sum3t = Math.Round(sum3t, 2);
                    str_3t = "τmax=3Vmax/(2bh0)=" + sum3t;
                }
                else //小梁选择 工字钢、槽钢、方钢管、钢管时
                {  //τ =VS0/Itw=小梁的最大剪力×小梁截面面积矩/(小梁截面惯性矩×小梁厚度)
                    sum3t = 2.858 * 1000 * 28.52 * 1000 / 245 / 10000 / 7.6;
                    sum3t = Math.Round(sum3t, 2);
                    str_3t = "τ=VS0/Itw=" + sum3t;
                }
                //小梁的计算强度@sum3t@小于小梁抗剪强度设计值@lcb_6@N/mm2,满足要求!
                if (sum3t <= lcb_6)
                    compare_xl2 = "小梁的计算强度" + sum3t + "小于等于小梁抗剪强度设计值" + lcb_6 + "N/mm2,满足要求!";
                else
                    compare_xl2 = "小梁的计算强度" + sum3t + "小于等于小梁抗剪强度设计值" + lcb_6 + "N/mm2,不满足要求!";
                //q=R'max=R'max
                sum3q = sum2r1max;
                //ν1max=0.677qL4/(100EI)= 0.677×q×(主梁间距×1000)4/(100×E×I)
                sum3v1max = 0.677 * sum3q * (lca_14 * 1000) * (lca_14 * 1000) * (lca_14 * 1000) * (lca_14 * 1000) / (100 * lcb_7 * lcb_8);
                sum3v1max = Math.Round(sum3v1max, 2);
                //[ν]=l/0.4=@lca_14@/0.4=0.6/0.4=@sum[v]@mm;
                sum31v1 = lca_14 / 0.4;
                sum31v1 = Math.Round(sum31v1, 2);
                //小梁跨中的挠度ν小于小梁跨中的最大允许挠度值[ν]mm,满足要求!
                if (sum31v1 <= sum3v1max)
                    compare_xl3 = "小梁跨中的挠度" + sum31v1 + "小于等于小梁跨中的最大允许挠度值" + sum3v1max + "mm,满足要求!";
                else
                    compare_xl3 = "小梁跨中的挠度" + sum31v1 + "小于等于小梁跨中的最大允许挠度值" + sum3v1max + "mm,不满足要求!";
                //ν2max=qL4/(8EI)= @sum3q@×(@lca_10@×10004)/(8×@lcb_7@×@lcb_8@)=@sum3v2max@mm
                sum3v2max = sum3q * (lca_10 * 1000 * 1000 * 1000 * 1000) / (8 * lcb_8 * lcb_7);
                sum3v2max = Math.Round(sum3v2max, 2);
                //[ν]=l/0.4=@lca_10@/0.4=0.3/0.4=@sum31v12@mm;
                sum31v12 = lca_10 / 0.4;
                sum31v12 = Math.Round(sum31v12, 2);
                //小梁跨中的挠度ν小于小梁跨中的最大允许挠度值[ν]mm,满足要求!
                if (sum31v12 <= sum3v2max)
                    compare_xl4 = "小梁跨中的挠度" + sum31v12 + "小于等于小梁跨中的最大允许挠度值" + sum3v2max + "mm,满足要求!";
                else
                    compare_xl4 = "小梁跨中的挠度" + sum31v12 + "小于等于小梁跨中的最大允许挠度值" + sum3v2max + "mm,不满足要求!";
                //Rmax=max[1.1×10.45×0.6,0.4×10.45×0.6+10.45×0.3]=6.9kN
                sum3rmax = 6.9;
                //R'max=max[1.1×7.96×0.6,0.4×7.96×0.6+7.96×0.3]=5.25kN
                sum3r1max = 5.25;

                #endregion
                #region 四、主梁验算
                double sum4i, sum4q, sum4m, sum4w, sum46, sum4f, sum4qn, sum4v, sum41v1;
                string compare_zl1, compare_zl2;
                //l= min((@lca_8@-@lca_7@), (@lca_9@-@lca_8@))/1000 =@sum3i@
                sum4i = Math.Min((lca_8 - lca_7), (lca_9 - lca_8)) / 1000;
                sum4i = Math.Round(sum4i, 2);
                //q= @sum1ss@ /@lca_15@=@sum4q@ kN/m2
                sum4q = sum1ss / lca_15;
                sum4q = Math.Round(sum4q, 2);
                //M=ql2/8= @sum4q@×@sum4i@2/8=@sum4m@ kN/m。
                sum4m = sum4q * sum4i * sum4i / 8;
                sum4m = Math.Round(sum4m, 2);
                //W=@lcc_9@×103
                sum4w = lcc_9 * 1000;
                sum4w = Math.Round(sum4w, 2);
                //σ=Mmax/W=@sum46@ N/mm2
                sum46 = sum3mmax / sum4w;
                sum46 = Math.Round(sum46, 2);
                //[f]= @lcc_5@=@sum4f@N/mm2;
                sum4f = lcc_5;
                sum4f = Math.Round(sum4f, 2);
                // 主梁的计算强度@sum46@小于主梁抗弯强度设计值@sum4f@N/mm2,满足要求!
                if (sum46 <= sum4f)
                    compare_zl1 = "主梁的计算强度" + sum46 + "小于等于主梁抗弯强度设计值" + sum4f + "N/mm2,满足要求!";
                else
                    compare_zl1 = "主梁的计算强度" + sum46 + "小于等于主梁抗弯强度设计值" + sum4f + "N/mm2,不满足要求!";
                //q挠=0.8×@sum4q@=@sum4qn@ N/mm
                sum4qn = 0.8 * sum4q;
                sum4qn = Math.Round(sum4qn, 2);
                //v=5 q挠l4/(384EI)= 5 @sum4qn@ (@sum4i@×1000) 4/(384@lcc_7@@sum4i@)= @sum4v@mm
                sum4v = 5 * sum4qn * (sum4i * 1000) * (sum4i * 1000) * (sum4i * 1000) * (sum4i * 1000) / (384 * lcc_7 * sum4i);
                sum4v = Math.Round(sum4v, 2);
                // [ν]=l/0.4=@sum4i@/0.4= @sum41v1@mm
                sum41v1 = sum4i / 0.4;
                sum41v1 = Math.Round(sum41v1, 2);
                //主梁跨中的挠度@sum4v@小于主梁跨中的最大允许挠度值@sum41v1@mm,满足要求!
                if (sum4v <= sum41v1)
                    compare_zl2 = "主梁跨中的挠度" + sum4v + "小于等于主梁跨中的最大允许挠度值" + sum41v1 + "mm,满足要求!";
                else
                    compare_zl2 = "主梁跨中的挠度" + sum4v + "小于等于主梁跨中的最大允许挠度值" + sum41v1 + "mm,不满足要求!";
                #endregion

                #region 五、对拉螺栓验算
                double sum5n, sum5ntb;
                string compare_dlls1;
                //N=0.95×Rmax×2=0.95×@sum3rmax@×2=@sum5n@kN
                sum5n = 0.95 * sum3rmax * 2;
                sum5n = Math.Round(sum5n, 2);
                //Ntb=@lcd_9@Ntb kN
                sum5ntb = lcd_9;
                sum5ntb=Math .Round (sum5ntb ,2);
                //对拉螺栓受力@sum5n@ kN小于轴向拉力设计值@lcd_9@ kN,满足要求!
                if (sum5ntb <= lcd_9)
                    compare_dlls1 = "对拉螺栓受力" + sum5n + "小于等于轴向拉力设计值" + lcd_9 + "kN,满足要求!";
                else
                    compare_dlls1 = "对拉螺栓受力" + sum5n + "小于等于轴向拉力设计值" + lcd_9 + "kN,不满足要求!";

                #endregion
                obj = new object[] { lca_1, lca_2, lca_3, lca_4, lca_5, lca_6, lca_7, lca_8, lca_9, lca_10, lca_11, lca_12, lca_13, lca_14, lca_15, lca_16, lca_17, lca_18, lcb_1, lcb_2, lcb_3, lcb_4,
                    lcb_5, lcb_6, lcb_7, lcb_8, lcb_9, lcc_1, lcc_2, lcc_3, lcc_4, lcc_5, lcc_6, lcc_7, lcc_8, lcc_9, lcd_1, lcd_2, lcd_3, lcd_4, lcd_5, lcd_6, lcd_7,
                    lcd_8, lcd_9, lcd_10, lcd_11, lcd_12, lcd_13, sum1g4k, sum1ss, sum1sz, sum2w, sum2i, sum2q1, sum2q1j, sum2q1h, sum2m, sum26, sum2q, sum2vmax, sum2v, sum2rmax, sum2r1max
                ,compare_mb1, compare_mb2,sum3q,sum3mmax,sum36,sum3vmax,sum3t,sum3v1max,sum31v1,sum3v2max,sum31v12,sum3rmax,sum3r1max,compare_xl1, compare_xl2, compare_xl3, compare_xl4,
                sum4i,sum4q,sum4m,sum4w,sum46,sum4f,sum4qn,sum4v,sum41v1,compare_zl1, compare_zl2,sum5n,sum5ntb,compare_dlls1,str_3t};

                foreach (Framework.Entity.Template template in templateList)
                {
                    if (itemtext == template.Title)
                    {
                        item = template;
                        break;
                    }
                }
                CreateModuleIntance(item, null, @class, obj);
                this.Close();
            }
        }
Пример #51
0
        private void CreateModule(Framework.Entity.Template template, System.Collections.ArrayList array, object @class, object[] data)
        {
            path = WinWordControlEx.RandomPath;

            WinWordControlEx.CreateTempFile(template.Content, path);

            if (@class.GetType().Equals(new Framework.Model.InsertTextPileProject().GetType()))
            {
                WinWordControlEx.LoadWord(path);

                #region                                                                  //选顶某“桩基工程”后,与其对应的内容自动生成在文档中的相应位置。
                string NewWord = "$1$";
                for (int i = 0; i < System.Convert.ToInt16(data[7].ToString()) - 1; i++) //data[7] = count,通过data[7].ToString()确定选择的工程的数目,从而确定需要几个“$1$”符
                {
                    NewWord += "\n$1$";                                                  //每添加一种工程,模板文档中就多添加一个“$1$”符号
                }
                WinWordControlEx.Replace("$1$", NewWord);                                //调用的是Replace(string strOldText,string strNewText, string path)

                for (int i = 0; i < System.Convert.ToInt16(data[7].ToString()); i++)     //用文字图标等内容,把文档中的“$1$”替换掉
                {
                    tempInsertText = contentService.GetTemplateByTitle(data[i].ToString());
                    WinWordControlEx.Replace(tempInsertText.Content, "$1$");//调用的是Replace(byte[] buffByte, string strOldText, string path)
                }
                #endregion
            }
            else if (@class.GetType().Equals(new Framework.Model.InsertTextWinterMeasure().GetType()))
            {
                WinWordControlEx.LoadWord(path);

                #region                                                                  //选出“工程”后,与其对应的内容自动生成在文档中的相应位置。
                string NewWord = "$1$";
                for (int i = 0; i < System.Convert.ToInt16(data[7].ToString()) - 1; i++) //data[7] = count,通过data[7].ToString()确定选择的工程的数目,从而确定需要几个“$1$”符
                {
                    NewWord += "\n$1$";                                                  //每添加一种工程,模板文档中就多添加一个“$1$”符号
                }
                WinWordControlEx.Replace("$1$", NewWord, path);                          //调用的是Replace(string strOldText,string strNewText, string path)

                for (int i = 0; i < System.Convert.ToInt16(data[7].ToString()); i++)     //用文字图标等内容,把文档中的“$1$”替换掉
                {
                    tempInsertText = contentService.GetTemplateByTitle(data[i].ToString());
                    WinWordControlEx.Replace(tempInsertText.Content, "$1$");//调用的是Replace(byte[] buffByte, string strOldText, string path)
                }
                #endregion
            }
            else if (@class.GetType().Equals(new Framework.Model.InsertTextWinterMaintain().GetType()))
            {
                WinWordControlEx.LoadWord(path);
                #region                                                                  //选出“工程”后,与其对应的内容自动生成在文档中的相应位置。
                string NewWord = "$1$";
                for (int i = 0; i < System.Convert.ToInt16(data[2].ToString()) - 1; i++) //data[3] = count,通过data[7].ToString()确定选择的工程的数目,从而确定需要几个“$1$”符
                {
                    NewWord += "\n$1$";                                                  //每添加一种工程,模板文档中就多添加一个“$1$”符号
                }
                WinWordControlEx.Replace("$1$", NewWord, path);                          //调用的是Replace(string strOldText,string strNewText, string path)

                for (int i = 0; i < System.Convert.ToInt16(data[2].ToString()); i++)     //用文字图标等内容,把文档中的“$1$”替换掉
                {
                    tempInsertText = contentService.GetTemplateByTitle(data[i].ToString());
                    WinWordControlEx.Replace(tempInsertText.Content, "$1$");//调用的是Replace(byte[] buffByte, string strOldText, string path)
                }
                #endregion
            }
            else if (@class.GetType().Equals(new Framework.Model.InsertTextRoof().GetType()))
            {
                #region                                                                  //确定有多少出要替换
                string NewWord = "$1$";
                for (int i = 0; i < System.Convert.ToInt16(data[8].ToString()) - 1; i++) //data[8] = count,通过data[8].ToString()确定选择的工程的数目,从而确定需要几个“$1$”符
                {
                    NewWord += "\n$1$";                                                  //每添加一种工程,模板文档中就多添加一个“$1$”符号
                }
                WinWordControlEx.Replace("$1$", NewWord, path);                          //调用的是Replace(string strOldText,string strNewText, string path)

                NewWord = "$2$";
                for (int i = 0; i < System.Convert.ToInt16(data[9].ToString()) - 1; i++)
                {
                    NewWord += "\n$2$";
                }
                WinWordControlEx.Replace("$2$", NewWord, path);

                NewWord = "$3$";
                for (int i = 0; i < System.Convert.ToInt16(data[9].ToString()) - 1; i++)
                {
                    NewWord += "\n$3$";
                }
                WinWordControlEx.Replace("$3$", NewWord, path);
                #endregion

                #region//替换文字
                for (int i = 0; i < System.Convert.ToInt16(data[8].ToString()); i++)
                {
                    tempInsertText = contentService.GetTemplateByTitle(data[i].ToString());
                    WinWordControlEx.Replace(tempInsertText.Content, "$1$");//调用的是Replace(byte[] buffByte, string strOldText, string path)
                }

                for (int i = 0; i < System.Convert.ToInt16(data[9].ToString()); i++)
                {
                    tempInsertText = contentService.GetTemplateByTitle(data[i + 4].ToString());
                    WinWordControlEx.Replace(tempInsertText.Content, "$2$");
                }
                for (int i = 0; i < System.Convert.ToInt16(data[10].ToString()); i++)
                {
                    tempInsertText = contentService.GetTemplateByTitle(data[i + 6].ToString());
                    WinWordControlEx.Replace(tempInsertText.Content, "$3$");
                }
                #endregion

                WinWordControlEx.LoadWord(path);
            }
        }
        private void Btn_YLSubmit_Click(object sender, EventArgs e)
        {
            Framework.Entity.Template item = new Framework.Entity.Template();
            string itemtext = "";

            object[] obj = new object[] { };
            #region 单双排脚手架用料计算
            if (CbxScaffoldType.SelectedIndex == 0 | CbxScaffoldType.SelectedIndex == 1)
            {
                #region 单双排脚手架用料计算涉及的参数定义
                double Ly1_1, Ly1_2, Ly1_3, Ly1_4, Ly1_5, Ly1_6, Ly1_7, Ly1_9, Ly1_10, Ly1_11, Ly1_12;
                double LySum1 = 0, LySum2 = 0, LySum3 = 0, LySum4 = 0, LySum5 = 0, LySum6 = 0, LySum7 = 0, LySum8 = 0, LySum9 = 0;
                string Ly1_8;
                Ly1_1  = DbInput_MaterialDSGD.Value;                                //脚手架搭设高度
                Ly1_2  = DbInput_MaterialDSCD.Value;                                //脚手架搭设长度
                Ly1_3  = DbInput_MaterialLGZJ.Value;                                //立杆纵距la
                Ly1_4  = DbInput_MaterialLGHJ.Value;                                //立杆横距lb
                Ly1_5  = DbInput_MaterialBJ.Value;                                  //步距h
                Ly1_6  = DbInput_MaterialLQJL.Value;                                //脚手架内排的离墙距离
                Ly1_7  = System.Convert.ToInt16(Tb_MaterialWCDHGQZ.Text);           //外侧大横杆间距取值
                Ly1_8  = Cb_MaterialJDCSZ.Text;                                     //剪刀撑设置
                Ly1_9  = System.Convert.ToDouble(IntInput_MaterialJDCKYBJ.Value);   //剪刀撑跨越步距数
                Ly1_10 = System.Convert.ToDouble(IntInput_MaterialJDCKYLGZJ.Value); //剪刀撑跨越立杆纵距数
                Ly1_11 = System.Convert.ToDouble(IntInput_MaterialJDCJGLGZJ.Value); //剪刀撑间隔立杆纵距数
                Ly1_12 = DBIput_MaterialCLYLXS.Value;                               //材料用量系数
                #endregion
                if (CbxScaffoldType.SelectedIndex == 0)                             //选择双排脚手架用料计算
                {
                    itemtext = "双排脚手架用料计算";
                    #region                                              // 双排脚手架用料计算过程:
                    LySum1 = Ly1_12 * Ly1_2 / Ly1_3 * 2 * Ly1_1;         //不同于单排脚手架
                    LySum2 = Ly1_12 * Ly1_1 / Ly1_5 * 2 * Ly1_7 * Ly1_2; //不同于单排脚手架
                    LySum3 = Ly1_12 * Ly1_1 / Ly1_5 * Ly1_2 / Ly1_3 * (Ly1_4 + Ly1_6);
                    LySum4 = Ly1_12 * (Math.Pow((Ly1_10 * Ly1_10 + Ly1_9 * Ly1_9), 0.5) + 1) * Ly1_1 / Ly1_9 * Ly1_2 / Ly1_10;
                    LySum5 = Ly1_12 * (Ly1_1 / Ly1_5 * Ly1_2 / Ly1_3 * 2 + LySum2 / Ly1_3);//不同于单排脚手架
                    LySum6 = Ly1_12 * Ly1_1 / Ly1_9 * Ly1_2 / Ly1_10 * 14;
                    LySum7 = Ly1_12 * (LySum1 + LySum2) / 5;
                    LySum8 = LySum1 + LySum2 + LySum3 + LySum4;
                    LySum9 = LySum8 * 3.97 / 1000;
                    #endregion
                }
                else if (CbxScaffoldType.SelectedIndex == 1) //选择单排脚手架用料计算
                {
                    itemtext = "单排脚手架用料计算";
                    #region                                          // 单排脚手架用料计算过程:
                    LySum1 = Ly1_12 * Ly1_2 / Ly1_3 * Ly1_1;         //不同于双排脚手架
                    LySum2 = Ly1_12 * Ly1_1 / Ly1_5 * Ly1_7 * Ly1_2; //不同于双排脚手架
                    LySum3 = Ly1_12 * Ly1_1 / Ly1_5 * Ly1_2 / Ly1_3 * (Ly1_4 + Ly1_6);
                    LySum4 = Ly1_12 * (Math.Pow((Ly1_10 * Ly1_10 + Ly1_9 * Ly1_9), 0.5) + 1) * Ly1_1 / Ly1_9 * Ly1_2 / Ly1_10;
                    LySum5 = Ly1_12 * (Ly1_1 / Ly1_5 * Ly1_2 / Ly1_3 + LySum2 / Ly1_3);//不同于双排脚手架
                    LySum6 = Ly1_12 * Ly1_1 / Ly1_9 * Ly1_2 / Ly1_10 * 14;
                    LySum7 = Ly1_12 * (LySum1 + LySum2) / 5;
                    LySum8 = LySum1 + LySum2 + LySum3 + LySum4;
                    LySum9 = LySum8 * 3.97 / 1000;
                    #endregion
                }
                LySum1 = Math.Round(LySum1, 0);
                LySum2 = Math.Round(LySum2, 0);
                LySum3 = Math.Round(LySum3, 0);
                LySum4 = Math.Round(LySum4, 0);
                LySum5 = Math.Round(LySum5, 0);
                LySum6 = Math.Round(LySum6, 0);
                LySum7 = Math.Round(LySum7, 0);
                LySum8 = Math.Round(LySum8, 0);
                LySum9 = Math.Round(LySum9, 0);
                obj    = new object[] { Ly1_1, Ly1_2, Ly1_3, Ly1_4, Ly1_5, Ly1_6, Ly1_7, Ly1_8, IntInput_MaterialJDCKYBJ.Value, IntInput_MaterialJDCKYLGZJ.Value, IntInput_MaterialJDCJGLGZJ.Value, Ly1_12,
                                        LySum1, LySum2, LySum3, LySum4, LySum5, LySum6, LySum7, LySum8, LySum9 };
            }
            #endregion
            else if (CbxScaffoldType.SelectedIndex == 2) //选择碗扣式脚手架用料计算
            {
                itemtext = "碗扣式脚手架用料计算";
                #region 碗扣式脚手架用料计算设计的参数定义
                double Ly2_1, Ly2_2, Ly2_3, Ly2_4, Ly2_5, Ly2_6;
                string Ly2_7, Ly2_8, Ly2_9, Ly2_10, Ly2_11;
                double Ly2Sum1 = 0, Ly2Sum2 = 0, Ly2Sum3 = 0, Ly2Sum4 = 0, Ly2Sum5 = 0, Ly2Sum6 = 0, Ly2Sum7 = 0, Ly2Sum8 = 0, Ly2Sum9 = 0, Ly2Sum10 = 0, Ly2Sum11 = 0, Ly2Sum12 = 0;
                Ly2_1 = DbInput_Item2GD.Value;                     //脚手架搭设高度
                Ly2_2 = DbInput_Item2CD.Value;                     //脚手架搭设长度
                Ly2_3 = DbInput_Item2BJ.Value;                     //步距
                Ly2_4 = System.Convert.ToDouble(Tb_Item2BS.Text);  //脚手架搭设步数
                Ly2_5 = System.Convert.ToDouble(Cbx_Item2ZJ.Text); //立杆纵距
                double[] Gkzg1 = new double[] { 0.0132, 0.0247, 0.0363, 0.0478, 0.0593, 0.0708 };
                double   Gkzg  = Gkzg1[Cbx_Item2ZJ.SelectedIndex];
                Ly2_6 = System.Convert.ToDouble(Cbx_Item2HJ.Text);                                //立杆横距
                double[] Gkhg1 = new double[] { 0.0132, 0.0247, 0.0363, 0.0478, 0.0593, 0.0708 }; //立杆横距
                double   Gkhg  = Gkhg1[Cbx_Item2HJ.SelectedIndex];

                double[] Gkjhg1 = new double[] { 0.0437, 0.0552, 0.0685, 0.0816 };//间横杆钢管类型
                double   Gkjhg  = Gkjhg1[Cbx_Item2JHG.SelectedIndex];

                Ly2_7 = Cbx_Item2LGG.Text;//立杆钢管类型
                double[] Gkl1 = new double[] { 0.0705, 0.1019, 0.1334, 0.1648 };
                double   Gkl  = Gkl1[Cbx_Item2LGG.SelectedIndex];
                double[] Gkl2 = new double[] { 1.2, 1.8, 2.4, 3.0 };
                double   Gkl3 = Gkl1[Cbx_Item2LGG.SelectedIndex];
                Ly2_8 = Cbx_Item2WXG.Text;//外斜杆钢管类型
                double[] Gkwg1 = new double[] { 0.0633, 0.0703, 0.0866, 0.0930, 0.1004 };
                double   Gkwg  = Gkwg1[Cbx_Item2WXG.SelectedIndex];
                Ly2_9 = Cbx_Item2SPX.Text;//水平斜杆钢管类型
                double[] Gksg1 = new double[] { 0.0589, 0.0676, 0.0873 };
                double   Gksg  = Gksg1[Cbx_Item2SPX.SelectedIndex];
                Ly2_10 = Cbx_Item2LDX.Text;//廊道斜杆钢管类型
                double[] Gklg1 = new double[] { 0.0633, 0.0703, 0.0866, 0.0930, 0.1004 };
                double   Gklg  = Gklg1[Cbx_Item2LDX.SelectedIndex];
                Ly2_11 = Cbx_Item2LGD.Text;//立杆底座类型
                double[] Gkdz1 = new double[] { 0.0582, 0.0712, 0.085 };
                double   Gkdz = Gkdz1[Cbx_Item2LDX.SelectedIndex];
                double   Ly2_12, Ly2_13, Ly2_14, Ly2_15, Ly2_16, Ly2_17, Ly2_18, Ly2_19, Ly2_20;
                Ly2_12 = System.Convert.ToDouble(Cbx_Item2DKJ.Text);
                Ly2_13 = System.Convert.ToDouble(Cbx_Item2WXGBZ.Text);
                Ly2_14 = IntInput_Item2SPX.Value;
                Ly2_15 = IntInput_Item2LDX.Value;
                Ly2_16 = DbInput_Item2H1.Value;
                Ly2_17 = DbInput_Item2L1.Value;
                Ly2_18 = DbInput_Item2L0.Value;
                Ly2_19 = IntInput_Item2CS.Value;
                Ly2_20 = DbInput_Item2XS.Value;
                #endregion
                Ly2Sum1  = Ly2_20 * (Ly2_2 / Ly2_5 + 1) * 2 * Ly2_1 / Gkl3 * Gkl / 10;
                Ly2Sum2  = Ly2_20 * 2 * (Ly2_4 + Ly2_20) * Ly2_2 / Ly2_5 * Gkzg / 10;
                Ly2Sum3  = Ly2_20 * (Ly2_2 / Ly2_5 + 1) * Ly2_4 * Gkhg / 10;
                Ly2Sum4  = Ly2_20 * Ly2_2 / Ly2_5 * Ly2_12 * Ly2_4 * Gkjhg / 10;
                Ly2Sum5  = Ly2_20 * Ly2_2 / Ly2_5 / Ly2_13 * Ly2_4 * Gkwg / 10;
                Ly2Sum6  = Ly2_20 * Ly2_2 / Ly2_5 / Ly2_14 * Ly2_4 * Gksg / 10;
                Ly2Sum7  = Ly2_20 * Ly2_2 / Ly2_5 / Ly2_15 * Ly2_4 * Gklg / 10;
                Ly2Sum8  = Ly2_20 * (Ly2_2 / Ly2_5 + 1) * 2 * Gkdz / 10;
                Ly2Sum9  = Ly2_20 * Ly2_2 * Ly2_1 / Ly2_16 / Ly2_17 * Ly2_18 * 3.97 / 1000;
                Ly2Sum10 = Ly2_20 * Ly2_2 * Ly2_5 * Ly2_19;
                Ly2Sum11 = Ly2_20 * 2 * 0.18 * Ly2_2 * Ly2_19;
                Ly2Sum12 = Ly2_20 * Ly2_2 * Ly2_1;

                obj = new object[] { Ly2_1, Ly2_2, Ly2_3, Ly2_4, Ly2_5, Gkzg, Ly2_6, Gkhg, Gkjhg, Ly2_7, Gkl, Gkl3, Ly2_8, Gkwg, Ly2_9, Gksg, Ly2_10, Gklg, Ly2_11, Gkdz,
                                     Ly2_12, Ly2_13, Ly2_14, Ly2_15, Ly2_16, Ly2_17, Ly2_18, Ly2_19, Ly2_20,
                                     Ly2Sum1, Ly2Sum2, Ly2Sum3, Ly2Sum4, Ly2Sum5, Ly2Sum6, Ly2Sum7, Ly2Sum8, Ly2Sum9, Ly2Sum10, Ly2Sum11, Ly2Sum12, Cbx_Item2JHG.Text };
            }

            /*
             * 功能:门式脚手架用量计算
             * 作者:林凯
             * 日期:2013-9-16
             */
            else if (CbxScaffoldType.SelectedIndex == 3)//选择门式脚手架用量计算
            {
                itemtext = "门式脚手架用料计算";
                #region 门式脚手架用量计算涉及的参数定义
                double Ly3_1, Ly3_2, Ly3_3, Ly3_4, Ly3_5, Ly3_7, Ly3_8, Ly3_9, Ly3_10;
                string Ly3_6;
                double Ly3Sum1 = 0, Ly3Sum2 = 0, Ly3Sum3 = 0, Ly3Sum4 = 0, Ly3Sum5 = 0, Ly3Sum6 = 0, Ly3Sum7 = 0;
                Ly3_1  = DbInput_Item3GD.Value;                                   //脚手架搭设高度
                Ly3_2  = DbInput_Item3CD.Value;                                   //脚手架搭设长度
                Ly3_3  = DbInput_Item3MJBJ.Value;                                 //门架步距
                Ly3_4  = DbInput_Item3MJKD.Value;                                 //门架跨度
                Ly3_5  = System.Convert.ToDouble(DbInput_Item3CS.Value);          //脚手板搭设层数
                Ly3_6  = Cbx_Item3JDCSZ.Text;                                     //剪刀撑设置
                Ly3_7  = System.Convert.ToDouble(IntInput_Item3JDCKMJBJ.Value);   //剪刀撑跨门架步距
                Ly3_8  = System.Convert.ToDouble(IntInput_Item3JDCKYMJKDS.Value); //剪刀撑跨越立杆纵距数
                Ly3_9  = System.Convert.ToDouble(IntInput_Item3JDCJGMJKDS.Value); //剪刀撑间隔立杆纵距数
                Ly3_10 = DbInput_Item3XS.Value;                                   //材料用量系数
                #endregion
                #region 门式脚手架用量计算过程
                Ly3Sum1 = Ly3_10 * (Ly3_2 / Ly3_4 + 1) * Ly3_1 / Ly3_3;
                Ly3Sum2 = Ly3_10 * Ly3_2 / Ly3_4 * Ly3_1 / Ly3_3 * 2;
                Ly3Sum3 = Ly3_10 * Ly3_2 / Ly3_4 * Ly3_5;
                Ly3Sum4 = Ly3_10 * (Ly3_2 / Ly3_4 + 1) * Ly3_1 / Ly3_3 * 2;
                Ly3Sum5 = Ly3_10 * (Math.Pow((Ly3_8 * Ly3_8 + Ly3_7 * Ly3_7), 0.5) + 1) * Ly3_1 / Ly3_7 * Ly3_2 / Ly3_8;
                Ly3Sum6 = Ly3Sum5 * 3.97 / 1000;
                Ly3Sum7 = Ly3_10 * Ly3_1 / Ly3_7 * Ly3_2 / Ly3_8 * 14;
                #endregion
                Ly3Sum1 = Math.Round(Ly3Sum1, 0);
                Ly3Sum2 = Math.Round(Ly3Sum2, 0);
                Ly3Sum3 = Math.Round(Ly3Sum3, 0);
                Ly3Sum4 = Math.Round(Ly3Sum4, 0);
                Ly3Sum5 = Math.Round(Ly3Sum5, 0);
                Ly3Sum6 = Math.Round(Ly3Sum6, 0);
                Ly3Sum7 = Math.Round(Ly3Sum7, 0);
                obj     = new object[] { Ly3_1, Ly3_2, Ly3_3, Ly3_4, Ly3_5, Ly3_7, Ly3_8, Ly3_9, Ly3_10, Ly3_6, Ly3Sum1, Ly3Sum2, Ly3Sum3, Ly3Sum4, Ly3Sum5, Ly3Sum6, Ly3Sum7,
                                         DbInput_Item3CS.Value, IntInput_MaterialJDCKYBJ.Value, IntInput_Item3JDCKYMJKDS.Value, IntInput_Item3JDCJGMJKDS.Value };
            }
            else if (CbxScaffoldType.SelectedIndex == 4)//选择吊篮脚手架用量计算
            {
                itemtext = "吊篮脚手架用料计算";
                #region  篮脚手架用量计算涉及的参数定义
                double Ly4_1, Ly4_2, Ly4_3 = 1, Ly4_4, Ly4_5, Ly4_6, Ly4_7, Ly4_8, Ly4_9, Ly4_10, Ly4_11, Ly4_12, Ly4_13, Ly4_14, Ly4_15,
                       Ly4_16, Ly4_17, Ly4_18, Ly4_19, Ly4_20, Ly4_21, Ly4_22, Ly4_23, Ly4_24, Ly4_25;
                double Ly4Sum1 = 0, Ly4Sum2 = 0, Ly4Sum3 = 0, Ly4Sum4 = 0, Ly4Sum5 = 0, Ly4Sum6 = 0, Ly4Sum7 = 0, Ly4Sum8 = 0, Ly4Sum9 = 0, Ly4Sum10 = 0, Ly4Sum11 = 0, Ly4Sum12 = 0, Ly4Sum13 = 0, Ly4Sum14 = 0, Ly4Sum15 = 0, Ly4Sum16 = 0;
                string compare1 = "", compare2 = "", compare3 = "", compare4 = "", compare5 = "";
                Ly4_1  = Db_Item4CD.Value;                            //吊篮长度
                Ly4_2  = Db_Item4KD.Value;                            //吊篮宽度
                Ly4_3  = Db_Item4GD.Value;                            //吊篮高度
                Ly4_4  = Db_Item4PZZL.Value;                          //配重质量
                Ly4_5  = Db_Item4XTLFBHD.Value;                       //悬挑梁腹板厚度
                Ly4_6  = Db_Item4XTLMJJ.Value;                        //悬挑梁面积矩
                Ly4_7  = Db_Item4JMGXJ.Value;                         //悬挑梁截面惯性矩
                Ly4_8  = Db_Item4JMDKJ.Value;                         //悬挑梁截面抵抗矩
                Ly4_9  = Db_Item4DLDDJL.Value;                        //悬挑梁前部支点至吊篮吊点距离
                Ly4_10 = Db_Item4HBZDJL.Value;                        // 悬挑梁前部支点至后部支点距离
                Ly4_11 = Db_Item4WDXS.Value;                          //悬挑梁整体稳定系数
                Ly4_12 = Db_Item4KWQD.Value;                          //悬挑梁抗弯强度设计值
                Ly4_13 = Db_Item4KJQD.Value;                          //悬挑梁抗剪强度设计值
                Ly4_14 = Db_Item4GSSZJ.Value;                         //钢丝绳直径
                Ly4_15 = Db_Item4LJZH.Value;                          //钢丝破断拉力总和
                Ly4_16 = Db_Item4SLGSSS.Value;                        //每榀架体受力钢丝绳数
                Ly4_17 = Db_Item4AQXS.Value;                          //安全系数
                Ly4_18 = Db_Item4BJYXS.Value;                         //不均匀系数
                Ly4_19 = Db_Item4GSSDLZZ.Value;                       // 钢丝绳及吊篮自重标准值
                Ly4_20 = System.Convert.ToDouble(TB_Item4ZZBZZ.Text); //悬挑梁自重标准值
                Ly4_21 = Db_Item4HZBZZ.Value;                         //施工活荷载标准值
                Ly4_22 = Db_Item4JBFY.Value;                          //基本风压
                Ly4_23 = Db_Item4FHZTXXS.Value;                       //风荷载体型系数
                Ly4_24 = Db_Item4FYGDBHXS.Value;                      //风压高度变化系数
                Ly4_25 = Db_Item4FZXS.Value;                          //风振系数
                #endregion
                #region  篮脚手架用量计算过程
                Ly4Sum1  = Ly4_1 * Ly4_3;                                                     //吊篮受风面积F
                Ly4Sum2  = Ly4_22 * Ly4_23 * Ly4_24 * Ly4_25 * Ly4Sum1;                       //吊篮的风荷载标准值Qwk
                Ly4Sum3  = Ly4_1 * Ly4_2;                                                     //吊篮底部最大面积A
                Ly4Sum4  = Ly4_21 * Ly4Sum3;                                                  //施工活荷载标准值Qk
                Ly4Sum5  = (Ly4_19 + Ly4Sum4) / 2;                                            //吊篮动力钢丝绳竖向荷载标准值Q1
                Ly4Sum6  = Ly4Sum2 / 2;                                                       //吊篮动力钢丝绳水平荷载标准值Q2
                Ly4Sum7  = Ly4_17 * (Math.Pow((Ly4Sum5 * Ly4Sum5 + Ly4Sum6 * Ly4Sum6), 0.5)); //动力钢丝绳所受拉力的施工核算值QD
                Ly4Sum8  = Ly4Sum7 * (1 + Ly4_9 / Ly4_10) + Ly4_20 * (Ly4_9 + Ly4_10);        //支撑悬挂机构前支架的结构所承受的集中荷载ND
                Ly4Sum9  = Ly4_18 * Ly4_16 * Ly4_15 / Ly4_17;                                 //钢丝绳计算[Fg]
                Ly4Sum10 = 2 * (Ly4Sum7 * Ly4_9 / Ly4_10);                                    //支承悬挂机构后支架的结构所承受的集中荷载T
                Ly4Sum11 = Ly4Sum10 * 100;                                                    //允许最小配重重量m0
                Ly4Sum12 = Ly4Sum7 * Ly4_9;                                                   //悬挑梁抗弯强度验算Mmax
                Ly4Sum13 = Ly4Sum12 * 1000 / Ly4_8;                                           //悬挑梁抗弯强度验算σ
                Ly4Sum14 = Ly4Sum7 + Ly4_20 * Ly4_9;                                          //悬挑梁抗剪验算Vmax
                Ly4Sum15 = Ly4Sum14 * Ly4_6 / Ly4_5 / Ly4_7 * 10;                             //悬挑梁抗剪验算τmax
                Ly4Sum16 = Ly4Sum12 * 1000 / (Ly4_11 * Ly4_8);                                //悬挑梁整体稳定性验算σ

                Ly4Sum1  = Math.Round(Ly4Sum1, 0);
                Ly4Sum2  = Math.Round(Ly4Sum2, 0);
                Ly4Sum3  = Math.Round(Ly4Sum3, 0);
                Ly4Sum4  = Math.Round(Ly4Sum4, 0);
                Ly4Sum5  = Math.Round(Ly4Sum5, 0);
                Ly4Sum6  = Math.Round(Ly4Sum6, 0);
                Ly4Sum7  = Math.Round(Ly4Sum7, 0);
                Ly4Sum8  = Math.Round(Ly4Sum8, 0);
                Ly4Sum9  = Math.Round(Ly4Sum9, 0);
                Ly4Sum10 = Math.Round(Ly4Sum10, 0);
                Ly4Sum11 = Math.Round(Ly4Sum11, 0);
                Ly4Sum12 = Math.Round(Ly4Sum12, 0);
                Ly4Sum13 = Math.Round(Ly4Sum13, 0);
                Ly4Sum14 = Math.Round(Ly4Sum14, 0);
                Ly4Sum15 = Math.Round(Ly4Sum15, 0);
                Ly4Sum16 = Math.Round(Ly4Sum16, 0);

                if (Ly4Sum9 >= Ly4Sum7)
                {
                    compare1 = "[Fg]= " + Ly4Sum9 + " kN ≥QD= " + Ly4Sum7 + " kN,满足要求!";
                }
                else
                {
                    compare1 = "[Fg]= " + Ly4Sum9 + " kN<QD= " + Ly4Sum7 + " kN,不满足要求!";
                }

                if (Ly4_4 >= Ly4Sum11)
                {
                    compare2 = "实际配重:m=" + Ly4_4 + " kg≥m0= " + Ly4Sum11 + " kg,满足要求!";
                }
                else
                {
                    compare2 = "实际配重:m=" + Ly4_4 + " kg<m0= " + Ly4Sum11 + " kg,不满足要求!";
                }

                if (Ly4Sum13 <= Ly4_12)
                {
                    compare3 = "σ=" + Ly4Sum13 + "N/mm2≤f= " + Ly4_12 + " N/mm2,满足要求!";
                }
                else
                {
                    compare3 = "σ=" + Ly4Sum13 + "N/mm2>f= " + Ly4_12 + " N/mm2,不满足要求!";
                }

                if (Ly4Sum15 <= Ly4_13)
                {
                    compare4 = "τmax=" + Ly4Sum15 + " N/mm2≤τ=" + Ly4_13 + " N/mm2,满足要求!";
                }
                else
                {
                    compare4 = "τmax=" + Ly4Sum15 + " N/mm2>τ=" + Ly4_13 + " N/mm2,不满足要求!";
                }

                if (Ly4Sum16 <= Ly4_12)
                {
                    compare5 = "σ=" + Ly4Sum16 + "N/mm2≤[f]= " + Ly4_12 + "N/mm2,满足要求!";
                }
                else
                {
                    compare5 = "σ=" + Ly4Sum16 + "N/mm2>[f]= " + Ly4_12 + "N/mm2,不满足要求!";
                }
                #endregion


                obj = new object[] { Ly4_1, Ly4_2, Ly4_3, Ly4_4, Ly4_5, Ly4_6, Ly4_7, Ly4_8, Ly4_9, Ly4_10, Ly4_11, Ly4_12, Ly4_13, Ly4_14, Ly4_15,
                                     Ly4_16, Ly4_17, Ly4_18, Ly4_19, Ly4_20, Ly4_21, Ly4_22, Ly4_23, Ly4_24, Ly4_25, Ly4Sum1, Ly4Sum2, Ly4Sum3, Ly4Sum4, Ly4Sum5,
                                     Ly4Sum6, Ly4Sum7, Ly4Sum8, Ly4Sum9, Ly4Sum10, Ly4Sum11, Ly4Sum12, Ly4Sum13, Ly4Sum14, Ly4Sum15, Ly4Sum16, compare1, compare2, compare3, compare4, compare5 };
            }

            foreach (Framework.Entity.Template template in templateList)
            {
                if (itemtext == template.Title)
                {
                    item = template;
                    break;
                }
            }
            CreateModuleIntance(item, null, @class, obj);
            this.Close();
        }
Пример #53
0
 private void SubmitCreateModule(Framework.Entity.Template template, System.Collections.ArrayList array, object @class, object[] data) //2.定义Delegate将引用的静态方法或引用类实例及该类的实例方法。这是中间传递参数所用的一个方法,其类似于“UclCustom.cs”中的"private void CreateModule()"
 {                                                                                                                                     //此方法将委托给FrmScaffoldRecommend下的七个窗体中的
     CreateModuleIntance(template, array, @class, data);
     this.Close();
 }
Пример #54
0
        private void BtnSubmit_Click(object sender, System.EventArgs e)
        {
            System.Collections.ArrayList array = new System.Collections.ArrayList();
            if (@class.GetType().Equals(new Framework.Model.InsertTextWinterMeasure().GetType()))
            {
                object[] data        = new object[8];
                int[]    selectState = new int[8];
                for (int i = 0; i < 8; i++)
                {
                    selectState[i] = 0;
                }
                int count = 0;
                for (int i = 0; i < DataGridView.RowCount; i++)
                {
                    if (DataGridView.Rows[i].Cells[0].Value.ToString().Equals("True"))
                    {
                        selectState[i + 1] = 1;
                        count++;
                    }
                }
                int dataNum = 0;
                for (int i = 1; i <= 7; i++)
                {
                    Framework.Entity.Template insertText1 = new Framework.Entity.Template();
                    insertText1 = (Framework.Entity.Template)templateList[i];
                    if (selectState[i] == 1)
                    {
                        data[dataNum] = insertText1.Title;
                        dataNum++;
                    }
                }
                data[7] = count;
                CreateModuleIntance(tempInsertText, array, @class, data);
            }
            else if (@class.GetType().Equals(new Framework.Model.InsertTextWinterMaintain().GetType()))
            {
                object[] data        = new object[3];
                int[]    selectState = new int[3];
                for (int i = 0; i < 3; i++)
                {
                    selectState[i] = 0;
                }
                int count = 0;
                for (int i = 0; i < DataGridView.RowCount; i++)
                {
                    if (DataGridView.Rows[i].Cells[0].Value.ToString().Equals("True"))
                    {
                        selectState[i + 1] = 1;
                        count++;
                    }
                }
                int dataNum = 0;
                for (int i = 1; i <= 2; i++)
                {
                    Framework.Entity.Template insertText1 = new Framework.Entity.Template();
                    insertText1 = (Framework.Entity.Template)templateList[i];

                    if (selectState[i] == 1)
                    {
                        data[dataNum] = insertText1.Title;
                        dataNum++;
                    }
                }
                data[2] = count;
                CreateModuleIntance(tempInsertText, array, @class, data);
            }
            else if (@class.GetType().Equals(new Framework.Model.InsertTextPileProject().GetType()))
            {
                object[] data        = new object[8];
                int[]    selectState = new int[8];
                for (int i = 0; i < 8; i++)
                {
                    selectState[i] = 0;
                }
                int count = 0;
                for (int i = 0; i < DataGridView.RowCount; i++)
                {
                    if (DataGridView.Rows[i].Cells[0].Value.ToString().Equals("True"))
                    {
                        selectState[i + 1] = 1;
                        count++;
                    }
                }
                int dataNum = 0;
                for (int i = 1; i <= 7; i++)
                {
                    Framework.Entity.Template insertText1 = new Framework.Entity.Template();
                    insertText1 = (Framework.Entity.Template)templateList[i];
                    if (selectState[i] == 1)
                    {
                        data[dataNum] = insertText1.Title;
                        dataNum++;
                    }
                }
                data[7] = count;
                CreateModuleIntance(tempInsertText, array, @class, data);
            }
            else if (@class.GetType().Equals(new Framework.Model.InsertTextRoof().GetType()))
            {
                object[] data        = new object[11];
                int[]    selectState = new int[5];
                for (int i = 0; i < 5; i++)
                {
                    selectState[i] = 0;
                }
                int count1 = 0;
                for (int i = 0; i < DataGridView.RowCount; i++)
                {
                    if (DataGridView.Rows[i].Cells[0].Value.ToString().Equals("True"))
                    {
                        selectState[i + 1] = 1;
                        count1++;
                    }
                }
                int dataNum = 0;
                for (int i = 1; i <= 4; i++)
                {
                    Framework.Entity.Template insertText1 = new Framework.Entity.Template();
                    insertText1 = (Framework.Entity.Template)templateList[i];
                    if (selectState[i] == 1)
                    {
                        data[dataNum] = insertText1.Title;
                        dataNum++;
                    }
                }
                data[8] = count1;
                count1  = 0;
                if (selectState[1] == 1 | selectState[2] == 1)
                {
                    count1++;
                    Framework.Entity.Template insertText2 = new Framework.Entity.Template();
                    insertText2 = (Framework.Entity.Template)templateList[5];
                    data[4]     = insertText2.Title;
                    insertText2 = (Framework.Entity.Template)templateList[7];
                    data[6]     = insertText2.Title;
                    data[9]     = count1;
                    data[10]    = count1;
                }
                if (selectState[3] == 1 | selectState[4] == 1)
                {
                    count1++;
                    if (count1 == 1)
                    {
                        Framework.Entity.Template insertText3 = new Framework.Entity.Template();
                        insertText3 = (Framework.Entity.Template)templateList[6];
                        data[4]     = insertText3.Title;
                        insertText3 = (Framework.Entity.Template)templateList[8];
                        data[6]     = insertText3.Title;
                        data[9]     = count1;
                        data[10]    = count1;
                    }
                    else
                    {
                        Framework.Entity.Template insertText4 = new Framework.Entity.Template();
                        insertText4 = (Framework.Entity.Template)templateList[6];
                        data[5]     = insertText4.Title;
                        insertText4 = (Framework.Entity.Template)templateList[8];
                        data[7]     = insertText4.Title;
                        data[9]     = count1;
                        data[10]    = count1;
                    }
                }
                CreateModuleIntance(tempInsertText, array, @class, data);
            }
            this.Close();
        }
Пример #55
0
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            #region  //获取模板的内容
            object[] obj = new object[] { };
            Framework.Entity.Template item            = new Framework.Entity.Template();
            string templatename                       = "混凝土取样";
            Framework.Entity.Template    templatetemp = new Framework.Entity.Template();
            System.Collections.ArrayList templateList = contentService.GetContentTemplateByTitle(chaptertemp.Title);

            #endregion
            System.Collections.ArrayList array  = new System.Collections.ArrayList();
            System.Collections.ArrayList array1 = new System.Collections.ArrayList();
            System.Collections.ArrayList array2 = new System.Collections.ArrayList();
            System.Collections.ArrayList array3 = new System.Collections.ArrayList();
            System.Collections.ArrayList array4 = new System.Collections.ArrayList();
            System.Collections.ArrayList array5 = new System.Collections.ArrayList();
            System.Collections.ArrayList array6 = new System.Collections.ArrayList();
            System.Collections.ArrayList array7 = new System.Collections.ArrayList();
            System.Collections.ArrayList array8 = new System.Collections.ArrayList();
            if (X_Base.Columns.Count == 5)//基础
            {
                for (int i = 0; i < X_Base.Rows.Count; i++)
                {
                    if (X_Base.Rows[i].Cells[0].Value != null)
                    {
                        array1.Add(new object[] { X_Base.Rows[i].Cells[0].Value, X_Base.Rows[i].Cells[1].Value,
                                                  X_Base.Rows[i].Cells[2].Value, X_Base.Rows[i].Cells[3].Value });
                    }
                }
            }
            if (X_Base.Columns.Count == 6)
            {
                for (int i = 0; i < X_Base.Rows.Count; i++)
                {
                    if (X_Base.Rows[i].Cells[0].Value != null)
                    {
                        array5.Add(new object[] { X_Base.Rows[i].Cells[0].Value, X_Base.Rows[i].Cells[1].Value,
                                                  X_Base.Rows[i].Cells[2].Value, X_Base.Rows[i].Cells[3].Value, Convert.ToInt32(X_Base.Rows[i].Cells[4].Value) });
                    }
                }
            }

            if (X_Mainpart.Columns.Count == 6)//主体
            {
                for (int i = 0; i < X_Mainpart.Rows.Count; i++)
                {
                    if (X_Mainpart.Rows[i].Cells[0].Value != null)
                    {
                        array2.Add(new object[] { X_Mainpart.Rows[i].Cells[0].Value, X_Mainpart.Rows[i].Cells[1].Value,
                                                  X_Mainpart.Rows[i].Cells[2].Value, X_Mainpart.Rows[i].Cells[3].Value, X_Mainpart.Rows[i].Cells[4].Value });
                    }
                }
            }
            if (X_Mainpart.Columns.Count == 7)
            {
                for (int i = 0; i < X_Mainpart.Rows.Count; i++)
                {
                    if (X_Mainpart.Rows[i].Cells[0].Value != null)
                    {
                        array6.Add(new object[] { X_Mainpart.Rows[i].Cells[0].Value, X_Mainpart.Rows[i].Cells[1].Value,
                                                  X_Mainpart.Rows[i].Cells[2].Value, X_Mainpart.Rows[i].Cells[3].Value, X_Mainpart.Rows[i].Cells[4].Value,
                                                  Convert.ToInt32(X_Mainpart.Rows[i].Cells[5].Value) });
                    }
                }
            }

            if (X_Concrete.Columns.Count == 4)//零星混凝土
            {
                for (int i = 0; i < X_Concrete.Rows.Count; i++)
                {
                    if (X_Concrete.Rows[i].Cells[0].Value != null)
                    {
                        array3.Add(new object[] { X_Concrete.Rows[i].Cells[0].Value, X_Concrete.Rows[i].Cells[1].Value,
                                                  X_Concrete.Rows[i].Cells[2].Value });
                    }
                }
            }
            if (X_Concrete.Columns.Count == 5)
            {
                for (int i = 0; i < X_Concrete.Rows.Count; i++)
                {
                    if (X_Concrete.Rows[i].Cells[0].Value != null)
                    {
                        array7.Add(new object[] { X_Concrete.Rows[i].Cells[0].Value, X_Concrete.Rows[i].Cells[1].Value,
                                                  X_Concrete.Rows[i].Cells[2].Value, Convert.ToInt32(X_Concrete.Rows[i].Cells[3].Value) });
                    }
                }
            }

            if (X_Otherproject.Columns.Count == 5)//其他工程
            {
                for (int i = 0; i < X_Otherproject.Rows.Count; i++)
                {
                    if (X_Otherproject.Rows[i].Cells[0].Value != null)
                    {
                        array4.Add(new object[] { X_Otherproject.Rows[i].Cells[0].Value, X_Otherproject.Rows[i].Cells[1].Value,
                                                  X_Otherproject.Rows[i].Cells[2].Value, X_Otherproject.Rows[i].Cells[3].Value });
                    }
                }
            }
            if (X_Otherproject.Columns.Count == 6)
            {
                for (int i = 0; i < X_Otherproject.Rows.Count; i++)
                {
                    if (X_Otherproject.Rows[i].Cells[0].Value != null)
                    {
                        array8.Add(new object[] { X_Otherproject.Rows[i].Cells[0].Value, X_Otherproject.Rows[i].Cells[1].Value,
                                                  X_Otherproject.Rows[i].Cells[2].Value, X_Otherproject.Rows[i].Cells[3].Value, Convert.ToInt32(X_Otherproject.Rows[i].Cells[4].Value) });
                    }
                }
            }

            array.Add(array1);
            array.Add(array2);
            array.Add(array3);
            array.Add(array4);
            array.Add(array5);
            array.Add(array6);
            array.Add(array7);
            array.Add(array8);


            foreach (Framework.Entity.Template template in templateList)
            {
                if (template.Title == templatename)
                {
                    templatetemp = template;
                    break;
                }
            }

            CreateModuleIntance(templatetemp, array, @class, obj);
            this.Close();
        }
Пример #56
0
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            #region  //��ȡģ�������
            object[] obj = new object[] { };
            string templatename = "ģ��ѡ��";
            Framework.Entity.Template templatetemp = new Framework.Entity.Template();
            System.Collections.ArrayList templateList = contentService.GetContentTemplateByTitle(chaptertemp.Title);

            #endregion
            System.Collections.ArrayList array = new System.Collections.ArrayList();
            System.Collections.ArrayList array1 = new System.Collections.ArrayList();
            System.Collections.ArrayList array2 = new System.Collections.ArrayList();

            for (int i = 0; i < Dgv_FS_Machine.Rows.Count; i++)
            {
                if (Dgv_FS_Machine.Rows[i].Cells[1].Value != null)
                {
                    array2.Add(new object[] { i + 1, Dgv_FS_Machine.Rows[i].Cells[1].Value, Dgv_FS_Machine.Rows[i].Cells[2].Value });
                }
            }
            for (int i = 0; i < Dgv_FS_Staff.Rows.Count; i++)
            {
                if (Dgv_FS_Staff.Rows[i].Cells[1].Value != null)
                {
                    array1.Add(new object[] { i + 1, Dgv_FS_Staff.Rows[i].Cells[1].Value, Dgv_FS_Staff.Rows[i].Cells[2].Value });
                }
            }

            array.Add(array1);
            array.Add(array2);

            string data1_1, data1_2, data1_3, data1_5, data1_6;
            double data1_4, data1_7, data1_8;
            string str1_1;

            //��
            data1_1 = cB_FS_1CZJ.Text;
            data1_2 = cB_FS_1GGLX.Text;
            data1_3 = cB_FS_1MBLX.Text;
            data1_4 = dI_FS_1MBHD.Value;
            data1_5 = cB_FS_1DBZC.Text;
            data1_6 = cB_FS_1JMLX.Text;
            data1_7 = dI_FS_1FMK.Value;
            data1_8 = dI_FS_1FMG.Value;

            if (cB_FS_1DBZC.SelectedIndex != 0)
            {
                str1_1 = data1_6 + data1_5;
            }
            else {
                str1_1 = data1_7 + "mm" + "��" + data1_8 + "mm" + data1_5;
            }

            //��
            string data2_1, data2_2, data2_3, data2_5, data2_6;
            double data2_4, data2_7, data2_8;
            string str2_1;

            data2_1 = cB_FS_2CZJ.Text;
            data2_2 = cB_FS_2GGLX.Text;
            data2_3 = cB_FS_2MBLX.Text;
            data2_4 = dI_FS_2MBHD.Value;
            data2_5 = cB_FS_2DBZC.Text;
            data2_6 = cB_FS_2JMLX.Text;
            data2_7 = dI_FS_2FMK.Value;
            data2_8 = dI_FS_2FMG.Value;

            if (cB_FS_2DBZC.SelectedIndex != 0)
            {
                str2_1 = data2_6 + data2_5;
            }
            else
            {
                str2_1 = data2_7 + "mm" + "��" + data2_8 + "mm" + data2_5;
            }

            obj = new object[] { data1_1, data1_2, data1_3, data1_4, str1_1, data2_1, data2_2, data2_3, data2_4, str2_1 };

            foreach (Framework.Entity.Template template in templateList)
            {
                if (template.Title == templatename)
                {
                    templatetemp = template;
                    break;
                }
            }

            CreateModuleIntance(templatetemp, array, @class, obj);
            this.Close();
        }