Exemple #1
0
        public DataSet GetTransactionHistoryByCustomer(CustomerSearch custSearch)
        {
            DataSet ds;

            try
            {
                Database  db  = DatabaseFactory.CreateDatabase(Constant.Database_Connection_Name);
                DbCommand cmd = db.GetStoredProcCommand(Constant.SP_Customers_Report_TransactionsAll);

                db.AddInParameter(cmd, "@iCustomerID", DbType.Int32, custSearch.CustId);
                ds = db.ExecuteDataSet(cmd);
            }
            catch (System.Exception ex)
            {
                ds = null;
                throw ex;
            }
            return(ds);
        }
Exemple #2
0
        public DataSet SearchCustomers(CustomerSearch customerSearch)
        {
            DataSet ds = null;

            try
            {
                Database  db  = DatabaseFactory.CreateDatabase(Constant.Database_Connection_Name);
                DbCommand cmd = db.GetStoredProcCommand(Constant.SP_Customers_Search);

                db.AddInParameter(cmd, "@sCustomerCode", DbType.String, customerSearch.CustomerCode);
                db.AddInParameter(cmd, "@sCus_Name", DbType.String, customerSearch.Cus_Name);
                db.AddInParameter(cmd, "@iIsActiveOption", DbType.Int32, customerSearch.IsActiveOption);
                db.AddInParameter(cmd, "@iIsCreditCustomerOption", DbType.Int32, customerSearch.IsCreditCustomerOption);

                ds = db.ExecuteDataSet(cmd);
            }
            catch (System.Exception ex)
            {
                ds = null;
                throw ex;
            }
            return(ds);
        }
Exemple #3
0
        public DataSet SearchCustomers(CustomerSearch customerSearch)
        {
            DataSet ds = null;
            try
            {
                Database db = DatabaseFactory.CreateDatabase(Constant.Database_Connection_Name);
                DbCommand cmd = db.GetStoredProcCommand(Constant.SP_Customers_Search);

                db.AddInParameter(cmd, "@sCustomerCode", DbType.String, customerSearch.CustomerCode);
                db.AddInParameter(cmd, "@sCus_Name", DbType.String, customerSearch.Cus_Name);
                db.AddInParameter(cmd, "@iIsActiveOption", DbType.Int32, customerSearch.IsActiveOption);
                db.AddInParameter(cmd, "@iIsCreditCustomerOption", DbType.Int32, customerSearch.IsCreditCustomerOption);

                ds = db.ExecuteDataSet(cmd);
            }
            catch (System.Exception ex)
            {
                ds = null;
                throw ex;
            }
            return ds;
        }
Exemple #4
0
        public DataSet GetTransactionHistoryByCustomer(CustomerSearch custSearch)
        {
            DataSet ds;
            try
            {
                Database db = DatabaseFactory.CreateDatabase(Constant.Database_Connection_Name);
                DbCommand cmd = db.GetStoredProcCommand(Constant.SP_Customers_Report_TransactionsAll);

                db.AddInParameter(cmd, "@iCustomerID", DbType.Int32, custSearch.CustId);
                ds = db.ExecuteDataSet(cmd);
            }
            catch (System.Exception ex)
            {
                ds = null;
                throw ex;
            }
            return ds;
        }