Esempio n. 1
0
        private void DoMarketTimeDifferentSeting()
        {
            string marktCodeFilter = "AND APDK_MARKET_CODE in ('1',' ')";

            if (radioMarketTime1.Checked) //一般
            {
                Prod_ct.SetDataTable(daoAPDK.ListParamKey(), "APDK_PARAM_KEY", "APDK_PARAM_KEY", TextEditStyles.DisableTextEditor, null);
                Kind_id_st.SetDataTable(daoAPDK.ListKind2(), "APDK_KIND_ID_STO", "APDK_KIND_ID_STO", TextEditStyles.DisableTextEditor, null);
                Kind_id_O.SetDataTable(daoAPDK.ListKindId(), "APDK_KIND_ID", "APDK_KIND_ID", TextEditStyles.DisableTextEditor, null);
            }
            else //盤後
            {
                Prod_ct.SetDataTable(daoAPDK.ListParamKey(marktCodeFilter), "APDK_PARAM_KEY", "APDK_PARAM_KEY", TextEditStyles.DisableTextEditor, null);
                Kind_id_st.SetDataTable(daoAPDK.ListKind2(marktCodeFilter), "APDK_KIND_ID_STO", "APDK_KIND_ID_STO", TextEditStyles.DisableTextEditor, null);
                Kind_id_O.SetDataTable(daoAPDK.ListKindId(marktCodeFilter), "APDK_KIND_ID", "APDK_KIND_ID", TextEditStyles.DisableTextEditor, null);
            }
            Prod_ct.EditValue    = " ";
            Kind_id_st.EditValue = " ";
            Kind_id_O.EditValue  = " ";

            if (_ToolBtnExport != null && _ToolBtnPrintAll != null)
            {
                _ToolBtnExport.Enabled   = false;
                _ToolBtnPrintAll.Enabled = false;
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 列印順序
        /// </summary>
        //public string printSort {
        //   get {
        //      return PrintSort.EditValue.AsString();
        //   }
        //}

        /// <summary>
        /// 盤別
        /// </summary>
        //public string matketTime {
        //   get {
        //          string str = MarketTime.EditValue.AsString();
        //      return MarketTime.EditValue.AsString();
        //   }
        //}
        #endregion

        public W50010(string programID, string programName) : base(programID, programName)
        {
            InitializeComponent();
            this.Text             = _ProgramID + "─" + _ProgramName;
            dao50010              = new D50010();
            TxtDate.DateTimeValue = GlobalInfo.OCF_DATE;
            daoAPDK = new APDK();

            //設定下拉選單
            Fcm_SNo.SetDataTable(new AMPD().ListByFcmAccNo(), "AMPD_FCM_NO", "CP_DISPLAY", TextEditStyles.DisableTextEditor, "");
            Fcm_SNo.EditValue = "";
            Fcm_ENo.SetDataTable(new AMPD().ListByFcmAccNo(), "AMPD_FCM_NO", "CP_DISPLAY", TextEditStyles.DisableTextEditor, "");
            Fcm_ENo.EditValue = "";
            Prod_ct.SetDataTable(daoAPDK.ListParamKey(), "APDK_PARAM_KEY", "APDK_PARAM_KEY", TextEditStyles.DisableTextEditor, null);
            Prod_ct.EditValue = " ";
            Kind_id_st.SetDataTable(daoAPDK.ListKind2(), "APDK_KIND_ID_STO", "APDK_KIND_ID_STO", TextEditStyles.DisableTextEditor, null);
            Kind_id_st.EditValue = " ";
            Kind_id_O.SetDataTable(daoAPDK.ListAll3(), "MARKET_CODE", "PDK_KIND_ID", TextEditStyles.DisableTextEditor, null);
            Kind_id_O.EditValue = " ";


            //排序方式 下拉選單
            //List<LookupItem> markret = new List<LookupItem>(){
            //                               new LookupItem() { ValueMember = "O", DisplayMember = "一般"},
            //                               new LookupItem() { ValueMember = "AH", DisplayMember = "盤後" }};
            //DataTable dtMarket = new CODW().ListLookUpEdit("50010" , "50010_MARKET_CODE");
            //Extension.SetDataTable(MarketTime , dtMarket , "CODW_ID" , "CODW_DESC" , TextEditStyles.DisableTextEditor , null);
            //MarketTime.ItemIndex = 0; // 一般
            //List<LookupItem> printSort = new List<LookupItem>(){
            //                               new LookupItem() { ValueMember = "M", DisplayMember = "造市者"},
            //                               new LookupItem() { ValueMember = "P", DisplayMember = "商品" }};

            //RadioGroup
            radioMarketTime1.Checked = true;
            radioPrintSort1.Checked  = true;
            //加入事件
            //MarketTime.EditValueChanged += MarketTime_EditValueChanged;
            radioMarketTime1.Click      += MarketTime_EditValueChanged;
            radioMarketTime2.Click      += MarketTime_EditValueChanged;
            Fcm_SNo.EditValueChanged    += EditValueChanged;
            Fcm_ENo.EditValueChanged    += EditValueChanged;
            Prod_ct.EditValueChanged    += EditValueChanged;
            Kind_id_st.EditValueChanged += EditValueChanged;
            Kind_id_O.EditValueChanged  += EditValueChanged;
            //PrintSort.EditValueChanged += EditValueChanged;
            radioPrintSort1.Click          += EditValueChanged;
            radioPrintSort2.Click          += EditValueChanged;
            Txt_prod_sort.EditValueChanged += EditValueChanged;
            TxtDate.EditValueChanged       += EditValueChanged;
            DoMarketTimeDifferentSeting(); //add by tom
        }
Esempio n. 3
0
        /// <summary>
        /// 日夜盤 商品下拉選單不同
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void MarketTime_EditValueChanged(object sender, EventArgs e)
        {
            LookUpEdit lookupItem      = sender as LookUpEdit;
            string     marktCodeFilter = "AND APDK_MARKET_CODE in ('1',' ')";

            if (lookupItem.EditValue.AsString() == "AH")
            {
                Prod_ct.SetDataTable(daoAPDK.ListParamKey(marktCodeFilter), "APDK_PARAM_KEY", "APDK_PARAM_KEY", TextEditStyles.DisableTextEditor, null);
                Kind_id_st.SetDataTable(daoAPDK.ListKind2(marktCodeFilter), "APDK_KIND_ID_STO", "APDK_KIND_ID_STO", TextEditStyles.DisableTextEditor, null);
                Kind_id_O.SetDataTable(daoAPDK.ListKindId(marktCodeFilter), "APDK_KIND_ID", "APDK_KIND_ID", TextEditStyles.DisableTextEditor, null);
            }
            else
            {
                Prod_ct.SetDataTable(daoAPDK.ListParamKey(), "APDK_PARAM_KEY", "APDK_PARAM_KEY", TextEditStyles.DisableTextEditor, null);
                Kind_id_st.SetDataTable(daoAPDK.ListKind2(), "APDK_KIND_ID_STO", "APDK_KIND_ID_STO", TextEditStyles.DisableTextEditor, null);
                Kind_id_O.SetDataTable(daoAPDK.ListKindId(), "APDK_KIND_ID", "APDK_KIND_ID", TextEditStyles.DisableTextEditor, null);
            }
            Prod_ct.EditValue    = " ";
            Kind_id_st.EditValue = " ";
            Kind_id_O.EditValue  = " ";

            _ToolBtnExport.Enabled   = false;
            _ToolBtnPrintAll.Enabled = false;
        }