public DataTable GET_ALL_USRS() { DAL.DataAccessLayer dal = new DAL.DataAccessLayer(); DataTable dt = new DataTable(); dt = dal.SelectData("GET_ALL_USRS", null); dal.ConClose(); return(dt); }
public void DLT_ORDER_MONEY(int ID_MONEY) { DAL.DataAccessLayer dal = new DAL.DataAccessLayer(); dal.ConOpen(); SqlParameter[] PARAM = new SqlParameter[1]; PARAM[0] = new SqlParameter("@ID_MONEY", SqlDbType.Int); PARAM[0].Value = ID_MONEY; dal.ExecuteCommand("DLT_ORDER_MONEY", PARAM); dal.ConClose(); }
public void BLOCKUSR(int USR_ID) { DAL.DataAccessLayer dal = new DAL.DataAccessLayer(); dal.ConOpen(); SqlParameter[] PARAM = new SqlParameter[1]; PARAM[0] = new SqlParameter("@USR_ID", SqlDbType.Int); PARAM[0].Value = USR_ID; dal.ExecuteCommand("BLOCKUSR", PARAM); dal.ConClose(); }
public void DELETE_COUSTOMER(String ID_COUST) { DAL.DataAccessLayer dal = new DAL.DataAccessLayer(); dal.ConOpen(); SqlParameter[] PARAM = new SqlParameter[1]; PARAM[0] = new SqlParameter("@ID_COUST", SqlDbType.Int); PARAM[0].Value = ID_COUST; dal.ExecuteCommand("DELETE_COUSTOMER", PARAM); dal.ConClose(); }
public void DLT_PAID_SPENT_DOCS(int ID) { DAL.DataAccessLayer dal = new DAL.DataAccessLayer(); dal.ConOpen(); SqlParameter[] PARAM = new SqlParameter[1]; PARAM[0] = new SqlParameter("@ID", SqlDbType.Int); PARAM[0].Value = ID; dal.ExecuteCommand("DLT_PAID_SPENT_DOCS", PARAM); dal.ConClose(); }
public void DELETE_PRODUCT(String ID_PRD) { DAL.DataAccessLayer dal = new DAL.DataAccessLayer(); dal.ConOpen(); SqlParameter[] PARAM = new SqlParameter[1]; PARAM[0] = new SqlParameter("@ID", SqlDbType.NVarChar, 50); PARAM[0].Value = ID_PRD; dal.ExecuteCommand("DELETE_PRODUCT", PARAM); dal.ConClose(); }
public void ADD_NEW_CATEGORIES(string CAT_LABEL) { DAL.DataAccessLayer dal = new DAL.DataAccessLayer(); dal.ConOpen(); SqlParameter[] PARAM = new SqlParameter[1]; PARAM[0] = new SqlParameter("@CAT_LABEL", SqlDbType.NVarChar, 50); PARAM[0].Value = CAT_LABEL; dal.ExecuteCommand("ADD_NEW_CATEGORIES", PARAM); dal.ConClose(); }
public DataTable GET_ALL_ORDERS(int TYPE_OF_ORDER) { DAL.DataAccessLayer dal = new DAL.DataAccessLayer(); DataTable dt = new DataTable(); SqlParameter[] param = new SqlParameter[1]; param[0] = new SqlParameter("@ORDER_TYPES", SqlDbType.Bit); param[0].Value = TYPE_OF_ORDER; dt = dal.SelectData("GET_ALL_ORDERS", param); dal.ConClose(); return(dt); }
public void DLT_ORDER(int TYPE_OF_ORDER, int ID_ORDER) { DAL.DataAccessLayer dal = new DAL.DataAccessLayer(); dal.ConOpen(); SqlParameter[] PARAM = new SqlParameter[2]; PARAM[0] = new SqlParameter("@TYPE_OF_ORDER", SqlDbType.Bit); PARAM[1] = new SqlParameter("@ID_ORDER", SqlDbType.Int); PARAM[0].Value = TYPE_OF_ORDER; PARAM[1].Value = ID_ORDER; dal.ExecuteCommand("DLT_ORDER", PARAM); dal.ConClose(); }
public void UPDATE_PRD_COSTS(int ID_PRD, double COST) { DAL.DataAccessLayer dal = new DAL.DataAccessLayer(); dal.ConOpen(); SqlParameter[] PARAM = new SqlParameter[2]; PARAM[0] = new SqlParameter("@ID_PRD", SqlDbType.Int); PARAM[1] = new SqlParameter("@COST", SqlDbType.Float); PARAM[0].Value = ID_PRD; PARAM[1].Value = COST; dal.ExecuteCommand("UPDATE_PRD_COSTS", PARAM); dal.ConClose(); }
public DataTable VERFIY_SALESMAN(string USRNAME) { DAL.DataAccessLayer dal = new DAL.DataAccessLayer(); SqlParameter[] param = new SqlParameter[1]; param[0] = new SqlParameter("@USRNAME", SqlDbType.NVarChar, 50); param[0].Value = USRNAME; DataTable dt = new DataTable(); dt = dal.SelectData("VERFIY_SALESMAN", param); dal.ConClose(); return(dt); }
public DataTable PRT_ALL_INVO(int COUST_ID) { DAL.DataAccessLayer dal = new DAL.DataAccessLayer(); DataTable dt = new DataTable(); SqlParameter[] param = new SqlParameter[1]; param[0] = new SqlParameter("@COUST_ID", SqlDbType.Int); param[0].Value = COUST_ID; dt = dal.SelectData("PRT_ALL_INVO", param); dal.ConClose(); return(dt); }
public DataTable SEARCH_PRODUCT(string ID) { DAL.DataAccessLayer dal = new DAL.DataAccessLayer(); DataTable dt = new DataTable(); SqlParameter[] param = new SqlParameter[1]; param[0] = new SqlParameter("@ID", SqlDbType.NVarChar, 50); param[0].Value = ID; dt = dal.SelectData("SEARCH_PRODUCT", param); dal.ConClose(); return(dt); }
public void UPDATE_PRD_Stock(int ID_PRD, float QTY) { DAL.DataAccessLayer dal = new DAL.DataAccessLayer(); dal.ConOpen(); SqlParameter[] PARAM = new SqlParameter[2]; PARAM[0] = new SqlParameter("@ID_PRD", SqlDbType.Int); PARAM[1] = new SqlParameter("@QTY_PROD", SqlDbType.Float); PARAM[0].Value = ID_PRD; PARAM[1].Value = QTY * -1; dal.ExecuteCommand("ADD_PRD_Stock", PARAM); dal.ConClose(); }
public DataTable RPT_ITMS_DTLS(int ID_PRODUCT) { DAL.DataAccessLayer dal = new DAL.DataAccessLayer(); DataTable dt = new DataTable(); SqlParameter[] param = new SqlParameter[1]; param[0] = new SqlParameter("@ID_PRODUCT", SqlDbType.Int); param[0].Value = ID_PRODUCT; dt = dal.SelectData("RPT_ITMS_DTLS", param); dal.ConClose(); return(dt); }
public void ModifyPrdBarcode(int ID_PRD, int BARCODE) { DAL.DataAccessLayer dal = new DAL.DataAccessLayer(); dal.ConOpen(); SqlParameter[] PARAM = new SqlParameter[2]; PARAM[0] = new SqlParameter("@ID", SqlDbType.Int); PARAM[1] = new SqlParameter("@barcode", SqlDbType.Float); PARAM[0].Value = ID_PRD; PARAM[1].Value = BARCODE; dal.ExecuteCommand("ModifyPrdBarcode", PARAM); dal.ConClose(); }
//method check login public DataTable LOGIN(string ID, string PWD) { DAL.DataAccessLayer dal = new DAL.DataAccessLayer(); SqlParameter[] param = new SqlParameter[2]; param[0] = new SqlParameter("@USRNAME", SqlDbType.NVarChar, 50); param[0].Value = ID; param[1] = new SqlParameter("@USRPWD", SqlDbType.NVarChar, 50); param[1].Value = PWD; DataTable dt = new DataTable(); dt = dal.SelectData("SP_LOGIN", param); dal.ConClose(); return(dt); }
public DataTable PRT_INVO_ORDER(int ORDER_TYPES, int ID_ORDER) { DAL.DataAccessLayer dal = new DAL.DataAccessLayer(); DataTable dt = new DataTable(); SqlParameter[] param = new SqlParameter[2]; param[0] = new SqlParameter("@ID_ORDER", SqlDbType.Int); param[0].Value = ID_ORDER; param[1] = new SqlParameter("@ORDER_TYPES", SqlDbType.Bit); param[1].Value = ORDER_TYPES; dt = dal.SelectData("PRT_INVO_ORDER", param); dal.ConClose(); return(dt); }
public DataTable RPT_CALC_PROFT_COST(String BEGIN_DATE, String END_DATE) { DAL.DataAccessLayer dal = new DAL.DataAccessLayer(); DataTable dt = new DataTable(); SqlParameter[] param = new SqlParameter[2]; param[0] = new SqlParameter("@BEGIN_DATE", SqlDbType.NVarChar, 50); param[0].Value = BEGIN_DATE; param[1] = new SqlParameter("@END_DATE", SqlDbType.NVarChar, 50); param[1].Value = END_DATE; dt = dal.SelectData("RPT_CALC_PROFT_COST", param); dal.ConClose(); return(dt); }
public void UPDATE_CAT(int ID_CAT, string CAT_LABEL) { DAL.DataAccessLayer dal = new DAL.DataAccessLayer(); dal.ConOpen(); SqlParameter[] PARAM = new SqlParameter[2]; PARAM[0] = new SqlParameter("@ID_CAT", SqlDbType.Int); PARAM[1] = new SqlParameter("@CAT_LABEL", SqlDbType.NVarChar, 50); PARAM[0].Value = ID_CAT; PARAM[1].Value = CAT_LABEL; dal.ExecuteCommand("UPDATE_CAT", PARAM); dal.ConClose(); }
public int GET_ID_ORDER() { DAL.DataAccessLayer dal = new DAL.DataAccessLayer(); int ID = 0; DataTable dt = new DataTable(); dt = dal.SelectData("GET_ID_ORDER", null); if (dt.Rows.Count > 0) { ID = int.Parse(dt.Rows[0]["ID_ORDER"].ToString()); } dal.ConClose(); return(ID); }
public DataTable GET_ALL_PAID_SPENT_DOCS_BETWEEN_DATES(String BEGIN_DATE, String END_DATE) { DAL.DataAccessLayer dal = new DAL.DataAccessLayer(); DataTable dt = new DataTable(); SqlParameter[] param = new SqlParameter[2]; param[0] = new SqlParameter("@BEGIN_DATE", SqlDbType.NVarChar, 50); param[0].Value = BEGIN_DATE; param[1] = new SqlParameter("@END_DATE", SqlDbType.NVarChar, 50); param[1].Value = END_DATE; dt = dal.SelectData("GET_ALL_PAID_SPENT_DOCS_BETWEEN_DATES", param); dal.ConClose(); return(dt); }
public DataTable SEARCH_ORDER(int TYPE_OF_ORDER, String ORDER_FILTER) { DAL.DataAccessLayer dal = new DAL.DataAccessLayer(); DataTable dt = new DataTable(); SqlParameter[] param = new SqlParameter[2]; param[0] = new SqlParameter("@TYPE_OF_ORDER", SqlDbType.Bit); param[0].Value = TYPE_OF_ORDER; param[1] = new SqlParameter("@ORDER_FILTER", SqlDbType.NVarChar, 50); param[1].Value = ORDER_FILTER; dt = dal.SelectData("SEARCH_ORDER", param); dal.ConClose(); return(dt); }
public void UPDATE_PRICE_STOCK(int ID_PRD, int STOCK, double PRICE) { DAL.DataAccessLayer dal = new DAL.DataAccessLayer(); dal.ConOpen(); SqlParameter[] PARAM = new SqlParameter[3]; PARAM[0] = new SqlParameter("@ID_PRD", SqlDbType.Int); PARAM[1] = new SqlParameter("@STOCK", SqlDbType.Float); PARAM[2] = new SqlParameter("@PRICE", SqlDbType.Int); PARAM[0].Value = ID_PRD; PARAM[1].Value = STOCK; PARAM[2].Value = PRICE; dal.ExecuteCommand("UPDATE_PRICE_STOCK", PARAM); dal.ConClose(); }
public DataTable RPT_NETMONEY_WITH_USR(String BEGIN_DATE, String END_DATE, string SALES_MAN) { DAL.DataAccessLayer dal = new DAL.DataAccessLayer(); DataTable dt = new DataTable(); SqlParameter[] param = new SqlParameter[3]; param[0] = new SqlParameter("@BEGIN_DATE", SqlDbType.NVarChar, 50); param[0].Value = BEGIN_DATE; param[1] = new SqlParameter("@END_DATE", SqlDbType.NVarChar, 50); param[1].Value = END_DATE; param[2] = new SqlParameter("@SALES_MAN", SqlDbType.NVarChar, 50); param[2].Value = SALES_MAN; dt = dal.SelectData("RPT_NETMONEY_WITH_USR", param); dal.ConClose(); return(dt); }
public DataTable SEARCH_ORDER_DATE(int TYPE_OF_ORDER, String BEGIN_DATE, String END_DATE) { DAL.DataAccessLayer dal = new DAL.DataAccessLayer(); DataTable dt = new DataTable(); SqlParameter[] param = new SqlParameter[3]; param[0] = new SqlParameter("@TYPE_OF_ORDER", SqlDbType.Bit); param[0].Value = TYPE_OF_ORDER; param[1] = new SqlParameter("@BEGIN_DATE", SqlDbType.NVarChar, 50); param[1].Value = BEGIN_DATE; param[2] = new SqlParameter("@END_DATE", SqlDbType.NVarChar, 50); param[2].Value = END_DATE; dt = dal.SelectData("SEARCH_ORDER_DATE", param); dal.ConClose(); return(dt); }
public void ADD_ORDER_DETAILS(int ID_ORDER, int ID_PRD, float PRD_QTY, float QTY_BY_PRICE, float PRD_PRICE) { DAL.DataAccessLayer dal = new DAL.DataAccessLayer(); dal.ConOpen(); SqlParameter[] PARAM = new SqlParameter[5]; PARAM[0] = new SqlParameter("@ID_ORDER", SqlDbType.Int); PARAM[1] = new SqlParameter("@ID_PRD", SqlDbType.Int); PARAM[2] = new SqlParameter("@PRD_QTY", SqlDbType.Float); PARAM[3] = new SqlParameter("@QTY_BY_PRICE", SqlDbType.Float); PARAM[4] = new SqlParameter("@PRD_PRICE", SqlDbType.Float); PARAM[0].Value = ID_ORDER; PARAM[1].Value = ID_PRD; PARAM[2].Value = PRD_QTY; PARAM[3].Value = QTY_BY_PRICE; PARAM[4].Value = PRD_PRICE; dal.ExecuteCommand("ADD_ORDER_DETAILS", PARAM); dal.ConClose(); }
public int GET_ID_MONEYIES() { DAL.DataAccessLayer dal = new DAL.DataAccessLayer(); int ID = 1; DataTable dt = new DataTable(); dt = dal.SelectData("GET_ID_MONEYIES", null); if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { ID = int.Parse(dt.Rows[i]["ID_MONEY"].ToString()); } ID = ID + 1; } dal.ConClose(); return(ID); }
public DataTable RPT_USR_SALES(int TYPE_OF_ORDER, String BEGIN_DATE, String END_DATE, string SALES_MAN) { DAL.DataAccessLayer dal = new DAL.DataAccessLayer(); DataTable dt = new DataTable(); SqlParameter[] param = new SqlParameter[4]; param[0] = new SqlParameter("@ORDER_TYPE", SqlDbType.Bit); param[0].Value = TYPE_OF_ORDER; param[1] = new SqlParameter("@BEGIN_DATE", SqlDbType.NVarChar, 50); param[1].Value = BEGIN_DATE; param[2] = new SqlParameter("@END_DATE", SqlDbType.NVarChar, 50); param[2].Value = END_DATE; param[3] = new SqlParameter("@SALES_MAN", SqlDbType.NVarChar, 50); param[3].Value = SALES_MAN; dt = dal.SelectData("RPT_USR_SALES", param); dal.ConClose(); return(dt); }
public void UPDATE_MONEY_DETAILS(int ID_MONEY, int ID_COUST, String TYPES_OF_MONEY, String NOTES, DateTime MONEY_DATE) { DAL.DataAccessLayer dal = new DAL.DataAccessLayer(); dal.ConOpen(); SqlParameter[] PARAM = new SqlParameter[5]; PARAM[0] = new SqlParameter("@ID_MONEY", SqlDbType.Int); PARAM[1] = new SqlParameter("@ID_COUST", SqlDbType.Int); PARAM[2] = new SqlParameter("@TYPES_OF_MONEY", SqlDbType.NVarChar, 250); PARAM[3] = new SqlParameter("@NOTES", SqlDbType.NVarChar, 250); PARAM[4] = new SqlParameter("@MONEY_DATE", SqlDbType.Date); PARAM[0].Value = ID_MONEY; PARAM[1].Value = ID_COUST; PARAM[2].Value = TYPES_OF_MONEY; PARAM[3].Value = NOTES; PARAM[4].Value = MONEY_DATE; dal.ExecuteCommand("UPDATE_MONEY_DETAILS", PARAM); dal.ConClose(); }