Esempio n. 1
0
        public DataSet Get_Dealer_Accepted_product(int dealerID, string status, int?stateid = 0, int?districtId = 0, int?blockID = 0, int?category = 0, int?subcategory = 0, int?techid = 0, int?companyid = 0, int?brandid = 0)
        {
            string  sql = "";
            DataSet ds  = new DataSet();

            try
            {
                sql = StoredProcedure.ACCEPTED_PRODUCTLIST_Master;
                SqlParameter[] parameters = new SqlParameter[10];
                if (dealerID > 0)
                {
                    parameters[0] = new SqlParameter("@DealerId", dealerID);
                }
                parameters[1] = new SqlParameter("@status", status);
                parameters[2] = new SqlParameter("@StateID", stateid);
                parameters[3] = new SqlParameter("@DistrictID", districtId);
                parameters[4] = new SqlParameter("@BlockID", blockID);
                parameters[5] = new SqlParameter("@CategoryID", category);
                parameters[6] = new SqlParameter("@SubCategoryID", subcategory);
                parameters[7] = new SqlParameter("@TechnicalNameID", techid);
                parameters[8] = new SqlParameter("@CompanyID", companyid);
                parameters[9] = new SqlParameter("@BrandID", brandid);

                ds = BaseDal.ExecuteAdapter(sql, parameters);
            }
            catch (Exception ex)
            {
                LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0);
            }
            return(ds);
        }
Esempio n. 2
0
        public DataSet Get_Product_Detail_Dealer(int productId)
        {
            string  sql = "";
            DataSet ds  = new DataSet();

            try
            {
                sql = StoredProcedure.Get_Product_Detail_temp;
                SqlParameter[] parameters = new SqlParameter[1];
                parameters[0] = new SqlParameter("@productid", productId);
                ds            = BaseDal.ExecuteAdapter(sql, parameters);
            }
            catch (Exception ex)
            {
                LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0);
            }
            return(ds);
        }
Esempio n. 3
0
        public DataSet Get_Role(int userid)
        {
            string  sql = "";
            DataSet ds  = new DataSet();

            try
            {
                sql = StoredProcedure.SPGetRole;
                SqlParameter[] parameters = new SqlParameter[1];
                parameters[0] = new SqlParameter("@UserID", userid);
                ds            = BaseDal.ExecuteAdapter(sql, parameters);
            }
            catch (Exception ex)
            {
                LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0);
            }
            return(ds);
        }
Esempio n. 4
0
        public DataSet Get_Product_Package(int productId, int Ismaster = 0)
        {
            string  sql = "";
            DataSet ds  = new DataSet();

            try
            {
                sql = StoredProcedure.Get_ProductId_Package;
                SqlParameter[] parameters = new SqlParameter[2];
                parameters[0] = new SqlParameter("@ProductId", productId);
                parameters[1] = new SqlParameter("@IsMaster", Ismaster);
                ds            = BaseDal.ExecuteAdapter(sql, parameters);
            }
            catch (Exception ex)
            {
                LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0);
            }
            return(ds);
        }
Esempio n. 5
0
        public DataSet Get_ProductList_useFor(string mode, string CategoryId)
        {
            string  sql = "";
            DataSet ds  = new DataSet();

            try
            {
                sql = StoredProcedure.Prod_UseForList;
                SqlParameter[] parameters = new SqlParameter[2];
                parameters[0] = new SqlParameter("@mode", mode);
                parameters[1] = new SqlParameter("@CategoryID", CategoryId);
                ds            = BaseDal.ExecuteAdapter(sql, parameters);
            }
            catch (Exception ex)
            {
                LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0);
            }
            return(ds);
        }
Esempio n. 6
0
        public DataSet Get_Nutrient_Unit(string mode = "")
        {
            string  sql = "";
            DataSet ds  = new DataSet();

            try
            {
                sql = StoredProcedure.Get_Nutrient_Unit;
                SqlParameter[] parameters = new SqlParameter[1];
                parameters[0] = new SqlParameter("@MODE", mode);

                ds = BaseDal.ExecuteAdapter(sql, parameters);
            }
            catch (Exception ex)
            {
                LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0);
            }
            return(ds);
        }
Esempio n. 7
0
        public DataSet GetUserid_for_Product(int productid, bool Ismaster = false)
        {
            string  sql = "";
            DataSet ds  = new DataSet();

            try
            {
                sql = StoredProcedure.GetUserid_for_Product;
                SqlParameter[] parameters = new SqlParameter[2];
                parameters[0] = new SqlParameter("@ProductId", productid);
                parameters[1] = new SqlParameter("@mastertable", Ismaster);

                ds = BaseDal.ExecuteAdapter(sql, parameters);
            }
            catch (Exception ex)
            {
                LogDal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0);
            }
            return(ds);
        }