Exemplo n.º 1
0
    protected void btnOVER_Click(object sender, EventArgs e)
    {
        try
        {
            string strCHECK = Check_PageCondition(false);
            if (strCHECK != "")
            {
                ErrorMsgLabel.Text = strCHECK;
                return;
            }
            else
            {
                #region 呼叫BCO

                CAMModel.CAMCommon bco1 = new CAMModel.CAMCommon();

                ParameterList.Clear();
                ParameterList.Add(bco1.GetValueSetParameter(slp_GROUP_NO_S.Text, "string", false));
                ParameterList.Add(bco1.GetValueSetParameter(slp_GROUP_NO_E.Text, "string", false));
                ParameterList.Add(bco1.GetValueSetParameter(txtPAY_RFNO.Text, "string", false));
                ParameterList.Add(bco1.GetValueSetParameter(txtRFNO.Text, "string", false));
                ParameterList.Add(bco1.GetValueSetParameter(slp_STORE.Text, "string", false));
                ParameterList.Add(bco1.GetValueSetParameter(SLP_RootNo.Text, "string", false));
                ParameterList.Add(bco1.GetValueSetParameter(slpPROMOTE_ID_S.Text, "string", false));
                ParameterList.Add(bco1.GetValueSetParameter(slpPROMOTE_ID_E.Text, "string", false));
                ParameterList.Add(bco1.GetValueSetParameter(txtBUS_NO.Text, "string", false));

                DataTable dt = new DataTable();

                CAMModel.ProcessStoresMonthCounting bco = new CAMModel.ProcessStoresMonthCounting(ConntionDB);

                dt = bco.GetCAM14R01Data(ParameterList);

                if (dt.Rows.Count == 0)
                {
                    this.ErrorMsgLabel.Text = "查無資料";
                    return;
                }
                else
                {
                    ShowReport(dt, ((Button)sender).CommandName);
                }
                #endregion
            }

        }
        catch (Exception ex)
        {
            WaringLogProcess(ex.Message);
            this.ErrorMsgLabel.Text = ex.Message.Split(Environment.NewLine.Replace(Environment.NewLine, "~").ToCharArray())[0];  //直接取第一個
        }
        finally { Finally_Function(); }
    }