Beispiel #1
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmInventoryAdjustments_Load(object sender, EventArgs e)
        {
            try
            {
                ControlHandler.DevExpressStyle_ChangeControlLocation(btnListAdd.LookAndFeel.ActiveSkinName, new List <Control> {
                    btnListAdd, checkAll
                });

                DateTime nowDate = BaseSQL.GetServerDateTime();
                dateIADateBegin.DateTime = nowDate.Date.AddDays(-SystemInfo.OrderQueryDate_DefaultDays);
                dateIADateEnd.DateTime   = nowDate.Date;

                DataTable repertoryTable         = commonDAO.QueryRepertoryInfo(false);
                DataTable repertoryAddAllTable   = commonDAO.QueryRepertoryInfo(true);
                DataTable projectListAddAllTable = commonDAO.QueryProjectList(true);

                lookUpAdjustmentsRepertoryNo.Properties.DataSource = repertoryAddAllTable;
                lookUpAdjustmentsRepertoryNo.ItemIndex             = 0;
                lookUpReqDep.Properties.DataSource               = commonDAO.QueryDepartment(true);
                lookUpReqDep.ItemIndex                           = 0;
                lookUpPrepared.Properties.DataSource             = commonDAO.QueryUserInfo(true);
                lookUpPrepared.EditValue                         = SystemInfo.user.EmpName;
                searchAdjustmentsProjectNo.Properties.DataSource = projectListAddAllTable;
                searchAdjustmentsProjectNo.Text                  = "全部";

                repLookUpInRepertoryNo.DataSource        = repertoryTable;
                repSearchAdjustmentsProjectNo.DataSource = commonDAO.QueryProjectList(false);
                repLookUpReqDep.DataSource       = commonDAO.QueryDepartment(false);
                repSearchCodeFileName.DataSource = commonDAO.QueryPartsCode(false);
                repSearchOutShelfNo.DataSource   = commonDAO.QueryShelfInfo(false);

                lookUpRepertoryNo.Properties.DataSource     = repertoryAddAllTable;
                lookUpRepertoryNo.ItemIndex                 = 0;
                searchLookUpProjectNo.Properties.DataSource = projectListAddAllTable;
                searchLookUpProjectNo.Text = "全部";
                searchLookUpCodeFileName.Properties.DataSource = commonDAO.QueryPartsCode(true);
                searchLookUpCodeFileName.Text = "全部";

                repLookUpRepertoryNo.DataSource = repertoryTable;

                if (textCommon.Text == "")
                {
                    iaDAO.QueryInventoryAdjustmentsHead(dataSet_IA.Tables[0], "", "", "", "", "", "", "", true);
                    iaDAO.QueryInventoryAdjustmentsList(dataSet_IA.Tables[1], "", true);
                }
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + f.tsmiCtjzsjcw.Text, ex);
            }
        }
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmWarehouseReceipt_Load(object sender, EventArgs e)
        {
            try
            {
                ControlHandler.DevExpressStyle_ChangeControlLocation(btnListAdd.LookAndFeel.ActiveSkinName, new List <Control> {
                    btnListAdd, checkAll
                });

                DateTime nowDate = BaseSQL.GetServerDateTime();
                dateWRDateBegin.DateTime = nowDate.Date.AddDays(-SystemInfo.OrderQueryDate_DefaultDays);
                dateWRDateEnd.DateTime   = nowDate.Date;

                lookUpReqDep.Properties.DataSource                 = commonDAO.QueryDepartment(true);
                lookUpReqDep.ItemIndex                             = 0;
                lookUpRepertoryNo.Properties.DataSource            = commonDAO.QueryRepertoryInfo(true);
                lookUpRepertoryNo.ItemIndex                        = 0;
                lookUpWarehouseReceiptTypeNo.Properties.DataSource = wrDAO.QueryWarehouseReceiptType(true);
                lookUpWarehouseReceiptTypeNo.ItemIndex             = 0;
                comboBoxWarehouseState.SelectedIndex               = 0;
                lookUpPrepared.Properties.DataSource               = commonDAO.QueryUserInfo(true);
                lookUpPrepared.EditValue                           = SystemInfo.user.EmpName;
                lookUpApprover.Properties.DataSource               = commonDAO.QueryUserInfo(true);
                lookUpApprover.ItemIndex                           = -1;
                lookUpManufactureNo.Properties.DataSource          = wrDAO.QueryManufactureInfo(true);
                lookUpManufactureNo.ItemIndex                      = 0;

                repLookUpReqDep.DataSource        = commonDAO.QueryDepartment(false);
                repLookUpRepertoryNo.DataSource   = commonDAO.QueryRepertoryInfo(false);
                repLookUpWRTypeNo.DataSource      = wrDAO.QueryWarehouseReceiptType(false);
                repLookUpApprovalType.DataSource  = commonDAO.QueryApprovalType(false);
                repLookUpManufactureNo.DataSource = wrDAO.QueryManufactureInfo(false);

                repSearchCodeFileName.DataSource = commonDAO.QueryPartsCode(false);
                repSearchShelfId.DataSource      = commonDAO.QueryShelfInfo(false);
                repSearchProjectNo.DataSource    = commonDAO.QueryProjectList(false);

                if (textCommon.Text == "")
                {
                    wrDAO.QueryWarehouseReceiptHead(dataSet_WR.Tables[0], "", "", "", "", "", "", 0, "", -1, "", true);
                    wrDAO.QueryWarehouseReceiptList(dataSet_WR.Tables[1], "", true);
                }
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + f.tsmiCtjzsjcw.Text, ex);
            }
        }
