Example #1
0
        /// <summary>
        /// 讀取前條件檢核
        /// </summary>
        /// <param name="sbrkno">造市者代號起始</param>
        /// <param name="ebrkno">造市者代號迄止</param>
        /// <returns></returns>
        private bool StartRetrieve(string sbrkno = "", string ebrkno = "")
        {
            /*******************
            *  條件值檢核
            *******************/
            _D500Xx.IsCheck = "N";
            /*造市者代號 */
            _D500Xx.Sbrkno = dwSbrkno.EditValue.AsString();
            if (string.IsNullOrEmpty(_D500Xx.Sbrkno))
            {
                _D500Xx.Sbrkno = sbrkno;
            }
            _D500Xx.Ebrkno = dwEbrkno.EditValue.AsString();
            if (string.IsNullOrEmpty(_D500Xx.Ebrkno))
            {
                _D500Xx.Ebrkno = ebrkno;
            }
            if ((string.Compare(dwSbrkno.SelectedText, dwEbrkno.SelectedText) > 0) && !string.IsNullOrEmpty(_D500Xx.Ebrkno))
            {
                PbFunc.messageBox(GlobalInfo.ErrorText, "造市者代號起始不可大於迄止", MessageBoxIcon.Stop);

                dwEbrkno.Focus();
                _D500Xx.IsCheck = "Y";
                return(false);
            }

            /* 商品群組 */
            _D500Xx.ProdCategory = dwProdCt.EditValue.AsString();
            if (string.IsNullOrEmpty(_D500Xx.ProdCategory) || dwProdCt.Enabled == false)
            {
                _D500Xx.ProdCategory = "";
            }
            _D500Xx.ProdCategory = _D500Xx.ProdCategory.AsString() + "%";

            /* 商品 */
            _D500Xx.ProdKindId    = "";
            _D500Xx.ProdKindIdSto = dwProdKdSto.EditValue.AsString();
            if (string.IsNullOrEmpty(_D500Xx.ProdKindIdSto) || dwProdKdSto.Enabled == false)
            {
                _D500Xx.ProdKindIdSto = "";
            }
            _D500Xx.ProdKindIdSto = _D500Xx.ProdKindIdSto.AsString() + "%";

            //DateTime dtDate;
            /* 月報表 */
            if (emStartYM.Visible == true)
            {
                if (!emStartYM.IsDate(emStartYM.Text + "/01", CheckDate.Start))
                {
                    _D500Xx.IsCheck = "Y";
                    return(false);
                }
                _D500Xx.Sdate = emStartYM.Text.Replace("/", "").SubStr(0, 6);
            }
            if (emEndYM.Visible == true)
            {
                if (!emEndYM.IsDate(emEndYM.Text + "/01", CheckDate.End))
                {
                    _D500Xx.IsCheck = "Y";
                    return(false);
                }
                _D500Xx.Edate = emEndYM.Text.Replace("/", "").SubStr(0, 6);
            }

            /*******************
            *  資料類別
            *******************/
            _D500Xx.DataType = "Q";

            /*******************
            *  條件值檢核OK
            *******************/
            _D500Xx.IsCheck = "Y";


            /*******************
            *  //Local Window
            *  條件值檢核
            *  if		is_chk <> 'E'	then
            *     is_chk = 'Y'
            *  end	if
            *
            *  資料類別:
            *  報價:
            *  is_data_type = 'Q'
            *  詢價:
            *  is_data_type = 'R'
            *******************/
            return(true);
        }