/// <summary> /// 窗体加载事件 /// </summary> private void FrmInventoryAdjustmentsQuery_Load(object sender, EventArgs e) { try { DateTime nowDate = BaseSQL.GetServerDateTime(); dateIADateBegin.DateTime = nowDate.Date.AddDays(-SystemInfo.OrderQueryDate_DefaultDays); dateIADateEnd.DateTime = nowDate.Date; lookUpAdjustmentsRepertoryNo.Properties.DataSource = commonDAO.QueryRepertoryInfo(true); 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 = commonDAO.QueryProjectList(true); searchAdjustmentsProjectNo.Text = "全部"; repLookUpInRepertoryNo.DataSource = commonDAO.QueryRepertoryInfo(false); repSearchAdjustmentsProjectNo.DataSource = commonDAO.QueryProjectList(false); repLookUpReqDep.DataSource = commonDAO.QueryDepartment(false); gridBottomIA.pageRowCount = SystemInfo.OrderQueryGrid_PageRowCount; btnQuery_Click(null, null); } catch (Exception ex) { //ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex); ExceptionHandler.HandleException(this.Text + "--" + f.tsmiCtjzsjcw.Text, ex); } }
/// <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); } }
/// <summary> /// 窗体加载事件 /// </summary> private void FrmPrReqApply_Load(object sender, EventArgs e) { try { ControlHandler.DevExpressStyle_ChangeControlLocation(checkAll.LookAndFeel.ActiveSkinName, new List <Control> { checkAll }); DateTime nowDate = BaseSQL.GetServerDateTime(); dateReqDateBegin.DateTime = nowDate.Date.AddDays(-SystemInfo.OrderQueryDate_DefaultDays); dateReqDateEnd.DateTime = nowDate.Date; checkReqDate.Checked = false; lookUpReqDep.Properties.DataSource = commonDAO.QueryDepartment(true); lookUpReqDep.ItemIndex = 0; lookUpPurCategory.Properties.DataSource = commonDAO.QueryPurCategory(true); lookUpPurCategory.ItemIndex = 0; lookUpApplicant.Properties.DataSource = commonDAO.QueryUserInfo(true); lookUpApplicant.ItemIndex = 0; searchLookUpProjectNo.Properties.DataSource = commonDAO.QueryProjectList(true); searchLookUpProjectNo.Text = "全部"; repLookUpReqDep.DataSource = commonDAO.QueryDepartment(false); repLookUpPurCategory.DataSource = commonDAO.QueryPurCategory(false); repSearchProjectNo.DataSource = commonDAO.QueryProjectList(false); } catch (Exception ex) { //ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex); ExceptionHandler.HandleException(this.Text + "--" + tsmiCt.Text, ex); } }
/// <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 FrmSalesOrder_History_Load(object sender, EventArgs e) { try { DataTable bussBaseTable = commonDAO.QueryBussinessBaseInfo(false); searchProjectName.Properties.DataSource = commonDAO.QueryProjectList(false); searchBussinessBaseNo.Properties.DataSource = bussBaseTable; lookUpCollectionTypeNo.Properties.DataSource = commonDAO.QueryCollectionType(false); lookUpCurrencyCate.Properties.DataSource = commonDAO.QueryCurrencyCate(false); lookUpProjectLeader.Properties.DataSource = commonDAO.QueryUserInfo(false); DateTime nowDate = BaseSQL.GetServerDateTime(); repSearchBussinessBaseNo.DataSource = bussBaseTable; dateSalesOrderDateBegin.DateTime = nowDate.Date.AddDays(-SystemInfo.OrderQueryDate_DefaultDays); dateSalesOrderDateEnd.DateTime = nowDate.Date; searchLookUpBussinessBaseNo.Properties.DataSource = commonDAO.QueryBussinessBaseInfo(true); searchLookUpBussinessBaseNo.Text = "全部"; repSearchLookUpBussinessBaseNo.DataSource = bussBaseTable; Set_ButtonEditGrid_State(true); } catch (Exception ex) { ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex); } }
/// <summary> /// 窗体加载事件 /// </summary> private void FrmSalesOrderQuery_Load(object sender, EventArgs e) { try { DateTime nowDate = BaseSQL.GetServerDateTime(); dateSalesOrderDateBegin.DateTime = nowDate.Date.AddDays(-SystemInfo.OrderQueryDate_DefaultDays); dateSalesOrderDateEnd.DateTime = nowDate.Date; searchLookUpBussinessBaseNo.Properties.DataSource = commonDAO.QueryBussinessBaseInfo(true); searchLookUpBussinessBaseNo.Text = "全部"; searchProjectNo.Properties.DataSource = commonDAO.QueryProjectList(true); searchProjectNo.Text = "全部"; lookUpPrepared.Properties.DataSource = commonDAO.QueryUserInfo(true); lookUpPrepared.EditValue = SystemInfo.user.EmpName; repSearchBussinessBaseNo.DataSource = commonDAO.QueryBussinessBaseInfo(false); repLookUpCollectionTypeNo.DataSource = commonDAO.QueryCollectionType(false); gridBottomOrderHead.pageRowCount = SystemInfo.OrderQueryGrid_PageRowCount; gridBottomOrderHead.pageRowCount = 5; btnQuery_Click(null, null); } catch (Exception ex) { ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex); } }
/// <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); } }
/// <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); } }
/// <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); } }
/// <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); } }
/// <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); } }
/// <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); } }
/// <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 FrmStnList_Load(object sender, EventArgs e) { try { searchLookUpProjectNo.Properties.DataSource = commonDAO.QueryProjectList(false); if (editForm == null) { editForm = new FrmBaseEdit(); editForm.FormBorderStyle = FormBorderStyle.None; editForm.TopLevel = false; editForm.TableName = "BS_StnList"; editForm.TableCaption = "站号"; SetEditFormSQL(); editForm.PrimaryKeyColumn = "AutoID"; editForm.MasterDataSet = dSStnList; editForm.MasterBindingSource = bSStnList; editForm.MasterEditPanel = pnlEdit; editForm.PrimaryKeyControl = textStnNo; editForm.OtherNoChangeControl = new List <Control>() { searchLookUpProjectNo }; editForm.BrowseXtraGridView = gridViewStnList; editForm.CheckControl += CheckControl; this.pnlToolBar.Controls.Add(editForm); editForm.Dock = DockStyle.Fill; editForm.Show(); } } catch (Exception ex) { //ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex); ExceptionHandler.HandleException(this.Text + "--" + f.tsmiCtjzsjcw.Text, ex); } }
/// <summary> /// 窗体加载事件 /// </summary> private void FrmQueryStockDurationTotal_Load(object sender, EventArgs e) { try { DateTime nowDate = BaseSQL.GetServerDateTime(); dateDurBegin.DateTime = nowDate.Date.AddDays(-SystemInfo.OrderQueryDate_DefaultDays); dateDurEnd.DateTime = nowDate.Date; 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 = "全部"; gridBottomWNowInfo.pageRowCount = SystemInfo.OrderQueryGrid_PageRowCount; repLookUpRepertoryNo.DataSource = commonDAO.QueryRepertoryInfo(false); } catch (Exception ex) { ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex); } }
private DataTable projectListTable_false = null; //不包含全部选项 /// <summary> /// SearchLookUpEdit项目信息控件初始化 /// </summary> public void SearchLookUpEdit_ProjectList(SearchLookUpEdit searchLookUp, bool addAllItem, string valueMemberStr = "ProjectNo", string displayMemberStr = "ProjectName") { if (DataTypeConvert.GetString(searchLookUp.Properties.View.Tag) == "Init") { return; } GridColumn grdColAutoId = new GridColumn(); grdColAutoId.Caption = "AutoId"; grdColAutoId.FieldName = "AutoId"; grdColAutoId.Name = "grdColAutoId"; GridColumn grdColProjectNo = new GridColumn(); grdColProjectNo.Caption = "项目号"; grdColProjectNo.FieldName = "ProjectNo"; grdColProjectNo.Name = "grdColProjectNo"; grdColProjectNo.AppearanceHeader.Options.UseTextOptions = true; grdColProjectNo.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; grdColProjectNo.Visible = true; grdColProjectNo.VisibleIndex = 0; GridColumn grdColProjectName = new GridColumn(); grdColProjectName.Caption = "项目名称"; grdColProjectName.FieldName = "ProjectName"; grdColProjectName.Name = "grdColProjectName"; grdColProjectName.AppearanceHeader.Options.UseTextOptions = true; grdColProjectName.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; grdColProjectName.Visible = true; grdColProjectName.VisibleIndex = 1; GridColumn grdColRemark = new GridColumn(); grdColRemark.Caption = "备注"; grdColRemark.FieldName = "Remark"; grdColRemark.Name = "grdColRemark"; grdColRemark.AppearanceHeader.Options.UseTextOptions = true; grdColRemark.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; grdColRemark.Visible = true; grdColRemark.VisibleIndex = 2; searchLookUp.Properties.View.Columns.AddRange(new GridColumn[] { grdColAutoId, grdColProjectNo, grdColProjectName, grdColRemark }); searchLookUp.Properties.NullText = ""; searchLookUp.EnterMoveNextControl = true; searchLookUp.Properties.ValueMember = valueMemberStr; searchLookUp.Properties.DisplayMember = displayMemberStr; if (addAllItem) { if (projectListTable_True == null) { projectListTable_True = commonDAO.QueryProjectList(true); } searchLookUp.Properties.DataSource = projectListTable_True; } else { if (projectListTable_false == null) { projectListTable_false = commonDAO.QueryProjectList(false); } searchLookUp.Properties.DataSource = projectListTable_false; } searchLookUp.Properties.View.IndicatorWidth = 60; searchLookUp.Properties.View.CustomDrawRowIndicator += searchLookUpView_CustomDrawRowIndicator; searchLookUp.Properties.View.Tag = "Init"; }