Exemplo n.º 1
0
        /**********************************************************************/

        // اجراء لاضافة البيانات لقاعدة البيانات
        public void ADD_MONITER(int user_id, DateTime date, string time, string process, string screens)

        {
            DAL.DataAccessLayer DAL = new DAL.DataAccessLayer();
            DAL.open();
            SqlParameter[] param = new SqlParameter[5];

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

            param[1]       = new SqlParameter("@date", SqlDbType.Date);
            param[1].Value = date;

            param[2]       = new SqlParameter("@time", SqlDbType.NVarChar, 50);
            param[2].Value = time;

            param[3]       = new SqlParameter("@process", SqlDbType.VarChar, 50);
            param[3].Value = process;

            param[4]       = new SqlParameter("@screens", SqlDbType.VarChar, 50);
            param[4].Value = screens;



            DAL.ExcuteCommand("ADD_MONITER", param);
            DAL.close();
        }
Exemplo n.º 2
0
        // اجراء  تحديث على البيانات لقاعدة البيانات
        public void UPDATE_CATEGORY(string cat_code, string cat_name, string quantity,
                                    int dep_id, int unit_id, int sub_cat)

        {
            DAL.DataAccessLayer DAL = new DAL.DataAccessLayer();
            DAL.open();
            SqlParameter[] param = new SqlParameter[6];
            param[0]       = new SqlParameter("@cat_code", SqlDbType.NVarChar, 50);
            param[0].Value = cat_code;

            param[1]       = new SqlParameter("@cat_name", SqlDbType.NVarChar, 50);
            param[1].Value = cat_name;

            param[2]       = new SqlParameter("@quantity", SqlDbType.NVarChar, 50);
            param[2].Value = quantity;

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

            param[4]       = new SqlParameter("@unit_id", SqlDbType.Int);
            param[4].Value = unit_id;

            param[5]       = new SqlParameter("@sub_cat_id", SqlDbType.Int);
            param[5].Value = sub_cat;


            DAL.ExcuteCommand("UPDATE_CATEGORY", param);
            DAL.close();
        }
Exemplo n.º 3
0
        /******************************** ADD ******************************************/

        // اجراء لاضافة البيانات لقاعدة البيانات
        public void ADD_PRODUCT(string pro_code, string pro_name, int pro_unit, int pro_category
                                , string pro_contry, string pro_company, Double pro_pay, Double pro_sale)

        {
            DAL.DataAccessLayer DAL = new DAL.DataAccessLayer();
            DAL.open();
            SqlParameter[] param = new SqlParameter[8];
            param[0]       = new SqlParameter("@pro_code", SqlDbType.NVarChar, 50);
            param[0].Value = pro_code;

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

            param[2]       = new SqlParameter("@pro_unit", SqlDbType.Int);
            param[2].Value = pro_unit;

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

            param[4]       = new SqlParameter("@pro_contry", SqlDbType.VarChar, 50);
            param[4].Value = pro_contry;

            param[5]       = new SqlParameter("@pro_company", SqlDbType.VarChar, 50);
            param[5].Value = pro_company;

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

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

            DAL.ExcuteCommand("ADD_PRODUCT", param);
            DAL.close();
        }
Exemplo n.º 4
0
 public void DeleteAllTransports()
 {
     DAL.DataAccessLayer dal = new DAL.DataAccessLayer();
     dal.Open();
     dal.ExcuteCommand("SP_DeleteAllTransports", null);
     dal.Close();
 }
