Exemplo n.º 1
0
        private void BindProcessFlowList()
        {
            ProcessFlowBLL     bll   = null;
            List <ProcessFlow> array = null;

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

            this.PRID.DataSource = array;
            this.PRID.DataBind();
        }
Exemplo n.º 2
0
        private void BindData()
        {
            ProcessFlowBLL bll       = null;
            DataPage       dp        = new DataPage();
            ProcessFlow    condition = new ProcessFlow();
            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 <ProcessFlowBLL>();
                condition.PCODE = this.PCODE.Text;
                condition.PNAME = this.PNAME.Text;

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

                List <ProcessFlow> list = dp.Result as List <ProcessFlow>;
                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[4].Controls[0] as WebControl).Attributes.Add("onclick", click);
                }
                PagerHelper.SetPageControl(AspNetPager1, dp, true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// 获取仓库树数据源
        /// </summary>
        /// <returns></returns>
        public string GetWSList()
        {
            List <TreeNodeResult> list   = new List <TreeNodeResult>();
            FactoryInfoBLL        bllF   = null;
            ProcessFlowBLL        bllP   = null;
            List <FactoryInfo>    arrayF = null;
            List <ProcessFlow>    arrayP = null;

            try
            {
                bllF   = BLLFactory.CreateBLL <FactoryInfoBLL>();
                bllP   = BLLFactory.CreateBLL <ProcessFlowBLL>();
                arrayF = bllF.GetList();
                arrayP = bllP.GetList();
                TreeNodeResult rootNode = new TreeNodeResult();
                rootNode.Tid   = "";
                rootNode.Ttext = "工厂/工艺流程";
                foreach (FactoryInfo infoF in arrayF)
                {
                    TreeNodeResult node = new TreeNodeResult();
                    node.Tid   = infoF.PID + "|F";
                    node.Ttext = infoF.PCODE + "|" + infoF.PNAME;
                    rootNode.AddchildNode(node);
                    List <ProcessFlow> plines = arrayP.Where(o => o.FACTORYPID == infoF.PID).ToList();
                    foreach (ProcessFlow infoP in plines)
                    {
                        TreeNodeResult nodeP = new TreeNodeResult();
                        nodeP.Tid   = infoP.PID + "|P";
                        nodeP.Ttext = infoP.PCODE + "|" + infoP.PNAME;
                        node.AddchildNode(nodeP);
                    }
                }
                list.Add(rootNode);
                return(TreeNodeResult.GetResultJosnS(list.ToArray()));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }