Exemple #1
0
        public void update_product_INFO(int ID_PORDUCT, int store_ID, string PRODUCT_NAME, int categore_ID, int Ptype_ID, decimal buy_price, decimal sellS_price, decimal sellP_price, decimal min_price, int min_qty, int qty)
        {
            DAL.DataAccessLayer DAL   = new DAL.DataAccessLayer();
            SqlParameter[]      param = new SqlParameter[11];
            param[0]       = new SqlParameter("@PRODUCT_NAME", SqlDbType.VarChar, 50);
            param[0].Value = PRODUCT_NAME;
            param[1]       = new SqlParameter("@QTE_IN_STOCK", SqlDbType.Int);
            param[1].Value = qty;
            param[2]       = new SqlParameter("@buy_PRICE", SqlDbType.Money);
            param[2].Value = buy_price;
            param[3]       = new SqlParameter("@SARALABIE_SECTORS", SqlDbType.Money);
            param[3].Value = sellP_price;
            param[4]       = new SqlParameter("@SARALABIE_SENTENCE", SqlDbType.Money);
            param[4].Value = sellS_price;
            param[5]       = new SqlParameter("@MINI_PRICE_TO_BUY", SqlDbType.Money);
            param[5].Value = min_qty;
            param[6]       = new SqlParameter("@MINI_QTY", SqlDbType.Int);
            param[6].Value = min_qty;
            param[7]       = new SqlParameter("@ID_CAT", SqlDbType.Int);
            param[7].Value = categore_ID;
            param[8]       = new SqlParameter("@STORE_ID", SqlDbType.Int);
            param[8].Value = store_ID;

            param[9]        = new SqlParameter("@ID_PORDUCT", SqlDbType.Int);
            param[9].Value  = ID_PORDUCT;
            param[10]       = new SqlParameter("@Ptype_ID", SqlDbType.Int);
            param[10].Value = Ptype_ID;



            DAL.Excutecommand("update_product_INFO", param);
            DAL.close();
        }
Exemple #2
0
 public void DELETE_PinCOM_OrderDetails(int ID)
 {
     DAL.DataAccessLayer DAL   = new DAL.DataAccessLayer();
     SqlParameter[]      param = new SqlParameter[1];
     param[0]       = new SqlParameter("@ID_PinCOM_OrderDetails", SqlDbType.Int);
     param[0].Value = ID;
     DAL.Excutecommand("Delete_PinCOM_OrderDetails", param);
     DAL.close();
 }
Exemple #3
0
 public void DELETE_user(int ID)
 {
     DAL.DataAccessLayer DAL   = new DAL.DataAccessLayer();
     SqlParameter[]      param = new SqlParameter[1];
     param[0]       = new SqlParameter("@ID_user", SqlDbType.Int);
     param[0].Value = ID;
     DAL.Excutecommand("DELETE_user", param);
     DAL.close();
 }
Exemple #4
0
 public void Delete_Payedmoney_com(int ID)
 {
     DAL.DataAccessLayer DAL   = new DAL.DataAccessLayer();
     SqlParameter[]      param = new SqlParameter[1];
     param[0]       = new SqlParameter("@ID_Payedmoney_COM", SqlDbType.Int);
     param[0].Value = ID;
     DAL.Excutecommand("Delete_Payedmoney_com", param);
     DAL.close();
 }
Exemple #5
0
 public void save_OverAlltotalORDER(int ORDER_ID, decimal OverAlltotalORDER)
 {
     DAL.DataAccessLayer DAL   = new DAL.DataAccessLayer();
     SqlParameter[]      param = new SqlParameter[2];
     param[0]       = new SqlParameter("@ORDER_ID", SqlDbType.Int);
     param[0].Value = ORDER_ID;
     param[1]       = new SqlParameter("@OverAlltotalORDER", SqlDbType.Money);
     param[1].Value = OverAlltotalORDER;
     DAL.Excutecommand("save_OverAlltotalORDER", param);
 }
