public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string workcell = context.Request["workcell"];
            string bayName  = context.Request["bayName"];

            System.Data.DataTable dt = new System.Data.DataTable();
            dt = DAL.DbHelper.ExecuteSql_Table("select top 1 Model from [T_Bay] where Workcell='" + workcell + "' and BayName='" + bayName + "'");

            string Model_list = "";
            List <DataModel.select2> ModelObj = new List <DataModel.select2>();

            if (dt.Rows.Count > 0)
            {
                string[] templist = Convert.ToString(dt.Rows[0]["Model"]).Split(';');
                for (int i = 0; i < templist.Length; i++)
                {
                    DataModel.select2 o = new DataModel.select2();
                    o.id   = i;
                    o.text = templist[i].Trim();
                    ModelObj.Add(o);
                }
            }
            JavaScriptSerializer jsonSerialize = new JavaScriptSerializer();

            Model_list = jsonSerialize.Serialize(ModelObj);
            context.Response.Write(Model_list);
        }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                System.Data.DataTable dt = new System.Data.DataTable();
                dt = new DAL.DbHelper().QueryDataTable("select * from [EKS_T_Bay] where [Workcell]='Solaredge/Solaredge' and  [BayName]='Bay013X'");
                if (dt.Rows.Count == 0)
                {
                    return;
                }

                string[] Modelstring = Convert.ToString(dt.Rows[0]["Model"]).Split(';');

                List <DataModel.select2> ModelObj = new List <DataModel.select2>();
                for (int i = 0; i < Modelstring.Length; i++)
                {
                    DataModel.select2 o = new DataModel.select2();
                    o.id   = i;
                    o.text = Modelstring[i].Trim();
                    ModelObj.Add(o);
                }
                JavaScriptSerializer jsonSerialize = new JavaScriptSerializer();
                Model_list = jsonSerialize.Serialize(ModelObj);

                //end
            }
        }
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string workcell = context.Request["workcell"];

            System.Data.DataTable dt = new System.Data.DataTable();
            dt = new DAL.DbHelper().QueryDataTable("select  BayName from [EKS_T_Bay] where Workcell='" + workcell + "'");
            string Model_list = "";
            List <DataModel.select2> ModelObj = new List <DataModel.select2>();

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                DataModel.select2 o = new DataModel.select2();
                o.id   = i;
                o.text = Convert.ToString(dt.Rows[i]["BayName"]).Trim();
                ModelObj.Add(o);
            }
            JavaScriptSerializer jsonSerialize = new JavaScriptSerializer();

            Model_list = jsonSerialize.Serialize(ModelObj);
            context.Response.Write(Model_list);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                System.Data.DataTable dt = new System.Data.DataTable();
                dt = new DAL.DbHelper().QueryDataTable("select distinct Workcell from [EKS_T_Bay]");
                if (dt.Rows.Count == 0)
                {
                    return;
                }

                List <DataModel.select2> ToolYorNObj = new List <DataModel.select2>();

                DataModel.select2 o_a1 = new DataModel.select2();
                o_a1.id   = 0;
                o_a1.text = "Y";
                ToolYorNObj.Add(o_a1);
                DataModel.select2 o_a2 = new DataModel.select2();
                o_a2.id   = 1;
                o_a2.text = "N";
                ToolYorNObj.Add(o_a2);



                List <DataModel.select2> WorkcellObj = new List <DataModel.select2>();
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    DataModel.select2 o = new DataModel.select2();
                    o.id   = i;
                    o.text = Convert.ToString(dt.Rows[i]["Workcell"]);
                    WorkcellObj.Add(o);
                }
                JavaScriptSerializer jsonSerialize = new JavaScriptSerializer();

                Workcell_list = jsonSerialize.Serialize(WorkcellObj);
                YorN          = jsonSerialize.Serialize(ToolYorNObj);
            }
        }
示例#5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                System.Data.DataTable dt = new System.Data.DataTable();
                dt = DAL.DbHelper.ExecuteSql_Table("select distinct Workcell from [T_Bay]");
                if (dt.Rows.Count == 0)
                {
                    return;
                }


                List<DataModel.select2> ToolSideObj = new List<DataModel.select2>();
              
                    DataModel.select2 o_0 = new DataModel.select2();
                    o_0.id = 0;
                    o_0.text = "TOP";
                    ToolSideObj.Add(o_0);
                    DataModel.select2 o_1 = new DataModel.select2();
                    o_1.id = 1;
                    o_1.text = "BOT";
                    ToolSideObj.Add(o_1);
               
                List<DataModel.select2> ToolYorNObj = new List<DataModel.select2>();
              
                    DataModel.select2 o_a1 = new DataModel.select2();
                    o_a1.id = 0;
                    o_a1.text = "Y";
                    ToolYorNObj.Add(o_a1);
                    DataModel.select2 o_a2= new DataModel.select2();
                    o_a2.id = 1;
                    o_a2.text = "N";
                    ToolYorNObj.Add(o_a2);

               

                List<DataModel.select2> WorkcellObj = new List<DataModel.select2>();
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    DataModel.select2 o = new DataModel.select2();
                    o.id = i;
                    o.text = Convert.ToString(dt.Rows[i]["Workcell"]);
                    WorkcellObj.Add(o);
                }                             
                JavaScriptSerializer jsonSerialize = new JavaScriptSerializer();
                ToolSide_list = jsonSerialize.Serialize(ToolSideObj);
                Workcell_list = jsonSerialize.Serialize(WorkcellObj);
                YorN = jsonSerialize.Serialize(ToolYorNObj);
                


                System.Data.DataTable dt_Model = new System.Data.DataTable();
                dt_Model = DAL.DbHelper.ExecuteSql_Table("select * from [T_Bay] where [Workcell]='HP/Printer Motherboard' and  [BayName]='BAY06'");
                if (dt_Model.Rows.Count == 0)
                {
                    return;
                }

                string[] Modelstring = Convert.ToString(dt_Model.Rows[0]["Model"]).Split(';');

                List<DataModel.select2> ModelObj = new List<DataModel.select2>();
                for (int i = 0; i < Modelstring.Length; i++)
                {
                    DataModel.select2 o = new DataModel.select2();
                    o.id = i;
                    o.text = Modelstring[i].Trim();
                    ModelObj.Add(o);
                }

                From_Model_list = jsonSerialize.Serialize(ModelObj);

            }
        }