예제 #1
0
        private void IncomeStatment()
        {
            string fromDate = Request.QueryString["fromDate"].ToString();
            string toDate   = Request.QueryString["toDate"].ToString();
            string query    = @"exec IncomeStatement '" + fromDate + "','" + toDate + "'";

            oResult = oDAL.Select(query);
            DataSet dt = null;

            dt = oResult.ds as DataSet;
        }
예제 #2
0
파일: GlobalClass.cs 프로젝트: sajidur/erp
        public string GetMaxIdWithPrfix(string coloumName, string rightStringLength, string initialValue, string tableName, string prefix)
        {
            string id    = "";
            string maxId = "";

            _selectQuery = "SELECT ISNULL(MAX(RIGHT(" + coloumName + ", " + rightStringLength + ")) + 1, " + initialValue + ") AS maxID " +
                           " FROM  " + tableName + " where left(" + coloumName + "," + prefix.Length + ")='" + prefix + "' ";


            SQLDAL    dal = new SQLDAL();
            DataTable dt  = dal.Select(_selectQuery).Data;

            if (dt != null && dt.Rows.Count > 0)
            {
                id = (dt.Rows[0]["maxID"].ToString());
            }


            if (id.Length < initialValue.Length)
            {
                int    prefixZero = initialValue.Length - id.Length;
                string _prefix    = "";
                for (int i = 0; i < prefixZero; i++)
                {
                    _prefix += "0";
                }
                id = _prefix + id;
            }
            maxId = prefix + id;
            return(maxId);
        }
예제 #3
0
        private void UnApprovedPaymentVoucherList()
        {
            string invoiceId = Request.QueryString["invoiceId"].ToString();
            string query     = @"exec rptUnApprovedPaymentList";

            oResult = oDAL.Select(query);
            DataTable dt = null;

            dt = oResult.Data as DataTable;
            ReportViewer1.ProcessingMode         = ProcessingMode.Local;
            ReportViewer1.LocalReport.ReportPath = Server.MapPath("~/Report/RPT/UnApprovedPaymentList.rdlc");
            ReportDataSource datasource = new ReportDataSource("dsrptUnApprovedPaymentList", dt);

            ReportViewer1.LocalReport.DataSources.Clear();
            ReportViewer1.LocalReport.DataSources.Add(datasource);
        }