Esempio n. 1
0
        protected override ResultStatus Open()
        {
            base.Open();

            #region 處理下拉選單

            dwSbrkno.Properties.DataSource    = daoABRK.ListAll2();
            dwSbrkno.Properties.ValueMember   = "ABRK_NO";
            dwSbrkno.Properties.DisplayMember = "CP_DISPLAY";
            dwSbrkno.Properties.ShowHeader    = false;
            dwSbrkno.Properties.ShowFooter    = false;
            dwSbrkno.Properties.NullText      = "";
            dwSbrkno.Properties.SearchMode    = SearchMode.OnlyInPopup;
            dwSbrkno.Properties.TextEditStyle = TextEditStyles.Standard;
            //讓下拉選單只剩單一欄位
            LookUpColumnInfoCollection singleCol = dwSbrkno.Properties.Columns;
            singleCol.Add(new LookUpColumnInfo("CP_DISPLAY"));
            dwSbrkno.Properties.BestFitMode = BestFitMode.BestFitResizePopup;

            dwEbrkno.Properties.DataSource    = daoABRK.ListAll2();
            dwEbrkno.Properties.ValueMember   = "ABRK_NO";
            dwEbrkno.Properties.DisplayMember = "CP_DISPLAY";
            dwEbrkno.Properties.ShowHeader    = false;
            dwEbrkno.Properties.ShowFooter    = false;
            dwEbrkno.Properties.NullText      = "";
            dwEbrkno.Properties.SearchMode    = SearchMode.OnlyInPopup;
            dwEbrkno.Properties.TextEditStyle = TextEditStyles.Standard;
            //讓下拉選單只剩單一欄位
            LookUpColumnInfoCollection singleCol2 = dwEbrkno.Properties.Columns;
            singleCol2.Add(new LookUpColumnInfo("CP_DISPLAY"));
            dwEbrkno.Properties.BestFitMode = BestFitMode.BestFitResizePopup;

            dwProdCond.Properties.DataSource    = dao56010.dw_prod_cond();
            dwProdCond.Properties.ValueMember   = "PARAM_KEY";
            dwProdCond.Properties.DisplayMember = "CP_DISPLAY";
            dwProdCond.Properties.ShowHeader    = false;
            dwProdCond.Properties.ShowFooter    = false;
            dwProdCond.Properties.NullText      = "";
            dwProdCond.Properties.SearchMode    = SearchMode.OnlyInPopup;
            dwProdCond.Properties.TextEditStyle = TextEditStyles.Standard;
            //讓下拉選單只剩單一欄位
            LookUpColumnInfoCollection singleCol3 = dwProdCond.Properties.Columns;
            singleCol3.Add(new LookUpColumnInfo("CP_DISPLAY"));
            dwProdCond.Properties.BestFitMode = BestFitMode.BestFitResizePopup;
            dwProdCond.EditValue = "全部";

            #endregion

            return(ResultStatus.Success);
        }
Esempio n. 2
0
        protected override ResultStatus Open()
        {
            try {
                base.Open();
                txtEDate.DateTimeValue = GlobalInfo.OCF_DATE;
                txtSDate.EditValue     = txtEDate.Text.SubStr(0, 8) + "01";
#if DEBUG
                txtSDate.Text = "2017/11/17";
                txtEDate.Text = "2017/11/17";
#endif
                txtSDate.Focus();

                //KS期貨商下拉選單
                //使用期貨商下拉選單
                daoABRK = new ABRK();
                DataTable dtABRK = daoABRK.ListAll2();
                Extension.SetDataTable(dwFcmKs, dtABRK, "ABRK_NO", "CP_DISPLAY", TextEditStyles.DisableTextEditor, "");
                Extension.SetDataTable(dwFcmIn, dtABRK, "ABRK_NO", "CP_DISPLAY", TextEditStyles.DisableTextEditor, "");
                dwFcmKs.Properties.DropDownRows     =
                    dwFcmIn.Properties.DropDownRows = dtABRK.Rows.Count;
            } catch (Exception ex) {
                throw ex;
            }
            return(ResultStatus.Success);
        }
