public void Add_suppliers(string Sup_name, string sup_phone, string Sup_gov, float total_money, float payed, float remain)
        {
            Data_acess_layer.DataAcess_layer dal = new Data_acess_layer.DataAcess_layer();
            dal.open();
            SqlParameter[] param = new SqlParameter[6];


            param[0]       = new SqlParameter("@name", SqlDbType.VarChar, 25);
            param[0].Value = Sup_name;

            param[1]       = new SqlParameter("@phone", SqlDbType.VarChar, 50);
            param[1].Value = sup_phone;

            param[2]       = new SqlParameter("@gavarment", SqlDbType.VarChar, 50);
            param[2].Value = Sup_gov;


            param[3]       = new SqlParameter("@total_money", SqlDbType.Float);
            param[3].Value = total_money;

            param[4]       = new SqlParameter("@payed_money", SqlDbType.Float);
            param[4].Value = payed;

            param[5]       = new SqlParameter("@remained_money", SqlDbType.Float);
            param[5].Value = remain;
            dal.ExecuteCommand("Add_supplier", param);
            dal.close();
        }
        public DataTable last_GET__lastID_orgi_matrial()
        {
            Data_acess_layer.DataAcess_layer dal = new Data_acess_layer.DataAcess_layer();
            dal.open();
            DataTable dt = new DataTable();

            dt = dal.select("GET__lastID_orgi_matrial", null);
            dal.close();
            return(dt);
        }
        public DataTable ALL_sup_remain_money()
        {
            Data_acess_layer.DataAcess_layer dal = new Data_acess_layer.DataAcess_layer();
            dal.open();
            DataTable dt = new DataTable();

            dt = dal.select("ALL_sup_remain_money", null);
            dal.close();
            return(dt);
        }
        public DataTable last_cat()
        {
            Data_acess_layer.DataAcess_layer dal = new Data_acess_layer.DataAcess_layer();
            dal.open();
            DataTable dt = new DataTable();

            dt = dal.select("GET_LAST_cat", null);
            dal.close();
            return(dt);
        }
Esempio n. 5
0
        public DataTable All_sales()
        {
            Data_acess_layer.DataAcess_layer dal = new Data_acess_layer.DataAcess_layer();
            dal.open();
            DataTable dt = new DataTable();

            dt = dal.select("All_sales", null);
            dal.close();
            return(dt);
        }
Esempio n. 6
0
        public DataTable laST_ROW_IN_SAFE()
        {
            Data_acess_layer.DataAcess_layer dal = new Data_acess_layer.DataAcess_layer();
            dal.open();
            DataTable dt = new DataTable();

            dt = dal.select("laST_ROW_IN_SAFE", null);
            dal.close();
            return(dt);
        } //اخر صف ف الجدول
        public DataTable All_Category()
        {
            Data_acess_layer.DataAcess_layer dal = new Data_acess_layer.DataAcess_layer();
            dal.open();
            DataTable dt = new DataTable();

            dt = dal.select("ALL_catogory", null);
            dal.close();
            return(dt);
        }
 public void Delete_Org_product(int id)
 {
     Data_acess_layer.DataAcess_layer dal = new Data_acess_layer.DataAcess_layer();
     dal.open();
     SqlParameter[] param = new SqlParameter[1];
     param[0]       = new SqlParameter("@id", SqlDbType.Int);
     param[0].Value = id;
     dal.ExecuteCommand("Delete_org_products", param);
     dal.close();
 }
        public DataTable ALL_suppliers()
        {
            Data_acess_layer.DataAcess_layer dal = new Data_acess_layer.DataAcess_layer();
            dal.open();
            DataTable dt = new DataTable();

            dt = dal.select("ALL_suppliers", null);
            dal.close();
            return(dt);
        }
Esempio n. 10
0
        } //اخر صف ف الجدول

        public DataTable vertify_money() //جلب الفلوس الفعيله لعميله الصرف
        {
            Data_acess_layer.DataAcess_layer dal = new Data_acess_layer.DataAcess_layer();
            dal.open();
            DataTable dt = new DataTable();

            dt = dal.select("vertify_money", null);
            dal.close();
            return(dt);
        } //اخر صف ف ا
        public DataTable ALL_Org_products()
        {
            Data_acess_layer.DataAcess_layer dal = new Data_acess_layer.DataAcess_layer();
            dal.open();
            DataTable dt = new DataTable();

            dt = dal.select("ALL_org_products", null);
            dal.close();
            return(dt);
        }
