Esempio n. 1
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmPrReqList_Overplus_Load(object sender, EventArgs e)
        {
            try
            {
                DateTime nowDate = BaseSQL.GetServerDateTime();
                dateReqDateBegin.DateTime = nowDate.Date.AddDays(-SystemInfo.OrderQueryDate_DefaultDays);
                dateReqDateEnd.DateTime   = nowDate.Date;

                lookUpReqDep.Properties.DataSource             = commonDAO.QueryDepartment(true);
                lookUpReqDep.ItemIndex                         = 0;
                lookUpPurCategory.Properties.DataSource        = commonDAO.QueryPurCategory(true);
                lookUpPurCategory.ItemIndex                    = 0;
                searchLookUpProjectNo.Properties.DataSource    = commonDAO.QueryProjectList(true);
                searchLookUpProjectNo.Text                     = "全部";
                searchLookUpCodeFileName.Properties.DataSource = commonDAO.QueryPartsCode(true);
                searchLookUpCodeFileName.Text                  = "全部";
                comboBoxReqState.SelectedIndex                 = 0;

                repLookUpReqDep.DataSource      = commonDAO.QueryDepartment(false);
                repLookUpPurCategory.DataSource = commonDAO.QueryPurCategory(false);
                repLookUpProjectNo.DataSource   = commonDAO.QueryProjectList(false);

                gridBottomPrReq.pageRowCount = SystemInfo.OrderQueryGrid_PageRowCount;

                btnQuery_Click(null, null);
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + tsmiCt.Text, ex);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmPrReqQuery_Load(object sender, EventArgs e)
        {
            try
            {
                lookUpReqDep.Properties.DataSource      = commonDAO.QueryDepartment(true);
                lookUpReqDep.ItemIndex                  = 0;
                lookUpPurCategory.Properties.DataSource = commonDAO.QueryPurCategory(true);
                lookUpPurCategory.ItemIndex             = 0;
                comboBoxReqState.SelectedIndex          = 0;
                lookUpApplicant.Properties.DataSource   = commonDAO.QueryUserInfo(true);
                lookUpApplicant.EditValue               = SystemInfo.user.EmpName;
                repositoryItemLookUpEdit1.DataSource    = commonDAO.QueryDepartment(false);
                repositoryItemLookUpEdit2.DataSource    = commonDAO.QueryPurCategory(false);

                DateTime nowDate = BaseSQL.GetServerDateTime();
                dateReqDateBegin.DateTime = nowDate.Date.AddDays(-SystemInfo.OrderQueryDate_DefaultDays);
                dateReqDateEnd.DateTime   = nowDate.Date;

                gridBottomPrReq.pageRowCount = SystemInfo.OrderQueryGrid_PageRowCount;

                btnQuery_Click(null, null);
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + tsmiCt.Text, ex);
            }
        }
Esempio n. 3
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmOrderApply_Load(object sender, EventArgs e)
        {
            try
            {
                ControlHandler.DevExpressStyle_ChangeControlLocation(checkAll.LookAndFeel.ActiveSkinName, new List <Control> {
                    checkAll
                });

                DateTime nowDate = BaseSQL.GetServerDateTime();
                dateOrderDateBegin.DateTime = nowDate.Date.AddDays(-SystemInfo.OrderQueryDate_DefaultDays);
                dateOrderDateEnd.DateTime   = nowDate.Date;
                checkOrderDate.Checked      = false;

                lookUpReqDep.Properties.DataSource                = commonDAO.QueryDepartment(true);
                lookUpReqDep.ItemIndex                            = 0;
                lookUpPurCategory.Properties.DataSource           = commonDAO.QueryPurCategory(true);
                lookUpPurCategory.ItemIndex                       = 0;
                lookUpPrepared.Properties.DataSource              = commonDAO.QueryUserInfo(true);
                lookUpPrepared.ItemIndex                          = 0;
                searchLookUpProjectNo.Properties.DataSource       = commonDAO.QueryProjectList(true);
                searchLookUpProjectNo.Text                        = "全部";
                searchLookUpBussinessBaseNo.Properties.DataSource = commonDAO.QueryBussinessBaseInfo(true);
                searchLookUpBussinessBaseNo.Text                  = "全部";

                repLookUpReqDep.DataSource          = commonDAO.QueryDepartment(false);
                repLookUpPurCategory.DataSource     = commonDAO.QueryPurCategory(false);
                repSearchBussinessBaseNo.DataSource = commonDAO.QueryBussinessBaseInfo(false);
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + f.tsmiCtjzsjcw.Text, ex);
            }
        }
