Exemple #1
0
        /// <summary>
        /// CRM16_1報表(匯出鈕)
        /// </summary>
        /// <param name="ParameterList">變數清單</param>
        /// <param name="ReportOutputFormat">報表格式(PDF,EXCEL)</param>
        /// <param name="EOT">匯出Excel方式</param>           
        /// <returns>回傳查詢結果</returns>
        public DataTable IVM18_1(ArrayList ParameterList,
                                 string ReportOutputFormat,
                                 ref ReportList.ExcelOtherType EOT
                                 )
        {

            #region

            IVMModel.PrintRemoveDetl BCO = new IVMModel.PrintRemoveDetl(ConntionDB);

            //todo要判別模式
            DataTable Dt = BCO.PrintRpt01(ParameterList);


            if (Dt.Rows.Count == 0)
            {
                throw new Exception("查無資料");
            }

            //設定使用第三方元件匯出EXCEL
            if (ReportOutputFormat == "EXCEL")
            {
                #region 表頭

                //Dt.Columns[0].ColumnName = "群分類";
                //Dt.Columns[1].ColumnName = "群分類名稱";
                //Dt.Columns[2].ColumnName = "大分類";
                //Dt.Columns[3].ColumnName = "大分類名稱";
                //Dt.Columns[4].ColumnName = "中分類";
                //Dt.Columns[5].ColumnName = "中分類名稱";
                //Dt.Columns[6].ColumnName = "小分類";
                //Dt.Columns[7].ColumnName = "小分類名稱";
                //Dt.Columns[8].ColumnName = "商品";
                //Dt.Columns[9].ColumnName = "商品名稱";
                //Dt.Columns[10].ColumnName = "刊別";
                //Dt.Columns[11].ColumnName = "進貨數量 ";
                //Dt.Columns[12].ColumnName = "退貨數量";
                //Dt.Columns[13].ColumnName = "實銷數量";
                //Dt.Columns[14].ColumnName = "進貨牌價";
                //Dt.Columns[15].ColumnName = "退貨牌價";
                //Dt.Columns[16].ColumnName = "時銷牌價";
                //Dt.Columns[17].ColumnName = "進貨成本";
                //Dt.Columns[18].ColumnName = "退貨成本";
                //Dt.Columns[19].ColumnName = "時銷成本";
                //Dt.Columns[20].ColumnName = "進貨零售價";
                //Dt.Columns[21].ColumnName = "退貨零售價";
                //Dt.Columns[22].ColumnName = "時銷零售價";

                #endregion

                EOT = ReportList.ExcelOtherType.None;
            }


            return Dt;
            #endregion
        }
Exemple #2
0
        /// <summary>
        /// CRM16_2報表(列印鈕)
        /// </summary>
        /// <param name="ParameterList">變數清單</param>        
        /// <returns>回傳查詢結果</returns>
        public DataTable IVM18_2(ArrayList ParameterList)
        {

            #region

            IVMModel.PrintRemoveDetl BCO = new IVMModel.PrintRemoveDetl(ConntionDB);
            DataTable Dt = BCO.PrintRpt01(ParameterList);


            if (Dt.Rows.Count == 0)
            {
                throw new Exception("查無資料");
            }
            else
            {
                return Dt;
            }

            #endregion
        }