Esempio n. 1
0
        public DataTable GetCategorie()
        {
            SqlParameter[] parameter = new SqlParameter[0];
            DataTable      dt        = DataPassing.SPExecute("getAllCategory", parameter);

            return(dt);
        }
Esempio n. 2
0
        public DataTable GetAllProduct()
        {
            SqlParameter[] parameter = new SqlParameter[1];
            parameter[0] = DataPassing.AddParameter("@CategoryID", CategoryID, System.Data.SqlDbType.Int, 20);
            DataTable dt = DataPassing.SPExecute("getProducts", parameter);

            return(dt);
        }
Esempio n. 3
0
        public DataTable Search()
        {
            SqlParameter[] parameter = new SqlParameter[1];
            parameter[0] = DataPassing.AddParameter("@ProductName", ProductName, System.Data.SqlDbType.VarChar, 200);
            DataTable dt = DataPassing.SPExecute("sp_Search", parameter);

            return(dt);
        }
Esempio n. 4
0
 public void AddOrderDetails()
 {
     SqlParameter[] parameter = new SqlParameter[5];
     parameter[0] = DataPassing.AddParameter("@Name", Name, System.Data.SqlDbType.VarChar, 200);
     parameter[1] = DataPassing.AddParameter("@Email", Email, System.Data.SqlDbType.VarChar, 100);
     parameter[2] = DataPassing.AddParameter("@Mobile", Mobile, System.Data.SqlDbType.Int, 500);
     parameter[3] = DataPassing.AddParameter("@Address", Address, System.Data.SqlDbType.VarChar, 500);
     parameter[4] = DataPassing.AddParameter("@ProductId", ProductId, System.Data.SqlDbType.Int, 100);
     DataTable dataTable = DataPassing.SPExecute("sp_orderDetails", parameter);
 }
Esempio n. 5
0
        public void AddNewProduct()
        {
            SqlParameter[] parameter = new SqlParameter[6];
            parameter[0] = DataPassing.AddParameter("@ProductName", ProductName, System.Data.SqlDbType.VarChar, 200);
            parameter[1] = DataPassing.AddParameter("@ProductPrice", ProductPrice, System.Data.SqlDbType.VarChar, 100);
            parameter[2] = DataPassing.AddParameter("@ProducDescription", ProducDescription, System.Data.SqlDbType.VarChar, 500);
            parameter[3] = DataPassing.AddParameter("@ProductImage", ProductImage, System.Data.SqlDbType.VarChar, 500);
            parameter[4] = DataPassing.AddParameter("@CategoryID", CategoryID, System.Data.SqlDbType.Int, 100);
            parameter[5] = DataPassing.AddParameter("@ProductQuantity", ProductQuantity, System.Data.SqlDbType.Int, 100);

            DataTable dataTable = DataPassing.SPExecute("SP_AddNewproduct", parameter);
        }
Esempio n. 6
0
 public void AddNewCategory()
 {
     SqlParameter[] parameter = new SqlParameter[1];
     parameter[0] = DataPassing.AddParameter("@CategoryName", CategoryName, System.Data.SqlDbType.VarChar, 200);
     DataTable dt = DataPassing.SPExecute("sp_addNewCategory", parameter);
 }