Esempio n. 12
0
        public DataTable select_sales_from_order()
        {
            Data_acess_layer.DataAcess_layer dal = new Data_acess_layer.DataAcess_layer();
            dal.open();
            DataTable dt = new DataTable();

            dt = dal.select("select_sales_from_order", null);
            dal.close();
            return(dt);
        }
 public void Delete_User(int ID_cat)
 {
     Data_acess_layer.DataAcess_layer dal = new Data_acess_layer.DataAcess_layer();
     dal.open();
     SqlParameter[] param = new SqlParameter[1];
     param[0]       = new SqlParameter("@id", SqlDbType.Int);
     param[0].Value = ID_cat;
     dal.ExecuteCommand("Delete_Custmor", param);
     dal.close();
 }
        public DataTable payed_way()
        {
            Data_acess_layer.DataAcess_layer dal = new Data_acess_layer.DataAcess_layer();

            dal.open();
            DataTable dt = new DataTable();

            dt = dal.select("payed_way", null);
            dal.close();
            return(dt);
        }
        public DataTable GET_exchange_ORDER()
        {
            Data_acess_layer.DataAcess_layer dal = new Data_acess_layer.DataAcess_layer();

            dal.open();
            DataTable dt = new DataTable();

            dt = dal.select("GET_exhange_ORDER", null);
            dal.close();
            return(dt);
        }
        public void Delete_user(string Username)
        {
            Data_acess_layer.DataAcess_layer dal = new Data_acess_layer.DataAcess_layer();
            dal.open();
            SqlParameter[] param = new SqlParameter[1];


            param[0]       = new SqlParameter("@username", SqlDbType.VarChar, 50);
            param[0].Value = Username;
            dal.ExecuteCommand("Deletee_User", param);
            dal.close();
        }
        public DataTable Search_User(string @search)
        {
            Data_acess_layer.DataAcess_layer dal = new Data_acess_layer.DataAcess_layer();
            dal.open();
            DataTable dt = new DataTable();

            SqlParameter[] param = new SqlParameter[1];
            param[0]       = new SqlParameter("@search", SqlDbType.VarChar, 50);
            param[0].Value = @search;
            dt             = dal.select("Search_User", param);
            dal.close();
            return(dt);
        }
        public DataTable ALL_products__incat_for_print(int Id)
        {
            Data_acess_layer.DataAcess_layer dal = new Data_acess_layer.DataAcess_layer();
            dal.open();
            SqlParameter[] param = new SqlParameter[1];
            param[0]       = new SqlParameter("@id", SqlDbType.Int);
            param[0].Value = Id;
            DataTable dt = new DataTable();

            dt = dal.select("ALL_products__incat_for_print", param);
            dal.close();
            return(dt);
        }
