Beispiel #1
0
        private void BindEquipmentList()
        {
            EquipmentBLL         bll   = null;
            List <EquipmentInfo> array = null;

            bll   = BLLFactory.CreateBLL <EquipmentBLL>();
            array = bll.GetList();

            this.EQID.DataSource = array;
            this.EQID.DataBind();
        }
Beispiel #2
0
        private void BindData()
        {
            EquipmentBLL  bll       = null;
            DataPage      dp        = new DataPage();
            EquipmentInfo condition = new EquipmentInfo();
            string        eID       = Request.QueryString["eID"];

            if (!string.IsNullOrEmpty(eID))
            {
                if (eID.Split('|')[1] == "F")
                {
                    condition.FACTORYPID = eID.Split('|')[0];
                }
                else
                {
                    condition.PRODUCTLINEPID = eID.Split('|')[0];
                }
            }
            try
            {
                bll             = BLLFactory.CreateBLL <EquipmentBLL>();
                condition.ECODE = this.ECODE.Text;
                condition.ENAME = this.ENAME.Text;

                PagerHelper.InitPageControl(this.AspNetPager1, dp, true);
                dp = bll.GetList(condition, dp);

                List <EquipmentInfo> list = dp.Result as List <EquipmentInfo>;
                this.GvList.DataSource = list;
                this.GvList.DataBind();

                for (int i = 0; i < this.GvList.Rows.Count; i++)
                {
                    string click = string.Format("return edit('{0}');", this.GvList.DataKeys[i]["PID"].ToString());

                    (this.GvList.Rows[i].Cells[7].Controls[0] as WebControl).Attributes.Add("onclick", click);
                }
                PagerHelper.SetPageControl(AspNetPager1, dp, true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #3
0
        public ActionResult GetListJson(string queryJson)
        {
            var data = equipmentbll.GetList(queryJson);

            return(ToJsonResult(data));
        }