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

            #region
            COMModel.COM17_BCO BCO = new COMModel.COM17_BCO(ConntionDB);

            DataTable Dt = null;
            Int32 i32TotalItem = 0;
            Dt = BCO.QueryItemSale(ParameterList, out i32TotalItem);

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

            return Dt;
            #endregion
        }
Esempio n. 2
0
    /// <summary>
    /// 繫結資料到控制項
    /// </summary>
    /// <param name="vdb"></param>
    private void QueryData()
    {
        #region
        try
        {
            string SessionIDName = string.Format("{0}_{1}", PAGE_DT_01, PageTimeStamp.Value);

            COMModel.COM17_BCO BCO = new COMModel.COM17_BCO(ConnectionDB);
            Int32 i32_TOTAL_ITEM;

            DataTable dt = BCO.QueryItemSale(GetQueryParams(), out i32_TOTAL_ITEM);
            Session[SessionIDName] = dt;

            htSubTotal.Clear();//clear HashTable

            GridView1.DataSource = GetPivotTable(dt, i32_TOTAL_ITEM);
            GridView1.PageIndex = 0;
            GridView1.DataBind();


            if (dt == null || dt.Rows.Count <= 0)
            {
                ErrorMsgLabel.Text = "查無資料";
            }
        }
        catch (Exception ex)
        {
            throw ex;
        }


        //LabelQueryRecordCount.Text = string.Format(" {0} Rows ", iRowCount);

        #endregion
    }//QueryData