Esempio n. 19
0
        public DataTable one_sales(string name)
        {
            Data_acess_layer.DataAcess_layer dal = new Data_acess_layer.DataAcess_layer();
            dal.open();
            SqlParameter[] param = new SqlParameter[1];

            param[0]       = new SqlParameter("@id", SqlDbType.Int);
            param[0].Value = name;
            DataTable dt = new DataTable();

            dt = dal.select("Selaes_id", param);
            dal.close();
            return(dt);
        }
        public DataTable Get_supply_detials_for_print(int id)
        {
            Data_acess_layer.DataAcess_layer dal = new Data_acess_layer.DataAcess_layer();
            dal.open();
            SqlParameter[] param = new SqlParameter[1];

            param[0]       = new SqlParameter("@id_suplly", SqlDbType.Int);
            param[0].Value = id;
            DataTable dt = new DataTable();

            dt = dal.select("Get_supply_detials_for_print", param);
            dal.close();
            return(dt);
        }
        public DataTable Exchang_detials_forPrint(int id)
        {
            Data_acess_layer.DataAcess_layer dal = new Data_acess_layer.DataAcess_layer();

            dal.open();
            DataTable dt = new DataTable();

            SqlParameter[] param = new SqlParameter[1];
            param[0]       = new SqlParameter("@id_order", SqlDbType.Int);
            param[0].Value = id;
            dt             = dal.select("Exchang_detials_forPrint", param);
            dal.close();
            return(dt);
        }
        public DataTable vertify_orgianl_qun(int id)
        {
            Data_acess_layer.DataAcess_layer dal = new Data_acess_layer.DataAcess_layer();

            dal.open();
            DataTable dt = new DataTable();

            SqlParameter[] param = new SqlParameter[1];
            param[0]       = new SqlParameter("@id", SqlDbType.Int);
            param[0].Value = id;
            dt             = dal.select("vertify_orgianl_qun", param);
            dal.close();
            return(dt);
        }
        public DataTable cus_money(int id)
        {
            Data_acess_layer.DataAcess_layer dal = new Data_acess_layer.DataAcess_layer();
            dal.open();
            SqlParameter[] param = new SqlParameter[1];


            param[0]       = new SqlParameter("@id", SqlDbType.Int);
            param[0].Value = id;
            DataTable dt = new DataTable();

            dt = dal.select("cus_money", param);
            dal.close();
            return(dt);
        }
        public DataTable show_ex_products(int qun)
        {
            Data_acess_layer.DataAcess_layer dal = new Data_acess_layer.DataAcess_layer();
            dal.open();
            SqlParameter[] param = new SqlParameter[1];


            param[0]       = new SqlParameter("@qun", SqlDbType.Int);
            param[0].Value = qun;
            DataTable dt = new DataTable();

            dt = dal.select("ex-products", param);
            dal.close();
            return(dt);
        }
        public DataTable login(string username, string password)//we will get the values of username and password from form
        {
            Data_acess_layer.DataAcess_layer dal = new Data_acess_layer.DataAcess_layer();
            SqlParameter[] param = new SqlParameter[2];
            param[0]       = new SqlParameter("@username", SqlDbType.VarChar, 50);
            param[0].Value = username;
            param[1]       = new SqlParameter("@password", SqlDbType.VarChar, 50);
            param[1].Value = password;
            dal.open();
            DataTable dt = new DataTable();

            dt = dal.select("log_in", param); //??? we should close connection or not????
            dal.close();
            return(dt);
        }
        public DataTable search_orderes(string search_word)
        {
            Data_acess_layer.DataAcess_layer dal = new Data_acess_layer.DataAcess_layer();

            dal.open();
            DataTable dt = new DataTable();

            SqlParameter[] param = new SqlParameter[1];
            param[0]       = new SqlParameter("@word_search", SqlDbType.VarChar, 50);
            param[0].Value = search_word;

            dt = dal.select("SEARCH_ORDERES", param);
            dal.close();
            return(dt);
        }
        public void Add_exchange_detials(int exchange_ID, int org_id, int qun)
        {
            Data_acess_layer.DataAcess_layer dal = new Data_acess_layer.DataAcess_layer();
            dal.open();
            SqlParameter[] param = new SqlParameter[3];

            param[0]       = new SqlParameter("@ex_ID", SqlDbType.Int);
            param[0].Value = exchange_ID;
            param[1]       = new SqlParameter("@orgina_id", SqlDbType.Int);
            param[1].Value = org_id;
            param[2]       = new SqlParameter("@qun", SqlDbType.Int);
            param[2].Value = qun;
            dal.ExecuteCommand("add_exchange_Detials", param);
            dal.close();
        }
        public void update_order_sales_money(int id, int remain, int payed)
        {
            Data_acess_layer.DataAcess_layer dal = new Data_acess_layer.DataAcess_layer();
            dal.open();
            SqlParameter[] param = new SqlParameter[3];
            param[0]       = new SqlParameter("@id", SqlDbType.Int);
            param[0].Value = id;

            param[1]       = new SqlParameter("@remain", SqlDbType.Int);
            param[1].Value = remain;
            param[2]       = new SqlParameter("@payed", SqlDbType.Int);
            param[2].Value = payed;
            dal.ExecuteCommand("update_order_sales_money", param);
            dal.close();
        }
        public DataTable Get_order_detials(int id_order)
        {
            Data_acess_layer.DataAcess_layer dal = new Data_acess_layer.DataAcess_layer();

            dal.open();
            DataTable dt = new DataTable();

            SqlParameter[] param = new SqlParameter[1];
            param[0]       = new SqlParameter("@id_order", SqlDbType.Int);
            param[0].Value = id_order;

            dt = dal.select("Get_order_detials", param);
            dal.close();
            return(dt);
        }
        public void Add_exchange(string exchang_resp, string reciever, DateTime exchange_date)
        {
            Data_acess_layer.DataAcess_layer dal = new Data_acess_layer.DataAcess_layer();
            dal.open();
            SqlParameter[] param = new SqlParameter[3];
            param[0]       = new SqlParameter("@exchang_resp ", SqlDbType.VarChar, 20);
            param[0].Value = exchang_resp;

            param[1]       = new SqlParameter("@reciever", SqlDbType.VarChar, 50);
            param[1].Value = reciever;
            param[2]       = new SqlParameter("@dateTime", SqlDbType.DateTime);
            param[2].Value = exchange_date;

            dal.ExecuteCommand("add_exchange_per", param);
            dal.close();
        }