Exemple #6
0
 public void ADD_PhoneNote(string NAME, string Phone)
 {
     DAL.DataAccessLayer DAL   = new DAL.DataAccessLayer();
     SqlParameter[]      param = new SqlParameter[2];
     param[0]       = new SqlParameter("@name", SqlDbType.VarChar, 50);
     param[0].Value = NAME;
     param[1]       = new SqlParameter("@phone", SqlDbType.VarChar, 50);
     param[1].Value = Phone;
     DAL.Excutecommand("NInsertNewPhonenote", param);
     DAL.close();
 }
Exemple #7
0
 public void Update_MProduct_QTY(int Product_ID, int product_QTY, int type)
 {
     DAL.DataAccessLayer DAL   = new DAL.DataAccessLayer();
     SqlParameter[]      param = new SqlParameter[3];
     param[0]       = new SqlParameter("@Product_ID", SqlDbType.Int);
     param[0].Value = Product_ID;
     param[1]       = new SqlParameter("@Old_QTY", SqlDbType.Int);
     param[1].Value = product_QTY;
     param[2]       = new SqlParameter("@type", SqlDbType.Int);
     param[2].Value = type;
     DAL.Excutecommand("update_QTY", param);
     DAL.close();
 }
Exemple #8
0
 public void Update_BProduct_QTY(int Product_ID, int Oldproduct_QTY, int Newproduct_QTY)
 {
     DAL.DataAccessLayer DAL   = new DAL.DataAccessLayer();
     SqlParameter[]      param = new SqlParameter[3];
     param[0]       = new SqlParameter("@Product_ID", SqlDbType.Int);
     param[0].Value = Product_ID;
     param[1]       = new SqlParameter("@Old_QTY", SqlDbType.Int);
     param[1].Value = Oldproduct_QTY;
     param[2]       = new SqlParameter("@New_QTY", SqlDbType.Int);
     param[2].Value = Newproduct_QTY;
     DAL.Excutecommand("updateQTY", param);
     DAL.close();
 }
 public void ADD_COM(string Customer_NAME, string Address, string Phone)
 {
     DAL.DataAccessLayer DAL   = new DAL.DataAccessLayer();
     SqlParameter[]      param = new SqlParameter[3];
     param[0]       = new SqlParameter("@Com_NAME", SqlDbType.VarChar, 50);
     param[0].Value = Customer_NAME;
     param[1]       = new SqlParameter("@Com_Address", SqlDbType.VarChar, 50);
     param[1].Value = Address;
     param[2]       = new SqlParameter("@Com_Phone", SqlDbType.VarChar, 50);
     param[2].Value = Phone;
     DAL.Excutecommand("NInsertNewCOM", param);
     DAL.close();
 }
        public void update_RemainMoney_Customer_INFO(int Customer_ID, int order_ID, decimal Remain_money)
        {
            DAL.DataAccessLayer DAL   = new DAL.DataAccessLayer();
            SqlParameter[]      param = new SqlParameter[3];
            param[0]       = new SqlParameter("@Customer_ID", SqlDbType.Int);
            param[0].Value = Customer_ID;
            param[1]       = new SqlParameter("@Remain_money", SqlDbType.Decimal);
            param[1].Value = Remain_money;
            param[2]       = new SqlParameter("@order_ID", SqlDbType.Int);
            param[2].Value = order_ID;

            DAL.Excutecommand("Update_RemainmoneyCustomer", param);
            DAL.close();
        }
Exemple #11
0
        public void update_Phonenote_INFO(int ID, string NAME, string Phone)
        {
            DAL.DataAccessLayer DAL   = new DAL.DataAccessLayer();
            SqlParameter[]      param = new SqlParameter[3];
            param[0]       = new SqlParameter("@ID", SqlDbType.Int);
            param[0].Value = ID;
            param[1]       = new SqlParameter("@name", SqlDbType.VarChar, 50);
            param[1].Value = NAME;
            param[2]       = new SqlParameter("@phone", SqlDbType.VarChar, 50);
            param[2].Value = Phone;

            DAL.Excutecommand("update_PhoneNote_INFO", param);
            DAL.close();
        }