Exemplo n.º 5
0
        public void ADD_PRODUCT(int ID_Cat, string Product_Name, string ID_Product, int Qty, string Price, byte[] Img)
        {
            DAL.DataAccessLayer DAL = new DAL.DataAccessLayer();
            DAL.Open();
            SqlParameter[] param = new SqlParameter[6];
            param[0]       = new SqlParameter("@ID_CAT", SqlDbType.Int);
            param[0].Value = ID_Cat;

            param[1]       = new SqlParameter("@ID_PRODUCT", SqlDbType.NVarChar, 50);
            param[1].Value = ID_Product;

            param[2]       = new SqlParameter("@PRODUCT_NAME", SqlDbType.NVarChar, 50);
            param[2].Value = Product_Name;

            param[3]       = new SqlParameter("@QTY", SqlDbType.Int);
            param[3].Value = Qty;

            param[4]       = new SqlParameter("@PRICE", SqlDbType.NVarChar, 50);
            param[4].Value = Price;

            param[5]       = new SqlParameter("@IMG", SqlDbType.Image);
            param[5].Value = Img;

            DAL.ExcuteCommand("SP_AddProduct", param);
            DAL.Close();
        }
Exemplo n.º 6
0
        // اجراء التعديل البيانات لقاعدة البيانات
        public void UPDATE_PRIV(int user_id, int screen_id, Boolean priv_display, Boolean priv_add, Boolean priv_edit, Boolean priv_delete)

        {
            DAL.DataAccessLayer DAL = new DAL.DataAccessLayer();
            DAL.open();
            SqlParameter[] param = new SqlParameter[6];

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

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

            param[2]       = new SqlParameter("@priv_display", SqlDbType.Bit);
            param[2].Value = priv_display;

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

            param[4]       = new SqlParameter("@priv_edit", SqlDbType.Bit);
            param[4].Value = priv_edit;

            param[5]       = new SqlParameter("@priv_delete", SqlDbType.Bit);
            param[5].Value = priv_delete;

            DAL.ExcuteCommand("UPDATE_PRIV", param);
            DAL.close();
        }
Exemplo n.º 7
0
        /*************************************** UPDATE **************************************************/

        // اجراء لاضافة البيانات لقاعدة البيانات
        public void UPDATE_CUSTOMER(string cust_code, string cust_name, int cust_phone,
                                    string cust_addrees /*, Boolean cust_status*/)

        {
            DAL.DataAccessLayer DAL = new DAL.DataAccessLayer();
            DAL.open();
            SqlParameter[] param = new SqlParameter[4];
            param[0]       = new SqlParameter("@cust_code", SqlDbType.NVarChar, 50);
            param[0].Value = cust_code;

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

            param[2]       = new SqlParameter("@cust_phone", SqlDbType.Int);
            param[2].Value = cust_phone;

            param[3]       = new SqlParameter("@cust_addrees", SqlDbType.VarChar, 50);
            param[3].Value = cust_addrees;

            //param[4] = new SqlParameter("@cust_status", SqlDbType.Bit);
            //param[4].Value = cust_status;


            DAL.ExcuteCommand("UPDATE_CUSTOMER", param);
            DAL.close();
        }
Exemplo n.º 8
0
 public void DeleteAllHistory()
 {
     DAL.DataAccessLayer dal = new DAL.DataAccessLayer();
     dal.Open();
     dal.ExcuteCommand("SP_DeleteAllHistory", null);
     dal.Close();
 }
Exemplo n.º 9
0
 public void DeleteAllGovernorates()
 {
     DAL.DataAccessLayer dal = new DAL.DataAccessLayer();
     dal.Open();
     dal.ExcuteCommand("SP_DeleteAllGovernorates", null);
     dal.Close();
 }
Exemplo n.º 10
0
 public void DeleteAllArrivalStations()
 {
     DAL.DataAccessLayer dal = new DAL.DataAccessLayer();
     dal.Open();
     dal.ExcuteCommand("SP_DeleteAllArrivalStations", null);
     dal.Close();
 }
