// to select to add CATEGORIES data public DataTable GET_ALL_CATEGORIES() { DAL.DataAcessLayer DAL = new DAL.DataAcessLayer(); DataTable dt = new DataTable(); dt = DAL.SelectData("SP_GET_ALL_CATEGORIES", null); return(dt); }
// this to initialize data to datat grid view public DataTable GET_ALL_PRODUCTS() { DAL.DataAcessLayer DLL = new DAL.DataAcessLayer(); DataTable dt = new DataTable(); dt = DLL.SelectData("SP_GET_ALL_PRODUCT", null); DLL.close(); return(dt); }
public DataTable GET_Last_Orders_ID_FOR_PRINT() { DAL.DataAcessLayer dll = new DAL.DataAcessLayer(); DataTable dt = new DataTable(); dt = dll.SelectData("SP_GET_LAST_ORDER_FOR_PRINT", null); dll.close(); return(dt); }
public DataTable Select_customers() { DAL.DataAcessLayer dll = new DAL.DataAcessLayer(); dll.open(); DataTable dt = new DataTable(); dt = dll.SelectData("SP_SELECT_ALL_CUSTOMER", null); dll.close(); return(dt); }
//TO SEARCH from tbl product public DataTable SEARCH_PRODUCT(string id) { DAL.DataAcessLayer da = new DAL.DataAcessLayer(); SqlParameter[] sqlparam = new SqlParameter[1]; sqlparam[0] = new SqlParameter("@ID", SqlDbType.VarChar, 50); sqlparam[0].Value = id; DataTable dt = new DataTable(); dt = da.SelectData("SP_SEARCH_PRODUCT", sqlparam); return(dt); }
//to get image public DataTable Select_Image(string id) { DAL.DataAcessLayer dl = new DAL.DataAcessLayer(); SqlParameter[] sqlparam = new SqlParameter[1]; sqlparam[0] = new SqlParameter("@ID", SqlDbType.VarChar, 50); sqlparam[0].Value = id; DataTable dt = new DataTable(); dt = dl.SelectData("SP_SELECT_IMAGE_PRODUCT", sqlparam); dl.close(); return(dt); }
public DataTable SEARCH_Users(string Criterion) { DAL.DataAcessLayer dll = new DAL.DataAcessLayer(); DataTable dt = new DataTable(); SqlParameter[] sqlparam = new SqlParameter[1]; sqlparam[0] = new SqlParameter("@Criterion", SqlDbType.VarChar, 50); sqlparam[0].Value = Criterion; dt = dll.SelectData("SP_SEARCH_USER", sqlparam); dll.close(); return(dt); }
//to check if id product found 2 once or one once public DataTable VerifyProductID(string ID) { DAL.DataAcessLayer DLL = new DAL.DataAcessLayer(); DLL.open(); SqlParameter[] sqlparam = new SqlParameter[1]; sqlparam[0] = new SqlParameter("@ID", SqlDbType.VarChar, 50); sqlparam[0].Value = ID; DataTable dt = new DataTable(); dt = DLL.SelectData("SP_VerifyProductID", sqlparam); DLL.close(); return(dt); }
public DataTable GetOrderDetails(int ID_Order) { DAL.DataAcessLayer dll = new DAL.DataAcessLayer(); DataTable dt = new DataTable(); SqlParameter[] sqlparam = new SqlParameter[1]; sqlparam[0] = new SqlParameter("@ID_ORDER", SqlDbType.Int); sqlparam[0].Value = ID_Order; dt = dll.SelectData("SP_GetOrderDetails", sqlparam); dll.close(); return(dt); }
public DataTable Search_Customer(string criterion) { DAL.DataAcessLayer dll = new DAL.DataAcessLayer(); dll.open(); SqlParameter[] param = new SqlParameter[1]; param[0] = new SqlParameter("@Criterion", SqlDbType.VarChar, 50); param[0].Value = criterion; DataTable dt = new DataTable(); dt = dll.SelectData("SP_SEARCH_CUSTOMER", param); dll.close(); return(dt); }
//*7* initialize to login from DataBase public DataTable LogIN(String ID, String PWD) { DAL.DataAcessLayer DAL = new DAL.DataAcessLayer(); SqlParameter[] sqlparam = new SqlParameter[2]; sqlparam[0] = new SqlParameter("ID", SqlDbType.VarChar, 50); sqlparam[0].Value = ID; sqlparam[1] = new SqlParameter("PWD", SqlDbType.VarChar, 50); sqlparam[1].Value = PWD; DAL.open(); DataTable dt = new DataTable(); dt = DAL.SelectData("SP_LOGIN", sqlparam); return(dt); }
public DataTable VERIFYQTY(string ID_PRODUCT, int QTY_ENTERED) { DAL.DataAcessLayer dll = new DAL.DataAcessLayer(); DataTable dt = new DataTable(); SqlParameter[] sqlparam = new SqlParameter[2]; sqlparam[0] = new SqlParameter("@ID_PRODUCT", SqlDbType.VarChar, 30); sqlparam[0].Value = ID_PRODUCT; sqlparam[1] = new SqlParameter("@QTY_ENTERED", SqlDbType.Int); sqlparam[1].Value = QTY_ENTERED; dt = dll.SelectData("SP_VERIFYQTY", sqlparam); dll.close(); return(dt); }