Esempio n. 4
0
        /// <summary>
        /// 窗体加载事件错误
        /// </summary>
        private void FrmOrderArrivalQuery_Load(object sender, EventArgs e)
        {
            try
            {
                DateTime nowDate = BaseSQL.GetServerDateTime();
                dateOrderDateBegin.DateTime = nowDate.Date.AddDays(-SystemInfo.OrderQueryDate_DateIntervalDays);
                dateOrderDateEnd.DateTime   = nowDate.Date;
                datePlanDateBegin.DateTime  = nowDate.Date;
                datePlanDateEnd.DateTime    = nowDate.Date.AddDays(SystemInfo.OrderQueryDate_DateIntervalDays);
                checkPlanDate.Checked       = false;

                DataTable departmentTable_t = commonDAO.QueryDepartment(true);
                DataTable bussInfoTable_t   = commonDAO.QueryBussinessBaseInfo(true);
                DataTable purCateTable_t    = commonDAO.QueryPurCategory(true);

                lookUpReqDep.Properties.DataSource = departmentTable_t;
                lookUpReqDep.ItemIndex             = 0;
                searchLookUpBussinessBaseNo.Properties.DataSource = bussInfoTable_t;
                searchLookUpBussinessBaseNo.Text        = "全部";
                lookUpPurCategory.Properties.DataSource = purCateTable_t;
                lookUpPurCategory.ItemIndex             = 0;
                //searchLookUpProjectNo.Properties.DataSource = projectTable_t;
                //searchLookUpProjectNo.Text = "全部";
                //searchLookUpCodeFileName.Properties.DataSource = commonDAO.QueryPartsCode(true);
                //searchLookUpCodeFileName.EditValue = 0;

                ControlCommonInit ctlInit = new ControlCommonInit();
                ctlInit.SearchLookUpEdit_PartsCode(searchLookUpCodeFileName, true);
                searchLookUpCodeFileName.EditValue = 0;
                ctlInit.SearchLookUpEdit_ProjectList(searchLookUpProjectNo, true);
                searchLookUpProjectNo.Text = "全部";
                ctlInit.ComboBoxEdit_OrderState_Submit(comboBoxReqState);
                comboBoxReqState.SelectedIndex = 0;

                //repLookUpReqDep.DataSource = commonDAO.QueryDepartment(false);
                //repSearchBussinessBaseNo.DataSource = commonDAO.QueryBussinessBaseInfo(false);
                //repLookUpPurCategory.DataSource = commonDAO.QueryPurCategory(false);
                //repSearchProjectNo.DataSource = commonDAO.QueryProjectList(false);
                repLookUpReqDep.DataSource          = departmentTable_t;
                repSearchBussinessBaseNo.DataSource = bussInfoTable_t;
                repLookUpPurCategory.DataSource     = purCateTable_t;
                repSearchProjectNo.DataSource       = searchLookUpProjectNo.Properties.DataSource;

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

                gridBottomOrderHead.pageRowCount = SystemInfo.OrderQueryGrid_PageRowCount;

                btnQuery_Click(null, null);
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
            }
        }
Esempio n. 5
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmOrderList_NoWarehousing_Days_Load(object sender, EventArgs e)
        {
            try
            {
                DateTime nowDate = BaseSQL.GetServerDateTime();
                dateOrderDateBegin.DateTime = nowDate.Date.AddDays(-SystemInfo.OrderQueryDate_DefaultDays);
                dateOrderDateEnd.DateTime   = nowDate.Date;
                datePlanDateBegin.DateTime  = nowDate.Date;
                datePlanDateEnd.DateTime    = nowDate.Date.AddDays(SystemInfo.OrderQueryDate_DefaultDays);
                checkPlanDate.Checked       = false;

                lookUpReqDep.Properties.DataSource                = commonDAO.QueryDepartment(true);
                lookUpReqDep.ItemIndex                            = 0;
                lookUpPurCategory.Properties.DataSource           = commonDAO.QueryPurCategory(true);
                lookUpPurCategory.ItemIndex                       = 0;
                searchLookUpBussinessBaseNo.Properties.DataSource = commonDAO.QueryBussinessBaseInfo(true);
                searchLookUpBussinessBaseNo.Text                  = "全部";
                comboBoxReqState.SelectedIndex                    = 0;
                searchLookUpProjectNo.Properties.DataSource       = commonDAO.QueryProjectList(true);
                searchLookUpProjectNo.Text                        = "全部";
                searchLookUpCodeFileName.Properties.DataSource    = commonDAO.QueryPartsCode(true);
                searchLookUpCodeFileName.Text                     = "全部";

                repLookUpReqDep.DataSource          = commonDAO.QueryDepartment(false);
                repLookUpPurCategory.DataSource     = commonDAO.QueryPurCategory(false);
                repSearchProjectNo.DataSource       = commonDAO.QueryProjectList(false);
                repSearchBussinessBaseNo.DataSource = commonDAO.QueryBussinessBaseInfo(false);

                gridBottomOrderHead.pageRowCount = SystemInfo.OrderQueryGrid_PageRowCount;

                SetGridViewAppearance();

                btnQuery_Click(null, null);
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + f.tsmiCtjzsjcw.Text, ex);
            }
        }
