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);
        }
Beispiel #3
0
 protected override ResultStatus AfterOpen()
 {
     try {
         //決定盤別下拉選單
         daoOCFG = new OCFG();
         if (daoOCFG.f_get_txn_osw_grp(_ProgramID) == "5")
         {
             ddlType.EditValue = "1";
         }
         else
         {
             ddlType.EditValue = "2";
         }
     } catch (Exception ex) {
         throw ex;
     }
     return(ResultStatus.Success);
 }
        private bool SaveFlag;        //用於delete row後, 是曾經執行save function.
        #endregion

        public W40074(string programID, string programName) : base(programID, programName)
        {
            InitializeComponent();
            this.Text        = _ProgramID + "─" + _ProgramName;
            dao40071         = new D40071();
            dao40072         = new D40072();
            dao40074         = new D40074();
            daoMGD2          = new MGD2();
            daoMGD2L         = new MGD2L();
            daoMGRT1         = new MGRT1();
            daoMOCF          = new MOCF();
            daoOCFG          = new OCFG();
            dtFLevel         = daoMGRT1.dddw_mgrt1("F");         //先讀,後面在不同的地方會用到
            dtOLevel         = daoMGRT1.dddw_mgrt1("O");         //先讀,後面在不同的地方會用到
            dtProdType       = dao40071.d_40071_prod_type_ddl(); //先讀,後面在不同的地方會用到
            dtDel            = new DataTable();
            kindIDLookUpEdit = new RepositoryItemLookUpEdit();
            GridHelper.SetCommonGrid(gvMain);
            gvMain.AppearancePrint.BandPanel.Font = new Font("Microsoft YaHei", 10);
            gvMain.AppearancePrint.BandPanel.TextOptions.WordWrap = DevExpress.Utils.WordWrap.Wrap;
            SaveFlag = true;
        }
Beispiel #5
0
        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);
        }