Exemplo n.º 11
0
        public void ADD_INOIES_DETEALS2(string sales_code, string pro_code, string pro_name, string pro_unit
                                        , Double pro_sale, int pro_quntity, Double inv_total)

        {
            DAL.DataAccessLayer DAL = new DAL.DataAccessLayer();
            DAL.open();
            SqlParameter[] param = new SqlParameter[7];
            param[0]       = new SqlParameter("@sales_code", SqlDbType.NVarChar, 50);
            param[0].Value = sales_code;

            param[1]       = new SqlParameter("@pro_code", SqlDbType.NVarChar, 50);
            param[1].Value = pro_code;

            param[2]       = new SqlParameter("@pro_name", SqlDbType.NVarChar, 50);
            param[2].Value = pro_name;

            param[3]       = new SqlParameter("@pro_unit", SqlDbType.NVarChar, 50);
            param[3].Value = pro_unit;

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

            param[5]       = new SqlParameter("@pro_quntity", SqlDbType.Int);
            param[5].Value = pro_quntity;

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

            DAL.ExcuteCommand("ADD_INOIES_DETEALS2", param);
            DAL.close();
        }
Exemplo n.º 12
0
        // اجراء لاضافة البيانات لقاعدة البيانات
        public void ADD_SPEND_DETALIS(string pro_code, string pro_name, string pro_unit, int pro_quantity, string spend_code)

        {
            DAL.DataAccessLayer DAL = new DAL.DataAccessLayer();
            DAL.open();
            SqlParameter[] param = new SqlParameter[5];
            param[0]       = new SqlParameter("@pro_code", SqlDbType.NVarChar, 50);
            param[0].Value = pro_code;

            param[1]       = new SqlParameter("@pro_name", SqlDbType.NVarChar, 50);
            param[1].Value = pro_name;

            param[2]       = new SqlParameter("@pro_unit", SqlDbType.NVarChar, 50);
            param[2].Value = pro_unit;

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

            param[4]       = new SqlParameter("@spend_code", SqlDbType.NVarChar, 50);
            param[4].Value = spend_code;



            DAL.ExcuteCommand("ADD_SPEND_DETALIS", param);
            DAL.close();
        }