Esempio n. 3
0
        protected override ResultStatus Open()
        {
            base.Open();

            /*******************
            *  Input Condition
            *******************/
            //GlobalInfo.OCF_DATE = serviceCommon.GetOCF().OCF_DATE;
            emEndDate.DateTimeValue   = GlobalInfo.OCF_DATE;
            emStartDate.DateTimeValue = new DateTime(GlobalInfo.OCF_DATE.Year, GlobalInfo.OCF_DATE.Month, 01);
            emStartYM.DateTimeValue   = GlobalInfo.OCF_DATE;
            emEndYM.DateTimeValue     = GlobalInfo.OCF_DATE;
            /* 造市者代號 */
            //起始選項
            dwSbrkno.SetDataTable(daoABRK.ListAll2(), "ABRK_NO", "CP_DISPLAY", TextEditStyles.Standard, null);
            //目的選項
            dwEbrkno.SetDataTable(daoABRK.ListAll2(), "ABRK_NO", "CP_DISPLAY", TextEditStyles.Standard, null);

            string marketcodefilter = "MARKET_CODE in ('1',' ')";

            /* 商品群組 */
            ProdCtData = daoAPDK.ListParamKey();
            dwProdCt.SetDataTable(ProdCtData, "APDK_PARAM_KEY", "APDK_PARAM_KEY", TextEditStyles.Standard, null);
            ProdCtCodeFilter = ProdCtData.Filter(marketcodefilter);
            /* 造市商品 */
            ProdKdData = daoAPDK.ListAll3();
            dwProdKd.SetDataTable(ProdKdData, "PDK_KIND_ID", "PDK_KIND_ID", TextEditStyles.Standard, null);
            ProdKdDataFilter = ProdKdData.Filter(marketcodefilter);
            /* 2碼商品 */
            ProdKdStoData = daoAPDK.ListKind2();
            dwProdKdSto.SetDataTable(ProdKdStoData, "APDK_KIND_ID_STO", "APDK_KIND_ID_STO", TextEditStyles.Standard, null);
            ProdKdStoDataFilter = ProdKdStoData.Filter(marketcodefilter);
            //預設資料表
            _D500Xx.TableName = "AMM0";

            _D500Xx.GbGroup = gbGroup.EditValue.ToString();

            gbGroup.EditValueChanged  += gbGroup_EditValueChanged;
            gbDetial.EditValueChanged += gbDetial_EditValueChanged;
            gbMarket.EditValueChanged += gbMarket_EditValueChanged;
            return(ResultStatus.Success);
        }
Esempio n. 4
0
        protected override ResultStatus Open()
        {
            base.Open();
            //Input Condition
            emEndYM.DateTimeValue   = GlobalInfo.OCF_DATE.AddMonths(-1);
            emStartYM.DateTimeValue = emEndYM.DateTimeValue.AddMonths(-1);
            /* 造市者代號 */
            //起始選項
            dwSbrkno.SetDataTable(daoABRK.ListAll2(), "ABRK_NO", "CP_DISPLAY", TextEditStyles.Standard, null);
            //目的選項
            dwEbrkno.SetDataTable(daoABRK.ListAll2(), "ABRK_NO", "CP_DISPLAY", TextEditStyles.Standard, null);
            /* 商品群組 */
            dwProdCt.SetDataTable(daoAPDK.ListParamKey(), "APDK_PARAM_KEY", "APDK_PARAM_KEY", TextEditStyles.Standard, null);
            /* 2碼商品 */
            dwProdKdSto.SetDataTable(daoAPDK.ListKind2(), "APDK_KIND_ID_STO", "APDK_KIND_ID_STO", TextEditStyles.Standard, null);
            //預設資料表
            _D500Xx.TableName = "AMM0";

            return(ResultStatus.Success);
        }