public W40040(string programID, string programName) : base(programID, programName) { InitializeComponent(); this.Text = _ProgramID + "─" + _ProgramName; //預設交易時段 OCFG daoOCFG = new OCFG(); oswGrpLookItem.SetDataTable(daoOCFG.ListAll(), "OSW_GRP", "OSW_GRP_NAME", DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor, null); oswGrpLookItem.EditValue = daoOCFG.f_gen_osw_grp(); }
protected override ResultStatus Open() { base.Open(); txtDate.DateTimeValue = DateTime.Now; txtDate.Focus(); dao40014 = new D40014(); //預設交易時段 OCFG daoOCFG = new OCFG(); oswGrpLookItem.SetDataTable(daoOCFG.ListAllTime(), "OSW_GRP", "OSW_GRP_NAME", DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor, null); oswGrpLookItem.EditValue = daoOCFG.f_gen_osw_grp(); return(ResultStatus.Success); }
protected override ResultStatus Open() { try { base.Open(); txtSDate.DateTimeValue = DateTime.Now; txtSDate.Focus(); #if DEBUG txtSDate.Text = "2018/11/15"; #endif //設定商品交易時段下拉選單 List <LookupItem> ddlOswGrp = new List <LookupItem>() { new LookupItem() { ValueMember = "1", DisplayMember = "Group1 (13:45)" }, new LookupItem() { ValueMember = "5", DisplayMember = "Group2 (16:15)" }, new LookupItem() { ValueMember = "%", DisplayMember = "ALL" } }; Extension.SetDataTable(dwOswGrp, ddlOswGrp, "ValueMember", "DisplayMember", TextEditStyles.DisableTextEditor, ""); //從共用方法取得商品交易時段 daoOCFG = new OCFG(); dwOswGrp.EditValue = daoOCFG.f_gen_osw_grp(); } catch (Exception ex) { throw ex; } return(ResultStatus.Success); }