Exemplo n.º 13
0
        private void BtnDelete_Click(object sender, EventArgs e)
        {
            try
            {
                Confirmation cfr = new Confirmation();
                if (cfr.ShowDialog() == DialogResult.OK)
                {
                    SqlParameter[] param = new SqlParameter[1];
                    int            id    = Convert.ToInt32(dataGridView1.CurrentRow.Cells[0].Value);
                    param[0]       = new SqlParameter("@IdProvider", SqlDbType.Int);
                    param[0].Value = id;

                    data.ExcuteCommand("DeleteProvider", param);
                    if (dataGridView1.Rows.Count != 0)
                    {
                        dataGridView1.Rows.RemoveAt(dataGridView1.CurrentRow.Index);
                    }
                    MessageBox.Show("Vous avez suprimé ce fournisseur avec succés", "Suprimer", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    lblPos.Text = bmb.Position + 1 + "/" + bmb.Count;
                }
            }
            catch
            {
                return;
            }
        }
Exemplo n.º 14
0
 public void DeleteAllRecruitingAreas()
 {
     DAL.DataAccessLayer dal = new DAL.DataAccessLayer();
     dal.Open();
     dal.ExcuteCommand("SP_DeleteAllRecruitingAreas", null);
     dal.Close();
 }
Exemplo n.º 15
0
        /******************************** ADD ******************************************/

        // اجراء لاضافة البيانات لقاعدة البيانات
        public void ADD_BILLS_2(string bills_no, DateTime bills_date, Double bills_amount, string bills_amount_ar
                                , string bills_descrption, int cust_id, string cust_name)

        {
            DAL.DataAccessLayer DAL = new DAL.DataAccessLayer();
            DAL.open();
            SqlParameter[] param = new SqlParameter[7];
            param[0]       = new SqlParameter("@bills_no", SqlDbType.NVarChar, 50);
            param[0].Value = bills_no;

            param[1]       = new SqlParameter("@bills_date", SqlDbType.DateTime);
            param[1].Value = bills_date;

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

            param[3]       = new SqlParameter("@bills_amount_ar", SqlDbType.NVarChar, 50);
            param[3].Value = bills_amount_ar;

            param[4]       = new SqlParameter("@bills_descrption", SqlDbType.NVarChar, 50);
            param[4].Value = bills_descrption;

            param[5]       = new SqlParameter("@cust_id", SqlDbType.Int);
            param[5].Value = cust_id;

            param[6]       = new SqlParameter("@cust_name", SqlDbType.NVarChar, 50);
            param[6].Value = cust_name;

            DAL.ExcuteCommand("ADD_BILLS_2", param);
            DAL.close();
        }
Exemplo n.º 16
0
        /*************************************** UPDATE **************************************************/

        // اجراء لاضافة البيانات لقاعدة البيانات
        public void UPDATE_SUPPLAY(string supp_code, string supp_name, int supp_phone,
                                   string aupp_addrees /*, Boolean supp_status*/)

        {
            DAL.DataAccessLayer DAL = new DAL.DataAccessLayer();
            DAL.open();
            SqlParameter[] param = new SqlParameter[4];
            param[0]       = new SqlParameter("@supp_code", SqlDbType.NVarChar, 50);
            param[0].Value = supp_code;

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

            param[2]       = new SqlParameter("@supp_phone", SqlDbType.Int);
            param[2].Value = supp_phone;

            param[3]       = new SqlParameter("@aupp_addrees", SqlDbType.VarChar, 50);
            param[3].Value = aupp_addrees;

            //param[4] = new SqlParameter("@supp_status", SqlDbType.Bit);
            //param[4].Value = supp_status;



            DAL.ExcuteCommand("UPDATE_SUPPLAY", param);
            DAL.close();
        }
Exemplo n.º 17
0
 public void UpdateArrivalIdInStudents()
 {
     DAL.DataAccessLayer dal = new DAL.DataAccessLayer();
     dal.Open();
     dal.ExcuteCommand("SP_UpdateArrivalIdInStudents", null);
     dal.Close();
 }
Exemplo n.º 18
0
        //function to add student
        public void Add_Student(int GeneralNumber, int Company, string Name, string Degree,
                                string RecruitingArea, string Governorate)
        {
            DAL.DataAccessLayer dal = new DAL.DataAccessLayer();
            dal.Open();
            SqlParameter[] param = new SqlParameter[6];
            param[0]       = new SqlParameter("@GeneralNumber", SqlDbType.Int);
            param[0].Value = GeneralNumber;
            param[1]       = new SqlParameter("@Company", SqlDbType.Int);
            param[1].Value = Company;
            param[2]       = new SqlParameter("@Name", SqlDbType.NVarChar, 50);
            param[2].Value = Name;
            param[3]       = new SqlParameter("@Degree", SqlDbType.NVarChar, 50);
            param[3].Value = Degree;
            param[4]       = new SqlParameter("@RecruitingArea", SqlDbType.NVarChar, 50);
            param[4].Value = RecruitingArea;
            param[5]       = new SqlParameter("@Governorate", SqlDbType.NVarChar, 50);
            param[5].Value = Governorate;

            /*
             * param[6] = new SqlParameter("@Degree_Id", SqlDbType.Int);
             * param[6].Value = Degree_Id;
             * param[7] = new SqlParameter("@RecruitingArea_Id", SqlDbType.Int);
             * param[7].Value = RecruitingArea_Id;
             * param[8] = new SqlParameter("@Governorate_Id", SqlDbType.Int);
             * param[8].Value = Governorate_Id;
             * */
            dal.ExcuteCommand("SP_AddStudent", param);
            dal.Close();
        }
Exemplo n.º 19
0
        /******************************** ADD ******************************************/

        // اجراء لاضافة البيانات لقاعدة البيانات
        public void ADD_INVOIES(string sales_code, DateTime sales_date, Double sales_discount, Double sales_exstra
                                , int cust_id, Double total_invoes, Double pro_sale, Double sales_type, Double total_cost, Double total_profit
                                , Double total_paid, string total_paid_text, Double total_remain, string total_remain_text)

        {
            /*, Double pro_pay, Double pro_sale*/
            /*, int cust_id*/
            DAL.DataAccessLayer DAL = new DAL.DataAccessLayer();
            DAL.open();
            SqlParameter[] param = new SqlParameter[14];
            param[0]       = new SqlParameter("@sales_code", SqlDbType.NVarChar, 50);
            param[0].Value = sales_code;

            param[1]       = new SqlParameter("@sales_date", SqlDbType.DateTime);
            param[1].Value = sales_date;

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

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

            param[4]       = new SqlParameter("@cust_id", SqlDbType.Int);
            param[4].Value = cust_id;

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

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

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

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

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

            //Double total_paid,string total_paid_text, Double total_remain,string total_remain_text

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

            param[11]       = new SqlParameter("@total_paid_text", SqlDbType.NVarChar, 50);
            param[11].Value = total_paid_text;

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

            param[13]       = new SqlParameter("@total_remain_text", SqlDbType.NVarChar, 50);
            param[13].Value = total_remain_text;

            DAL.ExcuteCommand("ADD_INVOIES", param);
            DAL.close();
        }
Exemplo n.º 20
0
        // اجراء حذف البيانات لقاعدة البيانات
        public void DeleteUnit(String ID)

        {
            DAL.DataAccessLayer DAL = new DAL.DataAccessLayer();
            DAL.open();
            SqlParameter[] param = new SqlParameter[1];
            param[0]       = new SqlParameter("@ID", SqlDbType.VarChar, 50);
            param[0].Value = ID;
            DAL.ExcuteCommand("DeleteUnit", param);
            DAL.close();
        }
Exemplo n.º 21
0
        // اجراء حذف البيانات لقاعدة البيانات
        public void DELETE_DEPARTMINT(String dep_id)

        {
            DAL.DataAccessLayer DAL = new DAL.DataAccessLayer();
            DAL.open();
            SqlParameter[] param = new SqlParameter[1];
            param[0]       = new SqlParameter("@dep_id", SqlDbType.VarChar, 50);
            param[0].Value = dep_id;
            DAL.ExcuteCommand("DELETE_DEPARTMINT", param);
            DAL.close();
        }
Exemplo n.º 22
0
        public void DELETE_PRODUCT(string ID)
        {
            DAL.DataAccessLayer DAL = new DAL.DataAccessLayer();
            DAL.Open();
            SqlParameter[] param = new SqlParameter[1];
            param[0]       = new SqlParameter("@ID", SqlDbType.NVarChar, 50);
            param[0].Value = ID;

            DAL.ExcuteCommand("SP_DeleteProduct", param);
            DAL.Close();
        }
Exemplo n.º 23
0
        // اجراء حذف البيانات لقاعدة البيانات
        public void DeleteSupplyer(String supplyer_id)

        {
            DAL.DataAccessLayer DAL = new DAL.DataAccessLayer();
            DAL.open();
            SqlParameter[] param = new SqlParameter[1];
            param[0]       = new SqlParameter("@supplyer_id", SqlDbType.VarChar, 50);
            param[0].Value = supplyer_id;
            DAL.ExcuteCommand("DeleteSupplyer", param);
            DAL.close();
        }
Exemplo n.º 24
0
        // اجراء حذف البيانات لقاعدة البيانات
        public void DELETE_SUB_CAT(String sub_cat_id)

        {
            DAL.DataAccessLayer DAL = new DAL.DataAccessLayer();
            DAL.open();
            SqlParameter[] param = new SqlParameter[1];
            param[0]       = new SqlParameter("@ID", SqlDbType.VarChar, 50);
            param[0].Value = sub_cat_id;
            DAL.ExcuteCommand("DELETE_SUB_CAT", param);
            DAL.close();
        }
Exemplo n.º 25
0
        /******************************* الارصدة *******************************************/

        // اجراء لاضافة البيانات لقاعدة البيانات
        public void ADD_PALANCE(DateTime date)

        {
            DAL.DataAccessLayer DAL = new DAL.DataAccessLayer();
            DAL.open();
            SqlParameter[] param = new SqlParameter[1];
            param[0]       = new SqlParameter("@date", SqlDbType.Date);
            param[0].Value = date;

            DAL.ExcuteCommand("ADD_PALANCE", param);
            DAL.close();
        }
Exemplo n.º 26
0
        public void AddProvider(int IdProvider, string ProviderName, string Tele1, string Tele2,
                                string Tele3, string Tele4, string Email)
        {
            SqlParameter[] param = new SqlParameter[7];
            param[0]       = new SqlParameter("@IdProvider", SqlDbType.Int);
            param[0].Value = IdProvider;

            param[1]       = new SqlParameter("@ProviderName", SqlDbType.NVarChar, 60);
            param[1].Value = ProviderName;
            param[2]       = new SqlParameter("@Tele1", SqlDbType.NChar, 14);
            param[2].Value = Tele1;
            param[3]       = new SqlParameter("@Tele2", SqlDbType.NChar, 14);
            param[3].Value = Tele2;
            param[4]       = new SqlParameter("@Tele3", SqlDbType.NChar, 14);
            param[4].Value = Tele3;
            param[5]       = new SqlParameter("@Tele4", SqlDbType.NChar, 14);
            param[5].Value = Tele4;
            param[6]       = new SqlParameter("@Email", SqlDbType.NVarChar, 100);
            param[6].Value = Email;

            data.ExcuteCommand("AddProvider", param);
        }
Exemplo n.º 27
0
        // اجراء لاضافة البيانات لقاعدة البيانات
        public void ADD_UNIT(string unit_name)

        {
            DAL.DataAccessLayer DAL = new DAL.DataAccessLayer();
            DAL.open();
            SqlParameter[] param = new SqlParameter[1];
            param[0]       = new SqlParameter("@unit_name", SqlDbType.NVarChar, 50);
            param[0].Value = unit_name;


            DAL.ExcuteCommand("ADD_UNIT", param);
            DAL.close();
        }
Exemplo n.º 28
0
        /******************************** DELETE****************************************/

        public void DELETE_SUPPLAY(string supp_code)

        {
            DAL.DataAccessLayer DAL = new DAL.DataAccessLayer();
            DAL.open();
            SqlParameter[] param = new SqlParameter[1];

            param[0]       = new SqlParameter("@supp_code", SqlDbType.NVarChar, 50);
            param[0].Value = supp_code;


            DAL.ExcuteCommand("DELETE_SUPPLAY", param);
            DAL.close();
        }
Exemplo n.º 29
0
        // اجراء حذف البيانات لقاعدة البيانات
        public void DELETE_USERES(int user_id)

        {
            DAL.DataAccessLayer DAL = new DAL.DataAccessLayer();
            DAL.open();
            SqlParameter[] param = new SqlParameter[1];

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


            DAL.ExcuteCommand("DELETE_USERES", param);
            DAL.close();
        }
Exemplo n.º 30
0
        /******************************** DELETE****************************************/

        public void DELETE_CUSTOMER(string cust_code)

        {
            DAL.DataAccessLayer DAL = new DAL.DataAccessLayer();
            DAL.open();
            SqlParameter[] param = new SqlParameter[1];

            param[0]       = new SqlParameter("@cust_code", SqlDbType.NVarChar, 50);
            param[0].Value = cust_code;


            DAL.ExcuteCommand("DELETE_CUSTOMER", param);
            DAL.close();
        }