Ejemplo n.º 1
0
 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();
 }
Ejemplo n.º 2
0
 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();
 }
Ejemplo n.º 3
0
 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();
 }
Ejemplo n.º 4
0
 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();
 }
Ejemplo n.º 5
0
 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();
 }
Ejemplo n.º 6
0
 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();
 }
Ejemplo n.º 7
0
 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();
 }
Ejemplo n.º 8
0
 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();
 }
Ejemplo n.º 9
0
 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();
 }
Ejemplo n.º 10
0
        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();
        }
Ejemplo n.º 11
0
        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();
        }
Ejemplo n.º 12
0
        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();
        }
Ejemplo n.º 13
0
 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();
 }
Ejemplo n.º 14
0
 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();
 }
Ejemplo n.º 15
0
 public void UPDATE_COUSTOMER(int ID_COUST, String COUST_NAME, String COUST_TEL, String COUST_ADD, String COUST_TYPE, byte[] COUST_IMG)
 {
     DAL.DataAccessLayer dal = new DAL.DataAccessLayer();
     dal.ConOpen();
     SqlParameter[] PARAM = new SqlParameter[6];
     PARAM[0]       = new SqlParameter("@COUST_NAME", SqlDbType.NVarChar, 50);
     PARAM[1]       = new SqlParameter("@TEL", SqlDbType.NVarChar, 50);
     PARAM[2]       = new SqlParameter("@ADD", SqlDbType.NVarChar, 50);
     PARAM[3]       = new SqlParameter("@COUST_TYPE", SqlDbType.NVarChar, 50);
     PARAM[4]       = new SqlParameter("@COUST_IMG", SqlDbType.Image);
     PARAM[5]       = new SqlParameter("@ID_COUST", SqlDbType.Int);
     PARAM[0].Value = COUST_NAME;
     PARAM[1].Value = COUST_TEL;
     PARAM[2].Value = COUST_ADD;
     PARAM[3].Value = COUST_TYPE;
     PARAM[4].Value = COUST_IMG;
     PARAM[5].Value = ID_COUST;
     dal.ExecuteCommand("UPDATE_COUSTOMER", PARAM);
     dal.ConClose();
 }
Ejemplo n.º 16
0
 public void ADD_PRODUCT(int ID_PRD, int ID_CAT, string BARCODE_PRODUCT, string LABEL, byte[] IMAGE, DateTime EXPIRE_DATE)
 {
     DAL.DataAccessLayer dal = new DAL.DataAccessLayer();
     dal.ConOpen();
     SqlParameter[] PARAM = new SqlParameter[6];
     PARAM[0]       = new SqlParameter("@ID_CAT", SqlDbType.Int);
     PARAM[1]       = new SqlParameter("@BARCODE_PRODUCT", SqlDbType.NVarChar, 50);
     PARAM[2]       = new SqlParameter("@LABEL", SqlDbType.NVarChar, 50);
     PARAM[3]       = new SqlParameter("@IMAGE", SqlDbType.Image);
     PARAM[4]       = new SqlParameter("@ID_PRD", SqlDbType.Int);
     PARAM[5]       = new SqlParameter("@EXPIRE_DATE", SqlDbType.NVarChar, 50);
     PARAM[0].Value = ID_CAT;
     PARAM[1].Value = BARCODE_PRODUCT;
     PARAM[2].Value = LABEL;
     PARAM[3].Value = IMAGE;
     PARAM[4].Value = ID_PRD;
     PARAM[5].Value = EXPIRE_DATE;
     dal.ExecuteCommand("ADD_PRODUCT", PARAM);
     dal.ConClose();
 }
Ejemplo n.º 17
0
 public void ADD_PAID_SPENT_MONEY(int PAID_SPENT_ID, int COUST_ID, float THE_AMOUNT, DateTime DATE, String TYPE, String NOTS, string SALES_MAN)
 {
     DAL.DataAccessLayer dal = new DAL.DataAccessLayer();
     dal.ConOpen();
     SqlParameter[] PARAM = new SqlParameter[7];
     PARAM[0]       = new SqlParameter("@PAID_SPENT_ID", SqlDbType.Int);
     PARAM[1]       = new SqlParameter("@COUST_ID", SqlDbType.Int);
     PARAM[2]       = new SqlParameter("@THE_AMOUNT", SqlDbType.Float);
     PARAM[3]       = new SqlParameter("@DATE", SqlDbType.DateTime);
     PARAM[4]       = new SqlParameter("@TYPE", SqlDbType.NVarChar, 50);
     PARAM[5]       = new SqlParameter("@NOTS", SqlDbType.NVarChar, 50);
     PARAM[6]       = new SqlParameter("@SALES_MAN", SqlDbType.NVarChar, 50);
     PARAM[0].Value = PAID_SPENT_ID;
     PARAM[1].Value = COUST_ID;
     PARAM[2].Value = THE_AMOUNT;
     PARAM[3].Value = DATE;
     PARAM[4].Value = TYPE;
     PARAM[5].Value = NOTS;
     PARAM[6].Value = SALES_MAN;
     dal.ExecuteCommand("ADD_PAID_SPENT_MONEY", PARAM);
     dal.ConClose();
 }
