예제 #1
0
        private void comboBoxEdit5_SelectedIndexChanged(object sender, EventArgs e)
        {
            string x = comboBoxEdit3.Text;
            //comboBoxEdit3.Properties.Items.Clear();
            string te = "";
            //if (stat == "500" || stat == "220" || stat == "110")
            //    te = "S1='"+stat+"' and ";
            IList <string> strList = oper.GetLineType(te + "S5='1' and S1='" + comboBoxEdit5.Text + "'");

            //foreach(string str in strList)
            //    comboBoxEdit3.Properties.Items.Add(str);
            //comboBoxEdit3.SelectedIndex = 0;
            if (x == comboBoxEdit3.Text)
            {
                comboBoxEdit7.Properties.Items.Clear();
                //if (stat == "500" || stat == "220" || stat == "110")
                //    te = "S1='" + stat + "' and ";
                IList <string> strList1 = oper.GetLineName(te + "S5='1' and S1='" + comboBoxEdit5.Text + "' and Type='" + comboBoxEdit3.Text + "'");
                foreach (string str in strList1)
                {
                    comboBoxEdit7.Properties.Items.Add(str);
                }
                comboBoxEdit7.SelectedIndex = 0;
            }
        }
예제 #2
0
        public void InitCom()
        {
            comboBoxEdit9.Properties.Items.Add("新建");
            comboBoxEdit9.Properties.Items.Add("扩建");
            comboBoxEdit9.Properties.Items.Add("改造");
            comboBoxEdit9.SelectedIndex = 0;

            for (int i = yAnge.BeginYear; i <= yAnge.EndYear; i++)
            {
                comboBoxEdit1.Properties.Items.Add(i.ToString());
                comboBoxEdit2.Properties.Items.Add(i.ToString());
            }
            comboBoxEdit1.Text = DateTime.Now.Year.ToString();
            comboBoxEdit2.Text = DateTime.Now.AddYears(1).Year.ToString();
            IList <string> strList = oper.GetLineS1("S5='1'");

            foreach (string str in strList)
            {
                comboBoxEdit5.Properties.Items.Add(str);
            }
            comboBoxEdit5.SelectedIndex = 0;
            strList = oper.GetLineS1("S5='2'");
            foreach (string str in strList)
            {
                comboBoxEdit6.Properties.Items.Add(str);
            }
            comboBoxEdit6.SelectedIndex = 0;
            strList = oper.GetLineName("S5='2' and S1='" + comboBoxEdit6.Text + "' and name like'%" + comboBoxEdit9.Text + "%'");
            if (strList.Count != 0)
            {
                comboBoxEdit4.Text = strList[0].ToString();
            }
        }
예제 #3
0
        public void InitCom()
        {
            comboBoxEdit9.Properties.Items.Add("新建");
            comboBoxEdit9.Properties.Items.Add("扩建");
            comboBoxEdit9.Properties.Items.Add("改造");
            comboBoxEdit9.SelectedIndex = 0;

            for (int i = yAnge.BeginYear; i <= yAnge.EndYear; i++)
            {
                comboBoxEdit1.Properties.Items.Add(i.ToString());
                comboBoxEdit2.Properties.Items.Add(i.ToString());
            }
            comboBoxEdit1.Text = DateTime.Now.Year.ToString();
            comboBoxEdit2.Text = DateTime.Now.AddYears(1).Year.ToString();
            IList <string> strList = oper.GetLineS1("S5='1'");

            foreach (string str in strList)
            {
                comboBoxEdit5.Properties.Items.Add(str);
            }
            comboBoxEdit5.SelectedIndex = 0;
            strList = oper.GetLineS1("S5='2'");
            foreach (string str in strList)
            {
                comboBoxEdit6.Properties.Items.Add(str);
            }
            comboBoxEdit6.SelectedIndex = 0;
            strList = oper.GetLineName("S5='2' and S1='" + comboBoxEdit6.Text + "' and name like'%" + comboBoxEdit9.Text + "%'");
            if (strList.Count != 0)
            {
                comboBoxEdit4.Text = strList[0].ToString();
            }
            IList <string> areatyplist = null;

            if (Common.Services.BaseService.GetList <string>("SelectBuildProDifAreaType", "") != null)
            {
                areatyplist = Common.Services.BaseService.GetList <string>("SelectBuildProDifAreaType", "");

                for (int j = 0; j < areatyplist.Count; j++)
                {
                    comboBoxEdit11.Properties.Items.Add(areatyplist[j]);
                }
            }
            //导线型号
            WireCategory wc = new WireCategory();

            wc.Type = "40";
            IList <WireCategory> list = Common.Services.BaseService.GetList <WireCategory>("SelectWireCategoryList", wc);

            for (int k = 0; k < list.Count; k++)
            {
                comboBoxEdit14.Properties.Items.Add(list[k].WireType);
            }
        }