Esempio n. 6
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmPrReq_Load(object sender, EventArgs e)
        {
            try
            {
                ControlHandler.DevExpressStyle_ChangeControlLocation(btnListAdd.LookAndFeel.ActiveSkinName, new List <Control> {
                    btnListAdd, checkAll
                });

                DateTime nowDate = BaseSQL.GetServerDateTime();
                dateReqDateBegin.DateTime = nowDate.Date.AddDays(-SystemInfo.OrderQueryDate_DefaultDays);
                dateReqDateEnd.DateTime   = nowDate.Date;

                lookUpReqDep.Properties.DataSource      = commonDAO.QueryDepartment(true);
                lookUpReqDep.ItemIndex                  = 0;
                lookUpPurCategory.Properties.DataSource = commonDAO.QueryPurCategory(true);
                lookUpPurCategory.ItemIndex             = 0;
                comboBoxReqState.SelectedIndex          = 0;
                lookUpApplicant.Properties.DataSource   = commonDAO.QueryUserInfo(true);
                lookUpApplicant.EditValue               = SystemInfo.user.EmpName;
                lookUpApprover.Properties.DataSource    = commonDAO.QueryUserInfo(true);
                lookUpApprover.ItemIndex                = -1;

                repLookUpReqDep.DataSource       = commonDAO.QueryDepartment(false);
                repLookUpPurCategory.DataSource  = commonDAO.QueryPurCategory(false);
                repLookUpApprovalType.DataSource = commonDAO.QueryApprovalType(false);
                repSearchProjectNo.DataSource    = commonDAO.QueryProjectList(false);

                repSearchCodeFileName.DataSource = commonDAO.QueryPartsCode(false);

                if (textCommon.Text == "")
                {
                    prReqDAO.QueryPrReqHead(dataSet_PrReq.Tables[0], "", "", "", "", 0, "", -1, "", true);
                }
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + tsmiCtjz.Text, ex);
            }
        }
Esempio n. 7
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmOrderApply_Load(object sender, EventArgs e)
        {
            try
            {
                //ControlHandler.DevExpressStyle_ChangeControlLocation(checkAll.LookAndFeel.ActiveSkinName, new List<Control> { checkAll });

                DateTime nowDate = BaseSQL.GetServerDateTime();
                dateOrderDateBegin.DateTime = nowDate.Date.AddDays(-SystemInfo.OrderQueryDate_DateIntervalDays);
                dateOrderDateEnd.DateTime   = nowDate.Date;
                checkOrderDate.Checked      = false;

                DataTable departmentTable_t = commonDAO.QueryDepartment(true);
                DataTable purCateTable_t    = commonDAO.QueryPurCategory(true);
                DataTable bussInfoTable_t   = commonDAO.QueryBussinessBaseInfo(true);

                lookUpReqDep.Properties.DataSource                = departmentTable_t;
                lookUpReqDep.ItemIndex                            = 0;
                lookUpPurCategory.Properties.DataSource           = purCateTable_t;
                lookUpPurCategory.ItemIndex                       = 0;
                searchLookUpBussinessBaseNo.Properties.DataSource = bussInfoTable_t;
                searchLookUpBussinessBaseNo.Text                  = "全部";
                //searchLookUpProjectNo.Properties.DataSource = commonDAO.QueryProjectList(true);
                //searchLookUpProjectNo.Text = "全部";

                ControlCommonInit ctlInit = new ControlCommonInit();
                ctlInit.SearchLookUpEdit_UserInfo_ValueMember_AutoId(searchLookUpCreator);
                searchLookUpCreator.EditValue = 0;
                ctlInit.SearchLookUpEdit_ProjectList(searchLookUpProjectNo, true);
                searchLookUpProjectNo.Text = "全部";

                //repLookUpReqDep.DataSource = commonDAO.QueryDepartment(false);
                //repLookUpPurCategory.DataSource = commonDAO.QueryPurCategory(false);
                //repSearchBussinessBaseNo.DataSource = commonDAO.QueryBussinessBaseInfo(false);
                repLookUpReqDep.DataSource          = departmentTable_t;
                repLookUpPurCategory.DataSource     = purCateTable_t;
                repSearchBussinessBaseNo.DataSource = bussInfoTable_t;
                repLookUpCreator.DataSource         = searchLookUpCreator.Properties.DataSource;

                if (SystemInfo.DisableProjectNo)
                {
                    labProjectNo.Visible          = false;
                    searchLookUpProjectNo.Visible = false;
                    colProjectName.Visible        = false;
                    colStnNo.Visible = false;
                }
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + f.tsmiCtjzsjcw.Text, ex);
            }
        }
