Esempio n. 1
0
        public static DataTable GetAllOrders(DateTime?startDate, DateTime?endDate, bool includeArchiveData, int startRec, int endRec,
                                             string firstName, string lastName, string email,
                                             out int totalCount)
        {
            DataTable dtTable          = new DataTable();
            string    connectionString = ConfigHelper.GetDBConnection();
            String    ProcName         = "pr_get_all_orders";

            SqlParameter[] ParamVal = new SqlParameter[9];
            ParamVal[0] = new SqlParameter("@startDate", startDate);
            ParamVal[1] = new SqlParameter("@endDate", endDate);
            ParamVal[2] = new SqlParameter("@includeArchiveData", includeArchiveData);
            ParamVal[3] = new SqlParameter("@startRec", startRec);
            ParamVal[4] = new SqlParameter("@endRec", endRec);

            ParamVal[5] = new SqlParameter("@firstName", firstName);
            ParamVal[6] = new SqlParameter("@lastName", lastName);
            ParamVal[7] = new SqlParameter("@email", email);

            SqlParameter paramter1 = new SqlParameter("@totalCount", SqlDbType.Int);

            paramter1.Direction = ParameterDirection.Output;
            ParamVal[8]         = paramter1;

            BaseSqlHelper.Execute(connectionString, ProcName, ParamVal, dtTable, false);
            totalCount = Convert.ToInt32(ParamVal[8].Value);
            return(dtTable);
        }
Esempio n. 2
0
        public static DataTable GetAllSkus(int startRec, int endRec, out int totalCount)
        {
            string connectionString = ConfigHelper.GetDBConnection();
            String ProcName         = "pr_get_sku_all";

            SqlParameter[] Parameters = new SqlParameter[3];
            Parameters[0] = new SqlParameter("@startRec", startRec);
            Parameters[1] = new SqlParameter("@endRec", endRec);
            SqlParameter paramter1 = new SqlParameter("@totalCount", SqlDbType.Int);

            paramter1.Direction = ParameterDirection.Output;
            Parameters[2]       = paramter1;
            DataTable dtTable = new DataTable();

            BaseSqlHelper.Execute(connectionString, ProcName, Parameters, dtTable, false);
            totalCount = Convert.ToInt32(Parameters[2].Value);
            return(dtTable);
        }
Esempio n. 3
0
        public static DataTable GetAllCustomerOrders(string firstName, string lastName, string email, int startRec, int endRec, out int totalCount)
        {
            string    connectionString = ConfigHelper.GetDBConnection();
            String    ProcName         = "pr_get_customer_orders";
            DataTable dtTable          = new DataTable();

            SqlParameter[] Parameters = new SqlParameter[6];
            Parameters[0] = new SqlParameter("@fistname", firstName);
            Parameters[1] = new SqlParameter("@lastname", lastName);
            Parameters[2] = new SqlParameter("@email", email);
            Parameters[3] = new SqlParameter("@startRec", startRec);
            Parameters[4] = new SqlParameter("@endRec", endRec);
            SqlParameter paramter1 = new SqlParameter("@totalCount", SqlDbType.Int);

            paramter1.Direction = ParameterDirection.Output;
            Parameters[5]       = paramter1;
            BaseSqlHelper.Execute(connectionString, ProcName, Parameters, dtTable, false);
            totalCount = Convert.ToInt32(Parameters[5].Value);
            return(dtTable);
        }