示例#1
0
        /// <summary>
        /// 窗体加载事件错误
        /// </summary>
        private void FrmOrderQuery_Load(object sender, EventArgs e)
        {
            try
            {
                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;

                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);
                //repSearchBussinessBaseNo.DataSource = commonDAO.QueryBussinessBaseInfo(false);
                //repLookUpPurCategory.DataSource = commonDAO.QueryPurCategory(false);
                repLookUpReqDep.DataSource          = departmentTable_t;
                repSearchBussinessBaseNo.DataSource = bussInfoTable_t;
                repLookUpPurCategory.DataSource     = purCateTable_t;
                repSearchProjectNo.DataSource       = commonDAO.QueryProjectList(false);
                repLookUpApprovalType.DataSource    = commonDAO.QueryApprovalType(false);
                repLookUpPayTypeNo.DataSource       = commonDAO.QueryPayType(false);
                repLookUpCreator.DataSource         = searchLookUpCreator.Properties.DataSource;

                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;

                if (SystemInfo.DisableProjectNo)
                {
                    colProjectNo.Visible = false;
                    colStnNo.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);
            }
        }
示例#2
0
        /// <summary>
        /// 窗体加载事件错误
        /// </summary>
        private void FrmOrderQuery_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;
                lookUpPrepared.Properties.DataSource              = commonDAO.QueryUserInfo(true);
                lookUpPrepared.EditValue                          = SystemInfo.user.EmpName;
                searchLookUpBussinessBaseNo.Properties.DataSource = commonDAO.QueryBussinessBaseInfo(true);
                searchLookUpBussinessBaseNo.Text                  = "全部";

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

                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;

                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);
            }
        }