Esempio n. 8
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmPrReqQuery_Load(object sender, EventArgs e)
        {
            try
            {
                DataTable departmentTable_t = commonDAO.QueryDepartment(true);
                DataTable purCateTable_t    = commonDAO.QueryPurCategory(true);

                lookUpReqDep.Properties.DataSource      = departmentTable_t;
                lookUpReqDep.ItemIndex                  = 0;
                lookUpPurCategory.Properties.DataSource = purCateTable_t;
                lookUpPurCategory.ItemIndex             = 0;

                ControlCommonInit ctlInit = new ControlCommonInit();
                ctlInit.SearchLookUpEdit_UserInfo_ValueMember_AutoId(searchLookUpCreator);
                searchLookUpCreator.EditValue = SystemInfo.user.AutoId;
                ctlInit.ComboBoxEdit_OrderState_Submit(comboBoxReqState);
                comboBoxReqState.SelectedIndex = 0;

                //repLookUpReqDep.DataSource = commonDAO.QueryDepartment(false);
                //repLookUpPurCategory.DataSource = commonDAO.QueryPurCategory(false);
                repLookUpReqDep.DataSource      = departmentTable_t;
                repLookUpPurCategory.DataSource = purCateTable_t;
                repLookUpCreator.DataSource     = searchLookUpCreator.Properties.DataSource;

                DateTime nowDate = BaseSQL.GetServerDateTime();
                dateReqDateBegin.DateTime = nowDate.Date.AddDays(-SystemInfo.OrderQueryDate_DateIntervalDays);
                dateReqDateEnd.DateTime   = nowDate.Date;

                if (SystemInfo.DisableProjectNo)
                {
                    colProjectNo.Visible = false;
                    colStnNo.Visible     = false;
                }

                gridBottomPrReq.pageRowCount = SystemInfo.OrderQueryGrid_PageRowCount;

                btnQuery_Click(null, null);
            }
            catch (Exception ex)
            {
                //ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
                ExceptionHandler.HandleException(this.Text + "--" + tsmiCt.Text, ex);
            }
        }
Esempio n. 9
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmPSBomToPrReq_Load(object sender, EventArgs e)
        {
            try
            {
                textPbBomNo.Text = pbBomNoStr;

                lookUpReqDep.Properties.DataSource = commonDAO.QueryDepartment(false);
                lookUpReqDep.EditValue             = SystemInfo.user.DepartmentNo;

                searchLookUpProjectNo.Properties.DataSource = commonDAO.QueryProjectList(false);
                searchLookUpProjectNo.Text = projectNoStr;

                DataTable tempTable = commonDAO.QueryStnList(projectNoStr);
                searchLookUpStnNo.Properties.DataSource = tempTable;
                if (tempTable.Rows.Count > 0)
                {
                    searchLookUpStnNo.EditValue = tempTable.Rows[0]["StnNo"];
                }

                lookUpPurCategory.Properties.DataSource = commonDAO.QueryPurCategory(false);
                lookUpPurCategory.ItemIndex             = 0;

                lookUpEditApprovalType.Properties.DataSource = commonDAO.QueryApprovalType(false);
                lookUpEditApprovalType.ItemIndex             = 0;

                DataTable psBomTable = PStoPRDAO.Query_NoPr_PSBom(pbBomNoStr, bomListAutoIdInt);
                gridControlPSBom.DataSource = psBomTable;
                if (psBomTable.Rows.Count == 0)
                {
                    MessageHandler.ShowMessageBox("当前选中的制作Bom信息没有生产计划,不能生成请购单。");
                    this.Close();
                    return;
                }
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
            }
        }