Example #1
0
        /// <summary>
        /// MKT10報表
        /// </summary>
        /// <param name="ParameterList">變數清單</param>
        /// <returns>回傳查詢結果</returns>
        public DataSet MKT06_1(ArrayList ParameterList)
        {
            DataSet ds = new DataSet();

            MKTModel.MaintainBooksPurchaseCardChain bco = new MKTModel.MaintainBooksPurchaseCardChain(ConntionDB);

            DataTable Dt1 = bco.QueryMstForPrint(ParameterList);
            if (Dt1.Rows.Count == 0)
                throw new Exception("查無資料");

            DataTable Dt2 = Check_Row(bco.QueryDetlForPrint(ParameterList), ParameterList[0].ToString());

            DataTable Dt3 = bco.QueryRefGoodsForPrint(ParameterList);

            Dt1.TableName = "CRMKT06R01";
            ds.Tables.Add(Dt1.Copy());

            Dt2.TableName = "CRMKT06R02";
            ds.Tables.Add(Dt2.Copy());

            Dt3.TableName = "CRMKT06R03";
            ds.Tables.Add(Dt3.Copy());

            return ds;
        }
Example #2
0
    protected void btnPrint_Click(object sender, EventArgs e)
    {
        ErrorMsgLabel.Text = "";

        if (VerifyFormData() == true)
        {
            try
            {
                DataSet ds = new DataSet();

                //VDS_MKT_BPURCARD_MAIN
                MKT.MaintainBooksPurchaseCardChain BCO = new MKT.MaintainBooksPurchaseCardChain(ConntionDB);

                ParameterList.Clear();

                ParameterList.Add(hidBpurcard_no.Value);

                DataTable Dt_M = BCO.QueryMstForPrint(ParameterList);

                if (Dt_M.Rows.Count == 0)
                {
                    ScriptManager.RegisterStartupScript(Page, this.GetType(), "MKT062.aspx", "alert(' 查無資料 ');", true);

                    return;
                }

                //VDS_MKT_BPURCARD_CHAIN
                MKT.MaintainBooksPurchaseCardChain BCO_Detail = new MKT.MaintainBooksPurchaseCardChain(ConntionDB);

                ParameterList.Clear();

                ParameterList.Add(hidBpurcard_no.Value);

                DataTable Dt_D = BCO_Detail.QueryDetlForPrint(ParameterList);

                DataTable Dt_D_Check = Check_Row(Dt_D);

                //VDS_MKT_BPURCARD_REFGOODS
                MKT.MaintainBooksPurchaseCardChain BCO_Detail2 = new MKT.MaintainBooksPurchaseCardChain(ConntionDB);

                ParameterList.Clear();

                ParameterList.Add(hidBpurcard_no.Value);

                DataTable Dt_D_GOODS = BCO_Detail2.QueryRefGoodsForPrint(ParameterList);

                //加入報表
                Dt_M.TableName = "CRMKT06R01";
                ds.Tables.Add(Dt_M.Copy());

                Dt_D_Check.TableName = "CRMKT06R02";
                ds.Tables.Add(Dt_D_Check.Copy());

                Dt_D_GOODS.TableName = "CRMKT06R03";
                ds.Tables.Add(Dt_D_GOODS.Copy());

                ShowReport(ds);
            }
            catch (Exception ex)
            {
                ErrorMsgLabel.Text = ex.Message;
            }
            finally { }
        }
    }