Exemple #12
0
 public void ADD_COM_Order(DateTime Date_Order, int Customer_ID, int Order_Type, int user_typeID)
 {
     DAL.DataAccessLayer DAL   = new DAL.DataAccessLayer();
     SqlParameter[]      param = new SqlParameter[4];
     param[0]       = new SqlParameter("@Date_Order", SqlDbType.DateTime);
     param[0].Value = Date_Order;
     param[1]       = new SqlParameter("@Customer_ID ", SqlDbType.Int);
     param[1].Value = Customer_ID;
     param[2]       = new SqlParameter("@Order_Type", SqlDbType.Int);
     param[2].Value = Order_Type;
     param[3]       = new SqlParameter("@user_TypeID", SqlDbType.Int);
     param[3].Value = user_typeID;
     DAL.Excutecommand("insert_COM_Order", param);
     DAL.close();
 }
 public void Add_Paymoney_INFO(string name, string pay_discription, decimal amount, DateTime date)
 {
     DAL.DataAccessLayer DAL   = new DAL.DataAccessLayer();
     SqlParameter[]      param = new SqlParameter[4];
     param[0]       = new SqlParameter("@name", SqlDbType.VarChar, 50);
     param[0].Value = name;
     param[1]       = new SqlParameter("@pay_discription", SqlDbType.VarChar, 50);
     param[1].Value = pay_discription;
     param[2]       = new SqlParameter("@amount", SqlDbType.Decimal);
     param[2].Value = amount;
     param[3]       = new SqlParameter("@date", SqlDbType.DateTime);
     param[3].Value = date;
     DAL.Excutecommand("NInsertPayMoney_INFO", param);
     DAL.close();
 }
        public void update_COM_INFO(int ID_Customer, string Customer_NAME, string Address, string Phone)
        {
            DAL.DataAccessLayer DAL   = new DAL.DataAccessLayer();
            SqlParameter[]      param = new SqlParameter[4];
            param[0]       = new SqlParameter("@ID_COM", SqlDbType.Int);
            param[0].Value = ID_Customer;
            param[1]       = new SqlParameter("@COM_NAME", SqlDbType.VarChar, 50);
            param[1].Value = Customer_NAME;
            param[2]       = new SqlParameter("@Address", SqlDbType.VarChar, 50);
            param[2].Value = Address;
            param[3]       = new SqlParameter("@Phone", SqlDbType.VarChar, 50);
            param[3].Value = Phone;

            DAL.Excutecommand("update_COM_INFO", param);
            DAL.close();
        }
        public void ADD_Payedmoney_COM(int COM_ID, decimal COM_payedmoney, DateTime date, int order_ID)
        {
            DAL.DataAccessLayer DAL   = new DAL.DataAccessLayer();
            SqlParameter[]      param = new SqlParameter[4];
            param[0]       = new SqlParameter("@COM_ID", SqlDbType.Int);
            param[0].Value = COM_ID;
            param[1]       = new SqlParameter("@COM_payedmoney", SqlDbType.Decimal);
            param[1].Value = COM_payedmoney;
            param[2]       = new SqlParameter("@date", SqlDbType.DateTime);
            param[2].Value = date;
            param[3]       = new SqlParameter("@order_ID", SqlDbType.Int);
            param[3].Value = order_ID;

            DAL.Excutecommand("NInsertNew_Payedmoney_COM", param);
            DAL.close();
        }
        public void Add_moneySaver_Payed_INFO(int payedMoney_ID, int savemoneytype_ID, int usertyep_ID, DateTime date, int ordersavemoney_ID)
        {
            DAL.DataAccessLayer DAL   = new DAL.DataAccessLayer();
            SqlParameter[]      param = new SqlParameter[5];
            param[0]       = new SqlParameter("@savemoneytype_ID", SqlDbType.Int);
            param[0].Value = savemoneytype_ID;
            param[1]       = new SqlParameter("@usertyep_ID", SqlDbType.Int);
            param[1].Value = usertyep_ID;
            param[2]       = new SqlParameter("@payedMoney_ID", SqlDbType.Int);
            param[2].Value = payedMoney_ID;
            param[3]       = new SqlParameter("@date", SqlDbType.DateTime);
            param[3].Value = date;
            param[4]       = new SqlParameter("@ordersavemoney_type", SqlDbType.Int);
            param[4].Value = ordersavemoney_ID;

            DAL.Excutecommand("NInsertNewMoney_Payed_saver", param);
            DAL.close();
        }
        public void update_Payedmoney_COM_INFO(int ID, int Customer_ID, decimal payedmoney, DateTime date, int order_ID)
        {
            DAL.DataAccessLayer DAL   = new DAL.DataAccessLayer();
            SqlParameter[]      param = new SqlParameter[5];
            param[0]       = new SqlParameter("@ID", SqlDbType.Int);
            param[0].Value = ID;
            param[1]       = new SqlParameter("@com_ID", SqlDbType.Int);
            param[1].Value = Customer_ID;
            param[2]       = new SqlParameter("@payed_money", SqlDbType.Decimal);
            param[2].Value = payedmoney;
            param[3]       = new SqlParameter("@date", SqlDbType.DateTime);
            param[3].Value = date;
            param[4]       = new SqlParameter("@order_ID", SqlDbType.Int);
            param[4].Value = order_ID;

            DAL.Excutecommand("update_payedmoneyCOM_INFO", param);
            DAL.close();
        }
