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

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

            DataTable Dt = null;
            Int32 i32TotalPattern = 0;
            Dt = BCO.QueryAreaSale3(ParameterList, out i32TotalPattern);

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

            return Dt;
            #endregion
        }
Example #2
0
    public static string GetPatternNameByPatternNO(string strPosition, string strLevel, string strPattern)
    {
        string strResult = "";

        try
        {
            ArrayList Params = new ArrayList();
            Params.Add(strLevel);
            Params.Add(strPattern);

            COMModel.COM16_BCO BCO = new COMModel.COM16_BCO(ConnectionDB);
            strResult = string.Format("{0}_{1}", strPosition, BCO.GetPatternNameByPatternNO(Params));
        }
        catch (Exception ex)
        {
            throw ex;
        }

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

            COMModel.COM16_BCO BCO = new COMModel.COM16_BCO(ConnectionDB);
            Int32 i32_TOTAL_PATTERN;

            DataTable dt = BCO.QueryAreaSale3(GetQueryParams(), out i32_TOTAL_PATTERN);
            Session[SessionIDName] = dt;

            htSubTotal.Clear();//clear HashTable

            GridView1.DataSource = GetPivotTable(dt, i32_TOTAL_PATTERN);
            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