Beispiel #3
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmWarehouseWarrantList_NoSettlement_Load(object sender, EventArgs e)
        {
            try
            {
                DateTime nowDate = BaseSQL.GetServerDateTime();
                dateWWDateBegin.DateTime = nowDate.Date.AddDays(-SystemInfo.OrderQueryDate_DefaultDays);
                dateWWDateEnd.DateTime   = nowDate.Date;

                searchLookUpBussinessBaseNo.Properties.DataSource = commonDAO.QueryBussinessBaseInfo(true);
                searchLookUpBussinessBaseNo.Text                   = "全部";
                lookUpRepertoryNo.Properties.DataSource            = commonDAO.QueryRepertoryInfo(true);
                lookUpRepertoryNo.ItemIndex                        = 0;
                lookUpWarehouseWarrantTypeNo.Properties.DataSource = wwDAO.QueryWarehouseWarrantType(true);
                lookUpWarehouseWarrantTypeNo.ItemIndex             = 0;
                lookUpReqDep.Properties.DataSource                 = commonDAO.QueryDepartment(true);
                lookUpReqDep.ItemIndex = 0;
                comboBoxWarehouseState.SelectedIndex        = 0;
                searchLookUpProjectNo.Properties.DataSource = commonDAO.QueryProjectList(true);
                searchLookUpProjectNo.Text = "全部";
                searchLookUpCodeFileName.Properties.DataSource = commonDAO.QueryPartsCode(true);
                searchLookUpCodeFileName.Text = "全部";

                repLookUpReqDep.DataSource          = commonDAO.QueryDepartment(false);
                repSearchBussinessBaseNo.DataSource = commonDAO.QueryBussinessBaseInfo(false);
                repLookUpRepertoryNo.DataSource     = commonDAO.QueryRepertoryInfo(false);
                repLookUpWWTypeNo.DataSource        = wwDAO.QueryWarehouseWarrantType(false);
                repLookUpShelfId.DataSource         = commonDAO.QueryShelfInfo(false);

                gridBottomOrderHead.pageRowCount = SystemInfo.OrderQueryGrid_PageRowCount;

                btnQuery_Click(null, null);
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + f.tsmiCtjzsjcw.Text, ex);
            }
        }