Exemple #18
0
        public void Update_COM_OrderDetails(int Order_type, int Product_ID, int ORDER_COM_ID, int product_QTY, decimal total_PProduct)
        {
            DAL.DataAccessLayer DAL   = new DAL.DataAccessLayer();
            SqlParameter[]      param = new SqlParameter[5];
            param[0]       = new SqlParameter("@Order_type", SqlDbType.Int);
            param[0].Value = Order_type;
            param[1]       = new SqlParameter("@Product_ID", SqlDbType.Int);
            param[1].Value = Product_ID;
            param[2]       = new SqlParameter("@ORDER_COM_ID", SqlDbType.Int);
            param[2].Value = ORDER_COM_ID;
            param[3]       = new SqlParameter("@product_QTY", SqlDbType.Int);
            param[3].Value = product_QTY;
            param[4]       = new SqlParameter("@total_PProduct", SqlDbType.Decimal);
            param[4].Value = total_PProduct;

            DAL.Excutecommand("Update_COMOrderDetail", param);
            DAL.close();
        }
        public void Add_moneySaver_Customer_INFO(int payedMoney_customer, int savemoneytype_ID, int usertyep_ID, DateTime date, int order_ID, int ordersavemoney_ID, decimal amount)
        {
            DAL.DataAccessLayer DAL   = new DAL.DataAccessLayer();
            SqlParameter[]      param = new SqlParameter[7];
            param[0]       = new SqlParameter("@payedMoney_customer", SqlDbType.Int);
            param[0].Value = payedMoney_customer;
            param[1]       = new SqlParameter("@savemoneytype_ID", SqlDbType.Int);
            param[1].Value = savemoneytype_ID;
            param[2]       = new SqlParameter("@usertyep_ID", SqlDbType.Int);
            param[2].Value = usertyep_ID;
            param[3]       = new SqlParameter("@date", SqlDbType.DateTime);
            param[3].Value = date;
            param[4]       = new SqlParameter("@order_ID", SqlDbType.Int);
            param[4].Value = order_ID;
            param[5]       = new SqlParameter("@Ordersavemony_type_ID", SqlDbType.Int);
            param[5].Value = ordersavemoney_ID;
            param[6]       = new SqlParameter("@amount", SqlDbType.Decimal);
            param[6].Value = amount;

            DAL.Excutecommand("NInsertNewMoney_CUSTOMER_saver", param);
            DAL.close();
        }