Ejemplo n.º 18
0
 public void UPDATE_ORDER(int ID_ORDER, int ID_COUST, string ORDER_NOTES, int ORDER_TYPE, int PAID_OR_NOT, String SALES_MAN)
 {
     DAL.DataAccessLayer dal = new DAL.DataAccessLayer();
     dal.ConOpen();
     SqlParameter[] PARAM = new SqlParameter[7];
     PARAM[0]       = new SqlParameter("@ID_ORDER", SqlDbType.Int);
     PARAM[1]       = new SqlParameter("@ID_COUST", SqlDbType.Int);
     PARAM[2]       = new SqlParameter("@ORDER_NOTES", SqlDbType.NVarChar, 50);
     PARAM[3]       = new SqlParameter("@ORDER_TYPE", SqlDbType.Bit);
     PARAM[4]       = new SqlParameter("@PAID_OR_NOT", SqlDbType.Bit);
     PARAM[5]       = new SqlParameter("@SALES_MAN", SqlDbType.NVarChar, 50);
     PARAM[6]       = new SqlParameter("@ORDER_DATE", SqlDbType.Date);
     PARAM[0].Value = ID_ORDER;
     PARAM[1].Value = ID_COUST;
     PARAM[2].Value = ORDER_NOTES;
     PARAM[3].Value = ORDER_TYPE;
     PARAM[4].Value = PAID_OR_NOT;
     PARAM[5].Value = SALES_MAN;
     PARAM[6].Value = DateTime.Now.ToShortDateString();
     dal.ExecuteCommand("UPDATE_ORDER", PARAM);
     dal.ConClose();
 }
Ejemplo n.º 19
0
 public void UPDATE_ORDER_MONEY(int ID_MONEY, int ID_ORDER, int ID_COUST, float TOTAL_AMOUNT, float PAID_AMOUNT, float DISCOUNT_AMOUNT, float REMINDER_AMOUNT)
 {
     DAL.DataAccessLayer dal = new DAL.DataAccessLayer();
     dal.ConOpen();
     SqlParameter[] PARAM = new SqlParameter[7];
     PARAM[0]       = new SqlParameter("@ID_ORDER", SqlDbType.Int);
     PARAM[1]       = new SqlParameter("@ID_COUST", SqlDbType.Int);
     PARAM[2]       = new SqlParameter("@TOTAL_AMOUNT", SqlDbType.Float);
     PARAM[3]       = new SqlParameter("@PAID_AMOUNT", SqlDbType.Float);
     PARAM[4]       = new SqlParameter("@DISCOUNT_AMOUNT", SqlDbType.Float);
     PARAM[5]       = new SqlParameter("@REMINDER_AMOUNT", SqlDbType.Float);
     PARAM[6]       = new SqlParameter("@ID_MONEYIES", SqlDbType.Int);
     PARAM[0].Value = ID_ORDER;
     PARAM[1].Value = ID_COUST;
     PARAM[2].Value = TOTAL_AMOUNT;
     PARAM[3].Value = PAID_AMOUNT;
     PARAM[4].Value = DISCOUNT_AMOUNT;
     PARAM[5].Value = REMINDER_AMOUNT;
     PARAM[6].Value = ID_MONEY;
     dal.ExecuteCommand("UPDATE_ORDER_MONEY", PARAM);
     dal.ConClose();
 }
Ejemplo n.º 20
0
 public void UPDATE_USR(int USR_ID, string USR_FLNAME, string USRNAME, int[] USER_ACS)
 {
     DAL.DataAccessLayer dal = new DAL.DataAccessLayer();
     dal.ConOpen();
     SqlParameter[] PARAM = new SqlParameter[14];
     PARAM[0]        = new SqlParameter("@USR_FLNAME", SqlDbType.NVarChar, 50);
     PARAM[1]        = new SqlParameter("@USRNAME", SqlDbType.NVarChar, 50);
     PARAM[2]        = new SqlParameter("@USR_ID", SqlDbType.NVarChar, 50);
     PARAM[3]        = new SqlParameter("@ACS1", SqlDbType.Bit);
     PARAM[4]        = new SqlParameter("@ACS2", SqlDbType.Bit);
     PARAM[5]        = new SqlParameter("@ACS3", SqlDbType.Bit);
     PARAM[6]        = new SqlParameter("@ACS4", SqlDbType.Bit);
     PARAM[7]        = new SqlParameter("@ACS5", SqlDbType.Bit);
     PARAM[8]        = new SqlParameter("@ACS6", SqlDbType.Bit);
     PARAM[9]        = new SqlParameter("@ACS7", SqlDbType.Bit);
     PARAM[10]       = new SqlParameter("@ACS8", SqlDbType.Bit);
     PARAM[11]       = new SqlParameter("@ACS9", SqlDbType.Bit);
     PARAM[12]       = new SqlParameter("@ACS10", SqlDbType.Bit);
     PARAM[13]       = new SqlParameter("@ACS11", SqlDbType.Bit);
     PARAM[0].Value  = USR_FLNAME;
     PARAM[1].Value  = USRNAME;
     PARAM[2].Value  = USR_ID;
     PARAM[3].Value  = USER_ACS[1];
     PARAM[4].Value  = USER_ACS[2];
     PARAM[5].Value  = USER_ACS[3];
     PARAM[6].Value  = USER_ACS[4];
     PARAM[7].Value  = USER_ACS[5];
     PARAM[8].Value  = USER_ACS[6];
     PARAM[9].Value  = USER_ACS[7];
     PARAM[10].Value = USER_ACS[8];
     PARAM[11].Value = USER_ACS[9];
     PARAM[12].Value = USER_ACS[10];
     PARAM[13].Value = USER_ACS[11];
     dal.ExecuteCommand("UPDATE_USR", PARAM);
     dal.ConClose();
 }