Beispiel #4
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmWarehouseNowInfo_Load(object sender, EventArgs e)
        {
            try
            {
                lookUpRepertoryNo.Properties.DataSource     = commonDAO.QueryRepertoryInfo(true);
                lookUpRepertoryNo.ItemIndex                 = 0;
                searchLookUpProjectNo.Properties.DataSource = commonDAO.QueryProjectList(true);
                searchLookUpProjectNo.Text = "全部";
                searchLookUpCodeFileName.Properties.DataSource = commonDAO.QueryPartsCode(true);
                searchLookUpCodeFileName.Text           = "全部";
                searchLookUpShelf.Properties.DataSource = commonDAO.QueryShelfInfo(true);
                searchLookUpShelf.EditValue             = 0;

                gridBottomWNowInfo.pageRowCount = SystemInfo.OrderQueryGrid_PageRowCount;

                repLookUpRepertoryNo.DataSource = commonDAO.QueryRepertoryInfo(false);
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + f.tsmiCtjzsjcw.Text, ex);
            }
        }
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmWarehouseWarrantList_NoSettlement_Load(object sender, EventArgs e)
        {
            try
            {
                ControlCommonInit ctlInit = new ControlCommonInit();

                DateTime nowDate = BaseSQL.GetServerDateTime();
                dateWWDateBegin.DateTime = nowDate.Date.AddDays(-SystemInfo.OrderQueryDate_DateIntervalDays);
                dateWWDateEnd.DateTime   = nowDate.Date;

                DataTable departmentTable_t = commonDAO.QueryDepartment(true);
                DataTable bussInfoTable_t   = commonDAO.QueryBussinessBaseInfo(true);
                DataTable repertoryTable_t  = commonDAO.QueryRepertoryInfo(true);
                DataTable wwTypeTable_t     = wwDAO.QueryWarehouseWarrantType(true);

                lookUpReqDep.Properties.DataSource = departmentTable_t;
                lookUpReqDep.ItemIndex             = 0;
                searchLookUpBussinessBaseNo.Properties.DataSource = bussInfoTable_t;
                searchLookUpBussinessBaseNo.Text        = "全部";
                lookUpRepertoryId.Properties.DataSource = repertoryTable_t;
                lookUpRepertoryId.ItemIndex             = 0;
                //SearchLocationId.Properties.DataSource = locationTable_t;
                //SearchLocationId.EditValue = 0;
                ctlInit.SearchLookUpEdit_RepertoryLocationInfo(SearchLocationId, true);
                SearchLocationId.EditValue = 0;
                lookUpWarehouseWarrantTypeNo.Properties.DataSource = wwTypeTable_t;
                lookUpWarehouseWarrantTypeNo.ItemIndex             = 0;
                ctlInit.ComboBoxEdit_WarehouseState(comboBoxWarehouseState, true);
                comboBoxWarehouseState.SelectedIndex = 0;
                //searchLookUpProjectNo.Properties.DataSource = commonDAO.QueryProjectList(true);
                //searchLookUpProjectNo.Text = "全部";
                ctlInit.SearchLookUpEdit_ProjectList(searchLookUpProjectNo, true);
                searchLookUpProjectNo.Text = "全部";
                //searchLookUpCodeFileName.Properties.DataSource = commonDAO.QueryPartsCode(true);
                //searchLookUpCodeFileName.EditValue = 0;
                ctlInit.SearchLookUpEdit_PartsCode(searchLookUpCodeFileName, true);
                searchLookUpCodeFileName.EditValue = 0;

                //repLookUpReqDep.DataSource = commonDAO.QueryDepartment(false);
                //repSearchBussinessBaseNo.DataSource = commonDAO.QueryBussinessBaseInfo(false);
                //repLookUpRepertoryId.DataSource = commonDAO.QueryRepertoryInfo(false);
                //repLookUpRepertoryLocationId.DataSource = commonDAO.QueryRepertoryLocationInfo(false);
                //repLookUpWWTypeNo.DataSource = wwDAO.QueryWarehouseWarrantType(false);
                repLookUpReqDep.DataSource              = departmentTable_t;
                repSearchBussinessBaseNo.DataSource     = bussInfoTable_t;
                repLookUpRepertoryId.DataSource         = repertoryTable_t;
                repLookUpRepertoryLocationId.DataSource = SearchLocationId.Properties.DataSource;
                repLookUpWWTypeNo.DataSource            = wwTypeTable_t;
                repLookUpShelfId.DataSource             = commonDAO.QueryShelfInfo(false);

                if (SystemInfo.DisableProjectNo)
                {
                    labProjectNo.Visible          = false;
                    searchLookUpProjectNo.Visible = false;
                    colProjectName.Visible        = false;
                    colStnNo.Visible = false;
                }

                if (SystemInfo.DisableShelfInfo)
                {
                    colShelfId.Visible = false;
                }

                gridBottomOrderHead.pageRowCount = SystemInfo.OrderQueryGrid_PageRowCount;

                btnQuery_Click(null, null);
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + f.tsmiCtjzsjcw.Text, ex);
            }
        }
