Esempio n. 1
0
        private void BindData()
        {
            string        id  = Request.QueryString["id"];
            UserManageBLL bll = null;

            Entity.Sys.User info = new Entity.Sys.User();
            try
            {
                bll = BLLFactory.CreateBLL <UserManageBLL>();
                if (string.IsNullOrEmpty(id) == false)
                {
                    info.UserID = id;
                    info        = bll.Get(info);

                    UIBindHelper.BindForm(this.Page, info);
                    this.OrganID.Value      = info.OrganID;
                    this.RPassWord.Text     = this.PassWord.Text;
                    this.hiID.Value         = info.UserID;
                    this.HiCREATEUSER.Value = info.CreateUser;
                    this.HiCREATETIME.Value = info.CreateTime.ToString();
                    this.IsStop.Value       = info.IsStop;
                }
                else
                {
                    info       = new Entity.Sys.User();
                    info.Roles = new List <UserRole>();
                }

                this.HiRoleList.Value = this.GetTreeRoles(info);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 确认
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btConfirm_Click(object sender, EventArgs e)
        {
            CheckStockBill info = new CheckStockBill();
            CheckStockBLL  bll  = null;

            try
            {
                UIBindHelper.BindModelByControls(this.Page, info);

                bll = BLLFactory.CreateBLL <CheckStockBLL>();

                info.Details = JsonConvertHelper.DeserializeObject <List <CheckStockDetail> >(this.hiCheckList.Value);

                info.CREATEUSER = this.HiCREATEUSER.Value;
                info.CREATETIME = DateTime.Parse(this.HiCREATETIME.Value);
                info.ID         = this.hiID.Value;
                bll.ConfirmCheck(info);

                ClientScript.RegisterStartupScript(this.GetType(), "myjs", "parent.refreshData();parent.closeAppWindow1();", true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 3
0
        protected void btSave_Click(object sender, EventArgs e)
        {
            InStockBill info = new InStockBill();
            InStockBLL  bll  = null;

            try
            {
                UIBindHelper.BindModelByControls(this.Page, info);
                info.InStockMode = this.InStockMode.SelectedValue;
                info.Warehouse   = this.Warehouse.SelectedValue;
                info.Details     = LAF.Common.Serialization.JsonConvertHelper.DeserializeObject <List <InStockDetail> >(this.hiMatList.Value);

                foreach (InStockDetail detail in info.Details)
                {
                    detail.SaveSite = this.SaveSite.SelectedValue;
                    if (detail.MatBarCode == null)
                    {
                        detail.MatBarCode = "";
                    }
                }
                bll = BLLFactory.CreateBLL <InStockBLL>();

                if (this.hiID.Value == "")
                {
                    bll.InMatStorage(info);
                }

                ClientScript.RegisterStartupScript(this.GetType(), "myjs", "MSA('提示', '入库完成', function () { window.location.href='InMatStorageMobile.aspx'; });", true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 4
0
        private void BindData()
        {
            string      id        = Request.QueryString["id"];
            VDCameraBLL bll       = null;
            VDCamera    info      = new VDCamera();
            string      postionID = Request.QueryString["postionID"];

            try
            {
                bll = BLLFactory.CreateBLL <VDCameraBLL>();
                if (string.IsNullOrEmpty(id) == false)
                {
                    info.ID = id;
                    info    = bll.Get(info);

                    UIBindHelper.BindForm(this.Page, info);
                    this.hiID.Value         = info.ID;
                    this.HiCREATEUSER.Value = info.CREATEUSER;
                    this.HiCREATETIME.Value = info.CREATETIME.ToString();
                    this.PostionID.Value    = info.PostionID;
                }
                else
                {
                    info = new VDCamera();
                    this.PostionID.Value = postionID;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 5
0
        private void BindData()
        {
            string       id   = Request.QueryString["id"];
            WHMatSpecBLL bll  = null;
            WHMatSpec    info = new WHMatSpec();

            try
            {
                bll = BLLFactory.CreateBLL <WHMatSpecBLL>();
                if (string.IsNullOrEmpty(id) == false)
                {
                    info.ID = id;
                    info    = bll.Get(info);

                    UIBindHelper.BindForm(this.Page, info);
                    this.hiID.Value = info.ID;
                }
                else
                {
                    info = new WHMatSpec();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 6
0
        private void BindData()
        {
            string id = Request.QueryString["id"];
            OrgaizationManageBLL bll  = null;
            Orgaization          info = new Orgaization();

            try
            {
                bll = BLLFactory.CreateBLL <OrgaizationManageBLL>();
                if (string.IsNullOrEmpty(id) == false)
                {
                    info.OrganID = id;
                    info         = bll.Get(info);

                    UIBindHelper.BindForm(this.Page, info);
                    this.hiID.Value         = info.OrganID;
                    this.HiCREATEUSER.Value = info.CreateUser;
                    this.HiCREATETIME.Value = info.CreateTime.ToString();
                    this.HiParentID.Value   = info.OrganParent;
                }
                else
                {
                    this.HiParentID.Value = Request.QueryString["parentID"];
                    info = new Orgaization();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 7
0
        protected void btSave_Click(object sender, EventArgs e)
        {
            SupplyInfo    info = new SupplyInfo();
            SupplyInfoBLL bll  = null;

            try
            {
                UIBindHelper.BindModelByControls(this.Page, info);

                bll = BLLFactory.CreateBLL <SupplyInfoBLL>();

                info.Details = JsonConvertHelper.DeserializeObject <List <SupplyMaterialInfo> >(this.hiMaterialList.Value);

                info.BATCHNUMBER = this.PLANID.SelectedItem.Text;
                if (this.hiID.Value == "")
                {
                    bll.Insert(info);
                }
                else
                {
                    info.CREATEUSER = this.HiCREATEUSER.Value;
                    info.CREATETIME = DateTime.Parse(this.HiCREATETIME.Value);
                    info.PID        = this.hiID.Value;
                    info.PLANID     = this.hiPlanID.Value;
                    info.PLName     = this.PLNAME.Text;
                    bll.Update(info);
                }
                ClientScript.RegisterStartupScript(this.GetType(), "myjs", "parent.refreshData();parent.closeAppWindow1();", true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 8
0
        private void BindData()
        {
            string        id  = Request.QueryString["userID"];
            UserManageBLL bll = null;

            Entity.Sys.User info = new Entity.Sys.User();
            try
            {
                bll = BLLFactory.CreateBLL <UserManageBLL>();
                if (string.IsNullOrEmpty(id) == false)
                {
                    info.UserID = id;
                    info        = bll.Get(info);

                    UIBindHelper.BindForm(this.Page, info);
                    this.hiID.Value         = info.UserID;
                    this.HiCREATEUSER.Value = info.CreateUser;
                    this.HiCREATETIME.Value = info.CreateTime.ToString();
                }
                info.WHPowers       = new WHPowerBLL().GetWHPowers(info.UserID);
                this.HiWHList.Value = this.GetWarehouseList(info);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 9
0
        protected void btSave_Click(object sender, EventArgs e)
        {
            InspectDeviceEntity info = new InspectDeviceEntity();
            InspectDeviceBLL    bll  = null;

            try
            {
                UIBindHelper.BindModelByControls(this.Page, info);

                bll = BLLFactory.CreateBLL <InspectDeviceBLL>();

                if (this.hiID.Value == "")
                {
                    bll.Insert(info);
                }
                else
                {
                    info.Id = this.hiID.Value;
                    bll.Update(info);
                }

                ClientScript.RegisterStartupScript(this.GetType(), "myjs", "parent.refreshData();parent.closeAppWindow1();", true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 10
0
        private void BindData()
        {
            string         id   = Request.QueryString["id"];
            CheckStockBLL  bll  = null;
            CheckStockBill info = new CheckStockBill();

            try
            {
                bll = BLLFactory.CreateBLL <CheckStockBLL>();
                if (string.IsNullOrEmpty(id) == false)
                {
                    info.ID = id;
                    info    = bll.GetInfo(info);
                    UIBindHelper.BindForm(this.Page, info);
                    this.hiID.Value         = info.ID;
                    this.HiCREATEUSER.Value = info.CREATEUSER;
                    this.HiCREATETIME.Value = info.CREATETIME.ToString();
                    this.BillDate.Text      = info.BillDate.ToString("yyyy-MM-dd");
                }


                this.IsConfirmName.Text = info.IsConfirm == 0 ? "未确认" : "已确认";

                //绑定明细
                DataGridResult <CheckStockDetail> matList = new DataGridResult <CheckStockDetail>();
                matList.Total = 0;
                matList.Rows  = info.Details;

                this.hiCheckList.Value = matList.GetJsonSource();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 11
0
        protected void btSave_Click(object sender, EventArgs e)
        {
            ProduceTrack    info = new ProduceTrack();
            ProduceTrackBLL bll  = null;

            try
            {
                UIBindHelper.BindModelByControls(this.Page, info);

                bll = BLLFactory.CreateBLL <ProduceTrackBLL>();

                if (this.hiID.Value == "")
                {
                    info.MATID      = this.hiMatID.Value;
                    info.STATUS     = "1";
                    info.WPID       = "start";
                    info.MATBARCODE = this.HiMatBarCode.Value;
                    bll.Insert(info);
                }

                ClientScript.RegisterStartupScript(this.GetType(), "myjs", "alert('原料上线完成');window.location.href='MaterialOnline.aspx';", true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 12
0
        protected void btSave_Click(object sender, EventArgs e)
        {
            WorkGroup    info = new WorkGroup();
            WorkGroupBLL bll  = null;

            try
            {
                UIBindHelper.BindModelByControls(this.Page, info);
                info.Details = LAF.Common.Serialization.JsonConvertHelper.DeserializeObject <List <WorkGroupRef> >(this.hiPList.Value);
                bll          = BLLFactory.CreateBLL <WorkGroupBLL>();

                if (this.hiID.Value == "")
                {
                    bll.Insert(info);
                }
                else
                {
                    info.CREATEUSER = this.HiCREATEUSER.Value;
                    info.CREATETIME = DateTime.Parse(this.HiCREATETIME.Value);
                    info.PID        = this.hiID.Value;
                    bll.Update(info);
                }

                ClientScript.RegisterStartupScript(this.GetType(), "myjs", "parent.refreshData();parent.closeAppWindow1();", true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 13
0
        private void BindData()
        {
            string            id   = Request.QueryString["id"];
            SchedulingInfoBLL bll  = null;
            SchedulingInfo    info = new SchedulingInfo();

            try
            {
                bll = BLLFactory.CreateBLL <SchedulingInfoBLL>();
                if (string.IsNullOrEmpty(id) == false)
                {
                    info.PID = id;
                    info     = bll.Get(info);

                    UIBindHelper.BindForm(this.Page, info);
                    this.hiID.Value         = info.PID;
                    this.HiCREATEUSER.Value = info.CREATEUSER;
                    this.HiCREATETIME.Value = info.CREATETIME.ToString();
                }
                else
                {
                    info = new SchedulingInfo();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 14
0
        private void BindData()
        {
            string            Id   = Request.QueryString["Id"];
            InspectItemBLL    bll  = null;
            InspectItemEntity info = new InspectItemEntity();

            try
            {
                bll = BLLFactory.CreateBLL <InspectItemBLL>();
                if (string.IsNullOrEmpty(Id) == false)
                {
                    info.Id = Id;
                    info    = bll.Get(info);

                    UIBindHelper.BindForm(this.Page, info);
                    this.hiID.Value         = info.Id;
                    this.ItemCode.Text      = info.ItemCode;
                    this.ItemName.Text      = info.ItemName;
                    this.Unit.Text          = info.Unit;
                    this.PointCount.Text    = info.PointCount + "";
                    this.Remark.Text        = info.Remark;
                    this.HiCREATEUSER.Value = info.CreateUser;
                    this.HiCREATETIME.Value = info.CreateTime.ToString();
                }
                else
                {
                    info = new InspectItemEntity();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 15
0
        protected void btSave_Click(object sender, EventArgs e)
        {
            ProducePlan    info = new ProducePlan();
            ProducePlanBLL bll  = null;

            try
            {
                UIBindHelper.BindModelByControls(this.Page, info);

                bll = BLLFactory.CreateBLL <ProducePlanBLL>();

                if (this.hiID.Value == "")
                {
                    bll.Insert(info);
                }
                else
                {
                    info.CREATEUSER = this.HiCREATEUSER.Value;
                    info.CREATETIME = DateTime.Parse(this.HiCREATETIME.Value);
                    info.PID        = this.hiID.Value;
                    bll.Update(info);
                }

                ClientScript.RegisterStartupScript(this.GetType(), "myjs", "parent.refreshData();parent.closeAppWindow1();", true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 16
0
        protected void btReset_Click(object sender, EventArgs e)
        {
            ProduceTrack    info = new ProduceTrack();
            ProduceTrackBLL bll  = null;

            try
            {
                UIBindHelper.BindModelByControls(this.Page, info);

                bll = BLLFactory.CreateBLL <ProduceTrackBLL>();

                info.PID              = this.hiID.Value;
                info.STATUS           = "0";
                info.WPID             = this.hiGX.Value;
                info.EQUID            = this.hiCB.Value;
                info.WSID             = this.hiGW.Value;
                info.PRODUCTIONID     = this.hiPid.Value;
                info.WORKINGSTARTTIME = DateTime.MinValue;
                bll.Update(info);
                BindData(info.PID);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 17
0
        protected void btEnd_Click(object sender, EventArgs e)
        {
            ProduceTrack    info = new ProduceTrack();
            ProduceTrackBLL bll  = null;

            try
            {
                UIBindHelper.BindModelByControls(this.Page, info);

                bll                 = BLLFactory.CreateBLL <ProduceTrackBLL>();
                info.PID            = this.hiID.Value;
                info.WORKINGENDTIME = DateTime.Now;
                info.STATUS         = "1";
                info.WPID           = this.hiGX.Value;
                info.EQUID          = this.hiCB.Value;
                info.WSID           = this.hiGW.Value;
                info.PRODUCTIONID   = this.hiPid.Value;
                info.CREATETIME     = DateTime.Parse(this.HiCREATETIME.Value);
                info.CREATEUSER     = this.HiCREATEUSER.Value;
                bll.Update(info);


                ClientScript.RegisterStartupScript(this.GetType(), "myjs", "alert('完成');window.location.href='MaterialTrace.aspx';", true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 18
0
        private void BindData()
        {
            string        id  = Request.QueryString["id"];
            RoleManageBLL bll = null;

            Entity.Sys.RoleInfo info = new Entity.Sys.RoleInfo();
            try
            {
                bll = BLLFactory.CreateBLL <RoleManageBLL>();
                if (string.IsNullOrEmpty(id) == false)
                {
                    info.RoleID = id;
                    info        = bll.Get(info);

                    UIBindHelper.BindForm(this.Page, info);
                    this.hiID.Value         = info.RoleID;
                    this.HiCREATEUSER.Value = info.CreateUser;
                    this.HiCREATETIME.Value = info.CreateTime.ToString();
                }
                else
                {
                    info        = new RoleInfo();
                    info.Powers = new List <RoleAuthority>();
                }

                this.HiPowerList.Value = this.GetTreePowers(info);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 19
0
        private void BindData()
        {
            string           id   = Request.QueryString["id"];
            OutStockBLL      bll  = null;
            OutStockBillView info = new OutStockBillView();

            try
            {
                bll = BLLFactory.CreateBLL <OutStockBLL>();
                if (string.IsNullOrEmpty(id) == false)
                {
                    info.ID = id;
                    info    = bll.GetViewInfo(info);

                    UIBindHelper.BindForm(this.Page, info);

                    foreach (OutStockDetailView detail in info.Details)
                    {
                        detail.UnitName = string.IsNullOrEmpty(detail.UnitName) == false ? detail.UnitName : detail.MainUnitName;
                        if (detail.OutAmount == 0)
                        {
                            detail.OutAmount = detail.MainUnitAmount;
                            detail.UnitName  = detail.MainUnitName;
                        }
                    }

                    this.GvList.DataSource = info.Details;
                    this.GvList.DataBind();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 20
0
        protected void btSave_Click(object sender, EventArgs e)
        {
            VDPosition    info = new VDPosition();
            VDPositionBLL bll  = null;

            try
            {
                UIBindHelper.BindModelByControls(this.Page, info);

                bll           = BLLFactory.CreateBLL <VDPositionBLL>();
                info.ParentID = this.HiParentID.Value;
                if (this.hiID.Value == "")
                {
                    bll.Insert(info);
                    ClientScript.RegisterStartupScript(this.GetType(), "myjs", "parent.addNode('" + info.ID + "','" + info.PositionName + "');parent.closeAppWindow1();", true);
                }
                else
                {
                    info.CREATEUSER = this.HiCREATEUSER.Value;
                    info.CREATETIME = DateTime.Parse(this.HiCREATETIME.Value);
                    info.ID         = this.hiID.Value;
                    bll.Update(info);
                    ClientScript.RegisterStartupScript(this.GetType(), "myjs", "parent.editNode('" + info.ID + "','" + info.PositionName + "');parent.closeAppWindow1();", true);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 21
0
        protected void btSave_Click(object sender, EventArgs e)
        {
            GoodInfo    info = new GoodInfo();
            GoodInfoBLL bll  = null;

            try
            {
                UIBindHelper.BindModelByControls(this.Page, info);
                bll = BLLFactory.CreateBLL <GoodInfoBLL>();

                //获取生产计划信息
                ProducePlan plan = new ProducePlanBLL().GetByBatchNumber(info.BatchNumber);
                if (plan != null)
                {
                    info.FACTORYPID   = plan.FACTORYPID;
                    info.PRID         = plan.PRID;
                    info.ProductionID = plan.PRODUCTIONID;
                    info.PLANID       = plan.PID;
                }
                //校验是否有漏序
                string result = new ProcessCheckBLL().CheckMissingProcess(info.BatchNumber, info.ProductionID);
                if (result != "")
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "myjs", "alert('" + result + "');", true);
                    return;
                }

                bll.Insert(info);
                ClientScript.RegisterStartupScript(this.GetType(), "myjs", "alert('产品完工下线完成');window.location.href='MaterialOffline.aspx';", true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 22
0
        private void BindData()
        {
            string         id   = Request.QueryString["id"];
            ProducePlanBLL bll  = null;
            ProducePlan    info = new ProducePlan();

            try
            {
                bll = BLLFactory.CreateBLL <ProducePlanBLL>();
                if (string.IsNullOrEmpty(id) == false)
                {
                    info.PID = id;
                    info     = bll.Get(info);

                    UIBindHelper.BindForm(this.Page, info);
                    this.PLANDATE.Text      = info.PLANDATE.ToString("yyyy-MM-dd");
                    this.hiID.Value         = info.PID;
                    this.HiCREATEUSER.Value = info.CREATEUSER;
                    this.HiCREATETIME.Value = info.CREATETIME.ToString();
                }
                else
                {
                    info = new ProducePlan();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 23
0
        private void BindData()
        {
            string          id   = Request.QueryString["id"];
            QualityCheckBLL bll  = null;
            WHQualityCheck  info = new WHQualityCheck();
            DataGridResult <WHQualityCheckResult> pList = new DataGridResult <WHQualityCheckResult>();

            try
            {
                bll = BLLFactory.CreateBLL <QualityCheckBLL>();
                int seq = 1;
                if (string.IsNullOrEmpty(id) == false)
                {
                    info.ID = id;
                    info    = bll.Get(info);

                    UIBindHelper.BindForm(this.Page, info);
                    if (info.CheckResult == "0")
                    {
                        RB1.Checked = true;
                    }
                    else
                    {
                        RB2.Checked = true;
                    }
                    this.BillNoList.Items.Add(new ListItem(info.InStockBillNo, info.BillID));
                    this.BillNoList.SelectedValue = info.BillID;
                    this.BillNoList.Enabled       = false;
                    this.hiID.Value         = info.ID;
                    this.HiCREATEUSER.Value = info.CREATEUSER;
                    this.HiCREATETIME.Value = info.CREATETIME.ToString();
                    List <WHQualityCheckResult> list = bll.GetResultList(id);
                    foreach (WHQualityCheckResult detail in list)
                    {
                        detail.DeleteAction = "deleteF(\'" + detail.FileName + "\')";

                        detail.DetailAction = "viewF(\'" + detail.FileName + "\')";
                        detail.SEQ          = seq++;
                    }
                    pList.Total = list.Count;
                    pList.Rows  = list;
                }
                else
                {
                    info             = new WHQualityCheck();
                    this.BillNO.Text = bll.GetNewBillNO();
                    info.CheckPerson = GetLoginInfo().UserName;
                    pList.Total      = 0;
                    pList.Rows       = new List <WHQualityCheckResult>();
                    UIBindHelper.BindForm(this.Page, info);
                }

                this.hiPList.Value = pList.GetJsonSource();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 24
0
        private void BindData()
        {
            string         id  = Request.QueryString["id"];
            ProcessInfoBLL bll = null;

            Manage.Entity.MES.ProcessInfo info   = new Manage.Entity.MES.ProcessInfo();
            DataGridResult <EquipmentRef> eqList = new DataGridResult <EquipmentRef>();
            DataGridResult <StationRef>   wsList = new DataGridResult <StationRef>();

            try
            {
                bll = BLLFactory.CreateBLL <ProcessInfoBLL>();
                if (string.IsNullOrEmpty(id) == false)
                {
                    info.PID = id;
                    info     = bll.Get(info);

                    UIBindHelper.BindForm(this.Page, info);
                    this.hiID.Value         = info.PID;
                    this.HiCREATEUSER.Value = info.CREATEUSER;
                    this.HiCREATETIME.Value = info.CREATETIME.ToString();
                    List <EquipmentRef> eqlist = bll.GetEList(id);
                    foreach (EquipmentRef item in eqlist)
                    {
                        item.DeleteAction = "deleteEQ('" + item.EQID + "')";
                    }

                    List <StationRef> wslist = bll.GetSList(id);
                    foreach (StationRef item in wslist)
                    {
                        item.DeleteAction = "deleteWS('" + item.STID + "')";
                    }
                    wsList.Total = wslist.Count;
                    wsList.Rows  = wslist;

                    eqList.Total        = eqlist.Count;
                    eqList.Rows         = eqlist;
                    this.HiFLOWID.Value = info.FLOWID;
                }
                else
                {
                    string flowID = Request.QueryString["flowID"];
                    info         = new ProcessInfo();
                    info.FLOWID  = flowID;
                    wsList.Total = 0;
                    wsList.Rows  = new List <StationRef>();
                    eqList.Total = 0;
                    eqList.Rows  = new List <EquipmentRef>();
                }
                this.HiFLOWID.Value = info.FLOWID;
                this.hiWSList.Value = wsList.GetJsonSource();
                this.hiEQList.Value = eqList.GetJsonSource();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 25
0
        private void BindData()
        {
            string              Id   = Request.QueryString["Id"];
            InspectDeviceBLL    bll  = null;
            InspectDeviceEntity info = new InspectDeviceEntity();

            try
            {
                bll = BLLFactory.CreateBLL <InspectDeviceBLL>();
                if (string.IsNullOrEmpty(Id) == false)
                {
                    info.Id = Id;
                    info    = bll.Get(info);

                    UIBindHelper.BindForm(this.Page, info);
                    this.hiID.Value      = info.Id;
                    this.DeviceCode.Text = info.DeviceCode;
                    this.DeviceName.Text = info.DeviceName;
                    this.DeviceIP.Text   = info.DeviceIP;
                    this.DevicePort.Text = info.DevicePort + "";
                    this.LanIP.Text      = info.LanIP;
                    this.LanPort.Text    = info.LanPort + "";
                    if (!"0001/1/1 0:00:00".Equals(info.LastLoginTime + ""))
                    {
                        this.LastLoginTime.Text = info.LastLoginTime + "";
                    }
                    else
                    {
                        this.LastLoginTime.Text = "";
                    }
                    if (!"0001/1/1 0:00:00".Equals(info.LastRegisterTime + ""))
                    {
                        this.LastRegisterTime.Text = info.LastRegisterTime + "";
                    }
                    else
                    {
                        this.LastRegisterTime.Text = "";
                    }
                    this.Lon.Text           = info.Lon + "";
                    this.Lat.Text           = info.Lat + "";
                    this.OrganID.Text       = info.OrganID + "";
                    this.DeviceType.Text    = info.DeviceType + "";
                    this.Remark.Text        = info.Remark;
                    this.HiCREATEUSER.Value = info.CreateUser;
                    this.HiCREATETIME.Value = info.CreateTime.ToString();
                }
                else
                {
                    info = new InspectDeviceEntity();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 26
0
        private void BindData()
        {
            string       id   = Request.QueryString["id"];
            OutStockBLL  bll  = null;
            OutStockBill info = new OutStockBill();

            try
            {
                bll = BLLFactory.CreateBLL <OutStockBLL>();
                if (string.IsNullOrEmpty(id) == false)
                {
                    info.ID      = id;
                    info         = bll.GetInfo(info);
                    info.Details = info.Details.OrderBy(p => p.Seq).ToList();
                    UIBindHelper.BindForm(this.Page, info);
                    this.hiID.Value         = info.ID;
                    this.HiCREATEUSER.Value = info.CREATEUSER;
                    this.HiUPDATEUSER.Value = info.UPDATEUSER;
                    this.HiCREATETIME.Value = info.CREATETIME.ToString();
                    this.btAdd.Visible      = false;
                    this.BillDate.Text      = info.BillDate.ToString("yyyy年MM月dd日");
                }
                else
                {
                    info               = new OutStockBill();
                    info.Details       = new List <OutStockDetail>();
                    this.BillNO.Text   = bll.GetNewBillNO();
                    this.BillDate.Text = DateTime.Now.ToString("yyyy年MM月dd日");
                }

                //绑定明细
                DataGridResult <OutStockDetail> matList = new DataGridResult <OutStockDetail>();
                matList.Total = 0;
                matList.Rows  = info.Details;

                foreach (OutStockDetail detail in info.Details)
                {
                    detail.UnitName    = string.IsNullOrEmpty(detail.UnitName) == false ? detail.UnitName : detail.MainUnitName;
                    detail.OutSpecName = string.IsNullOrEmpty(detail.OutSpecName) == false ? detail.OutSpecName : detail.SpecCode;
                    if (detail.OutAmount == 0)
                    {
                        detail.OutAmount = detail.MainUnitAmount;
                        detail.UnitName  = detail.MainUnitName;
                    }

                    detail.DeleteAction = "none";
                }

                this.hiMatList.Value = matList.GetJsonSource();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 27
0
        private void BindData()
        {
            string        id   = Request.QueryString["id"];
            SupplyInfoBLL bll  = null;
            SupplyInfo    info = new SupplyInfo();

            try
            {
                bll = BLLFactory.CreateBLL <SupplyInfoBLL>();
                if (!string.IsNullOrEmpty(id))
                {
                    info.PID     = id;
                    info         = bll.Get(info);
                    info.Details = bll.GetList(info.PID);
                    UIBindHelper.BindForm(this.Page, info);
                    this.FNAME.Text          = info.FactoryName;
                    this.PDNAME.Text         = info.ProduceName;
                    this.PLNAME.Text         = info.PLName;
                    this.DELIVERYDATE.Text   = info.DELIVERYDATE.ToString("yyyy-MM-dd");
                    this.REMARK.Text         = info.REMARK;
                    this.hiID.Value          = info.PID;
                    this.HiCREATEUSER.Value  = info.CREATEUSER;
                    this.HiCREATETIME.Value  = info.CREATETIME.ToString();
                    this.hiPlanID.Value      = info.PLANID;
                    this.PLNAME.Text         = info.PLName;
                    this.BatchNumber.Visible = true;
                    this.PLANID.Visible      = false;
                }
                else
                {
                    info                     = new SupplyInfo();
                    info.Details             = new List <SupplyMaterialInfo>();
                    this.BatchNumber.Visible = false;
                    this.PLANID.Visible      = true;
                }

                //绑定明细
                DataGridResult <SupplyMaterialInfo> supplyMaterialInfo = new DataGridResult <SupplyMaterialInfo>();
                supplyMaterialInfo.Total = info.Details.Count;
                supplyMaterialInfo.Rows  = info.Details;

                foreach (SupplyMaterialInfo detail in info.Details)
                {
                    detail.DeleteAction = "deleteItem(\'" + detail.MATRIALID + "\')";
                }

                this.hiMaterialList.Value = supplyMaterialInfo.GetJsonSource();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 28
0
        private void BindData(string id)
        {
            ProduceTrackBLL bll  = null;
            ProduceTrack    info = new ProduceTrack();

            try
            {
                bll = BLLFactory.CreateBLL <ProduceTrackBLL>();
                if (string.IsNullOrEmpty(id) == false)
                {
                    info.PID = id;
                    info     = bll.Get(info);
                    UIBindHelper.BindForm(this.Page, info);
                    this.PNAME.Text             = info.PNAME;
                    this.CBNAME.Text            = info.CBNAME;
                    this.GXNAME.Text            = info.GXNAME;
                    this.hiID.Value             = info.PID;
                    this.HiCREATEUSER.Value     = info.CREATEUSER;
                    this.HiCREATETIME.Value     = info.CREATETIME.ToString();
                    this.hiCB.Value             = info.EQUID;
                    this.hiGX.Value             = info.WPID;
                    this.hiPid.Value            = info.PRODUCTIONID;
                    this.WORKINGSTARTTIME.Value = info.WORKINGSTARTTIME.ToString();
                    if (info.WORKINGSTARTTIME != DateTime.MinValue)
                    {
                        this.StartTime.Text   = info.WORKINGSTARTTIME.Hour + ":" + info.WORKINGSTARTTIME.Minute + ":" + info.WORKINGSTARTTIME.Second;
                        this.CurrentTime.Text = DateTime.Now.Hour + ":" + DateTime.Now.Minute + ":" + DateTime.Now.Second;
                        TimeSpan ts1 = new TimeSpan(DateTime.Now.Ticks);
                        TimeSpan ts2 = new TimeSpan(info.WORKINGSTARTTIME.Ticks);
                        TimeSpan ts  = ts1.Subtract(ts2).Duration();
                        this.SpendTime.Text = ts.Hours.ToString() + "小时" + ts.Minutes.ToString() + "分钟" + ts.Seconds.ToString() + "秒";
                    }
                    else
                    {
                        this.StartTime.Text   = "";
                        this.CurrentTime.Text = "";
                        this.SpendTime.Text   = "";
                    }
                }
                else
                {
                    info = new ProduceTrack();
                }
                SetBtnState();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 29
0
        protected void btSave_Click(object sender, EventArgs e)
        {
            Entity.Sys.User info = new Entity.Sys.User();
            UserManageBLL   bll  = null;

            try
            {
                UIBindHelper.BindModelByControls(this.Page, info);
                info.OrganID = this.OrganID.Value;
                bll          = BLLFactory.CreateBLL <UserManageBLL>();

                //绑定权限
                if (this.HiSelectedRoleList.Value != "")
                {
                    string[] roles = this.HiSelectedRoleList.Value.Split(",".ToCharArray());

                    info.Roles = new List <UserRole>();

                    foreach (string roleID in roles)
                    {
                        UserRole r = new UserRole();
                        r.RoleID = roleID;
                        info.Roles.Add(r);
                    }
                }
                else
                {
                    info.Roles = new List <UserRole>();
                }

                if (this.hiID.Value == "")
                {
                    bll.Insert(info);
                }
                else
                {
                    info.CreateUser = this.HiCREATEUSER.Value;
                    info.CreateTime = DateTime.Parse(this.HiCREATETIME.Value);
                    info.UserID     = this.hiID.Value;
                    bll.Update(info);
                }

                ClientScript.RegisterStartupScript(this.GetType(), "myjs", "parent.refreshData();parent.closeAppWindow1();", true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 30
0
        private void BindData()
        {
            string         id   = Request.QueryString["id"];
            CheckStockBLL  bll  = null;
            CheckStockBill info = new CheckStockBill();

            try
            {
                bll = BLLFactory.CreateBLL <CheckStockBLL>();
                if (string.IsNullOrEmpty(id) == false)
                {
                    info.ID = id;
                    info    = bll.GetInfo(info);
                    UIBindHelper.BindForm(this.Page, info);
                    this.hiID.Value         = info.ID;
                    this.HiCREATEUSER.Value = info.CREATEUSER;
                    this.HiCREATETIME.Value = info.CREATETIME.ToString();
                    this.BillDate.Text      = info.BillDate.ToString("yyyy-MM-dd");

                    this.btConfirm.Visible = true;
                    this.btBuild.Visible   = false;
                }
                else
                {
                    info               = new CheckStockBill();
                    info.Details       = new List <CheckStockDetail>();
                    this.BillNO.Text   = bll.GetNewBillNO();
                    this.BillDate.Text = DateTime.Now.ToString("yyyy-MM-dd");

                    LoginInfo user = this.GetLoginInfo();
                    this.CheckHeader.SelectedValue = user.UserID;
                }

                this.IsConfirmName.Text = info.IsConfirm == 0 ? "未确认" : "已确认";

                //绑定明细
                DataGridResult <CheckStockDetail> matList = new DataGridResult <CheckStockDetail>();
                matList.Total = 0;
                matList.Rows  = info.Details.OrderBy(p => p.Seq).ToList();

                this.hiCheckList.Value = matList.GetJsonSource();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }