示例#1
0
文件: FrmPoEdit.cs 项目: uwitec/wms-1
        /// <summary>
        /// 处理控件及内容的初始化,对于下拉列表默认选中第一个
        /// </summary>
        void InitUI()
        {
            try
            {
                //绑定供应商
                List <SupplierEntity> suppliers = new SupplierDal().ListActiveSupplierByPriority();
                listSupplier.Properties.DataSource = suppliers;
                if (suppliers.Count > 0)
                {
                    listSupplier.EditValue = suppliers[0].SupplierCode;
                }

                //绑定采购业务员
                UserDal userDal = new UserDal();
                listSales.Properties.DataSource = userDal.ListUsersByRoleAndOrgCode(GlobeSettings.LoginedUser.OrgCode, GlobeSettings.POSalesRoleName);

                //绑定业务类型并默认选中第一个
                List <BaseCodeEntity> instoreTypes = BaseCodeDal.GetItemList(BaseCodeConstant.PO_TYPE);
                listBillType.Properties.DataSource = instoreTypes;
                if (instoreTypes.Count > 0)
                {
                    listBillType.EditValue = instoreTypes[0].ItemValue;
                }

                //明细表格默认绑定到LineEntity集合
                bindingSource1.DataSource = new List <PODetailEntity>();
            }
            catch (Exception ex)
            {
                MsgBox.Err(ex.Message);
            }
        }
示例#2
0
        public void LoadDataSource()
        {
            if (hasLoadData)
            {
                return;
            }

            hasLoadData = true;

            dateEditFrom.DateTime = DateTime.Now.AddMonths(-1);
            dateEditTo.DateTime   = DateTime.Now;

            try
            {
                //绑定供应商
                listSuppliers.Properties.DataSource = new SupplierDal().ListActiveSupplierByPriority();

                //绑定采购业务员
                listSales.Properties.DataSource = new UserDal().ListUsersByRoleAndOrgCode(GlobeSettings.LoginedUser.OrgCode, GlobeSettings.POSalesRoleName);

                //绑定单据类型并默认选中第一个
                listBillTypes.Properties.DataSource = BaseCodeDal.GetItemList(BaseCodeConstant.PO_TYPE);

                //绑定单据状态
                listBillStates.Properties.DataSource = BaseCodeDal.GetItemList(BaseCodeConstant.PO_STATE);
            }
            catch (Exception ex)
            {
                MsgBox.Err(ex.Message);
            }
        }
示例#3
0
        /// <summary>
        /// 默认系统加载一月内的单据
        /// </summary>
        private void InitUI()
        {
            dateEditFrom.DateTime = System.DateTime.Now.AddMonths(-1);
            dateEditTo.DateTime   = System.DateTime.Now;

            listSupplers.Properties.DataSource    = new SupplierDal().ListActiveSupplierByPriority();
            listAsnState.Properties.DataSource    = BaseCodeDal.GetItemList(BaseCodeConstant.ASN_STATE);
            listAsnType.Properties.DataSource     = BaseCodeDal.GetItemList(BaseCodeConstant.PO_TYPE);
            listInstoreType.Properties.DataSource = BaseCodeDal.GetItemList(BaseCodeConstant.INSTORE_TYPE);
        }
示例#4
0
 private void OnFrmLoad(object sender, EventArgs e)
 {
     try
     {
         listInstoreType.Properties.DataSource = BaseCodeDal.GetItemList(BaseCodeConstant.OUTSTORE_TYPE);
         lblBillNO.Text            = this.Entity.BillNO;
         listInstoreType.EditValue = this.Entity.OutstoreType;
     }
     catch (Exception ex)
     {
         MsgBox.Err(ex.Message);
     }
 }
示例#5
0
文件: FrmPoList.cs 项目: uwitec/wms-1
        private void OnFormLoad(object sender, EventArgs e)
        {
            dateEditFrom.DateTime = DateTime.Now.AddMonths(-1);
            dateEditTo.DateTime   = DateTime.Now;

            try
            {
                CustomFields.AppendMaterialFields(gvHeader);

                //绑定供应商
                listSupplier.Properties.DataSource = new SupplierDal().ListActiveSupplierByPriority();

                //绑定采购业务员
                listSales.Properties.DataSource = new UserDal().ListUsersByRoleAndOrgCode(GlobeSettings.LoginedUser.OrgCode, GlobeSettings.POSalesRoleName);

                //绑定业务类型
                listBillType.Properties.DataSource = BaseCodeDal.GetItemList(BaseCodeConstant.PO_TYPE);
            }
            catch (Exception ex)
            {
                MsgBox.Err(ex.Message);
            }
        }
示例#6
0
 /// <summary>
 /// 绑定页面下拉列表
 /// </summary>
 private void BindLookUpControl()
 {
     //单据状态
     listBillState.Properties.DataSource = BaseCodeDal.GetItemList(BaseCodeConstant.ASN_STATE);
 }
示例#7
0
文件: FrmMain.cs 项目: uwitec/wms-1
        private void LoadData()
        {
            try
            {
                //加载权重系数
                List <BaseCodeEntity> listWeightRaido = BaseCodeDal.GetItemList(BaseCodeConstant.WEIGHT_RAIDO);
                foreach (BaseCodeEntity baseCode in listWeightRaido)
                {
                    switch (baseCode.ItemDesc)
                    {
                    case "正常拣货系数":
                        GlobalSettings.NormalPickRatio = ConvertUtil.ToDecimal(baseCode.ItemValue.Length >= 2 ? baseCode.ItemValue.Substring(1) : "0");
                        break;

                    case "批示拣货系数":
                        GlobalSettings.MostPickRatio = ConvertUtil.ToDecimal(baseCode.ItemValue.Length >= 2 ? baseCode.ItemValue.Substring(1) : "0");
                        break;

                    case "司机配送系数(箱货)":
                        GlobalSettings.DispatchingRatio1_221 = ConvertUtil.ToDecimal(baseCode.ItemValue.Length >= 2 ? baseCode.ItemValue.Substring(1) : "0");
                        break;

                    case "司机配送系数(金杯)":
                        GlobalSettings.DispatchingRatio1_220 = ConvertUtil.ToDecimal(baseCode.ItemValue.Length >= 2 ? baseCode.ItemValue.Substring(1) : "0");
                        break;

                    case "司机助理配送系数":
                        GlobalSettings.DispatchingRatio2 = ConvertUtil.ToDecimal(baseCode.ItemValue.Length >= 2 ? baseCode.ItemValue.Substring(1) : "0");
                        break;

                    case "装车系数":
                        GlobalSettings.LoadingRatio = ConvertUtil.ToDecimal(baseCode.ItemValue.Length >= 2 ? baseCode.ItemValue.Substring(1) : "0");
                        break;

                    case "叉车系数":
                        GlobalSettings.ForkliftRatio = ConvertUtil.ToDecimal(baseCode.ItemValue.Length >= 2 ? baseCode.ItemValue.Substring(1) : "0");
                        break;

                    default:
                        break;
                    }
                }
                //加载大屏窗体
                frmTask.Visible         = true;
                frmTask.Dock            = DockStyle.Fill;
                frmTask.FormBorderStyle = FormBorderStyle.None;
                frmTask.TopLevel        = false;
                xtraTabPage1.Controls.Add(frmTask);

                frmEfficiency.Visible         = true;
                frmEfficiency.Dock            = DockStyle.Fill;
                frmEfficiency.FormBorderStyle = FormBorderStyle.None;
                frmEfficiency.TopLevel        = false;
                xtraTabPage2.Controls.Add(frmEfficiency);

                xtraTabControl1.SelectedTabPageIndex = 0;
                timeChange.Enabled = true;
            }
            catch (Exception ex)
            {
                MsgBox.Err(ex.Message);
            }
        }
示例#8
0
 private void BindiReturnReason()
 {
     listReturnReason.Properties.DataSource = BaseCodeDal.GetItemList(BaseCodeConstant.RETURN_REASON);
 }