Beispiel #6
0
        private DataTable shelfInfoTable_false = null; //不包含全部选项

        /// <summary>
        /// SearchLookUpEdit货架信息控件初始化
        /// </summary>
        public void SearchLookUpEdit_ShelfInfo(SearchLookUpEdit searchLookUp, bool addAllItem, string valueMemberStr = "AutoId", string displayMemberStr = "ShelfNo")
        {
            if (DataTypeConvert.GetString(searchLookUp.Properties.View.Tag) == "Init")
            {
                return;
            }

            GridColumn grdColAutoId = new GridColumn();

            grdColAutoId.Caption   = "AutoId";
            grdColAutoId.FieldName = "AutoId";
            grdColAutoId.Name      = "grdColAutoId";

            GridColumn grdColShelfNo = new GridColumn();

            grdColShelfNo.Caption   = "货架号";
            grdColShelfNo.FieldName = "ShelfNo";
            grdColShelfNo.Name      = "grdColShelfNo";
            grdColShelfNo.AppearanceHeader.Options.UseTextOptions = true;
            grdColShelfNo.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
            grdColShelfNo.Visible      = true;
            grdColShelfNo.VisibleIndex = 0;

            GridColumn grdColShelfLocation = new GridColumn();

            grdColShelfLocation.Caption   = "货架位置";
            grdColShelfLocation.FieldName = "ShelfLocation";
            grdColShelfLocation.Name      = "grdColShelfLocation";
            grdColShelfLocation.AppearanceHeader.Options.UseTextOptions = true;
            grdColShelfLocation.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
            grdColShelfLocation.Visible      = true;
            grdColShelfLocation.VisibleIndex = 1;

            GridColumn grdColLocationName = new GridColumn();

            grdColLocationName.Caption   = "仓位名称";
            grdColLocationName.FieldName = "LocationName";
            grdColLocationName.Name      = "grdColLocationName";
            grdColLocationName.AppearanceHeader.Options.UseTextOptions = true;
            grdColLocationName.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
            grdColLocationName.Visible      = true;
            grdColLocationName.VisibleIndex = 2;

            searchLookUp.Properties.View.Columns.AddRange(new GridColumn[] { grdColAutoId, grdColShelfNo, grdColShelfLocation, grdColLocationName });

            searchLookUp.Properties.NullText      = "";
            searchLookUp.EnterMoveNextControl     = true;
            searchLookUp.Properties.ValueMember   = valueMemberStr;
            searchLookUp.Properties.DisplayMember = displayMemberStr;

            if (addAllItem)
            {
                if (shelfInfoTable_True == null)
                {
                    shelfInfoTable_True = commonDAO.QueryShelfInfo(true);
                }
                searchLookUp.Properties.DataSource = shelfInfoTable_True;
            }
            else
            {
                if (shelfInfoTable_false == null)
                {
                    shelfInfoTable_false = commonDAO.QueryShelfInfo(false);
                }
                searchLookUp.Properties.DataSource = shelfInfoTable_false;
            }

            searchLookUp.Properties.View.IndicatorWidth          = 60;
            searchLookUp.Properties.View.CustomDrawRowIndicator += searchLookUpView_CustomDrawRowIndicator;

            searchLookUp.Properties.View.Tag = "Init";
        }