private void BTNOK_Click(object sender, EventArgs e)
 {
     if (_CHECK)
     {
         CLASS_SUPPLIER.SP_ADDNEWSUPPLIER(TXTNAME.Text, TXTMOBILE.Text);
         MessageBox.Show("تم الاضافة بنجاح");
         TXTNAME.Text = TXTMOBILE.Text = "";
     }
     else
     {
         CLASS_SUPPLIER.SP_SUPPLIERUPDATE(FRM_SUPPLIERMANEGEMENT.id, TXTNAME.Text, TXTMOBILE.Text);
         MessageBox.Show("تم التعديل");
     }
 }
 private void btn_ajouter_Click(object sender, EventArgs e)
 {
     if (_check)
     {
         CLASS_SUPPLIER.sp_add_new_sup(txt_nom.Text, txt_tele.Text, txt_email.Text);
         MessageBox.Show("le fournisseur a été ajouter avec succées !!");
         txt_email.Text = txt_nom.Text = txt_tele.Text = "";
     }
     else
     {
         CLASS_SUPPLIER.sp_update_supplier(FRM_SUPPLIER_MANAGMENT.id, txt_nom.Text, txt_tele.Text, txt_email.Text);
         MessageBox.Show("le fournisseur a été Modifier avec succées !!");
     }
 }
Esempio n. 3
0
 public FRM_SEARCH(string _ch)
 {
     InitializeComponent();
     if (_ch == "supplier")
     {
         DataTable dt = CLASS_SUPPLIER.SP_SUPPLIERSELECT();
         dataGridView1.DataSource = dt;
         this.Text = "بيانات الموردين ";
     }
     else if (_ch == "product")
     {
         this.Text = "بيانات المنتجات";
         dataGridView1.DataSource = CLASS_PRODUCTS.SP_PRODUCTSELECT();
     }
     else if (_ch == "customer")
     {
         this.Text = "بيانات العملاء";
         dataGridView1.DataSource = CLASS_CUSTOMER.sp_customer_display();
     }
 }
 public FRM_ADDNEWSUPPLIER(bool CHECK)
 {
     InitializeComponent();
     _CHECK = CHECK;
     if (_CHECK)
     {
         this.Text  = "اضافة مورد جديد";
         BTNOK.Text = "اضافة";
     }
     else
     {
         this.Text  = "تعديل مورد جديد";
         BTNOK.Text = "تعديل";
         DataTable DT = CLASS_SUPPLIER.SP_SUPPLIERSELECTBYID(FRM_SUPPLIERMANEGEMENT.id);
         foreach (DataRow dr in DT.Rows)
         {
             TXTNAME.Text   = dr["Su_Name"].ToString();
             TXTMOBILE.Text = dr["Su_Mobile"].ToString();
         }
     }
 }
 public FRM_ADD_NEW_SUPPLIER(bool check)
 {
     InitializeComponent();
     _check = check;
     if (_check)
     {
         btn_ajouter.Text = "Ajouter";
         txt_titre.Text   = "Ajouter Fournisseur";
         this.Text        = "Ajouter fournisseur";
     }
     else
     {
         btn_ajouter.Text = "Modifier";
         txt_titre.Text   = "Modifier Fournisseur";
         this.Text        = "Modifier fournisseur";
         DataTable dt = CLASS_SUPPLIER.sp_supplier_select_id(FRM_SUPPLIER_MANAGMENT.id);
         foreach (DataRow dr in dt.Rows)
         {
             txt_nom.Text   = dr["nom_su"].ToString();
             txt_tele.Text  = dr["mobile_sup"].ToString();
             txt_email.Text = dr["email_sup"].ToString();
         }
     }
 }
Esempio n. 6
0
 private void button3_Click(object sender, EventArgs e)
 {
     id = int.Parse(dgv_supplier.SelectedRows[0].Cells[0].Value.ToString());
     CLASS_SUPPLIER.sp_delete_supplier(id);
     MessageBox.Show("supprimer avec succes !!");
 }
Esempio n. 7
0
        private void txt_rechercher_TextChanged(object sender, EventArgs e)
        {
            DataTable dt = CLASS_SUPPLIER.sp_search_supplier(txt_rechercher.Text);

            dgv_supplier.DataSource = dt;
        }
Esempio n. 8
0
        private void button4_Click(object sender, EventArgs e)
        {
            DataTable dt = CLASS_SUPPLIER.sp_select_supplier();

            dgv_supplier.DataSource = dt;
        }
Esempio n. 9
0
 private void BTNDELETE_Click(object sender, EventArgs e)
 {
     id = int.Parse(dgvSUPPLIER.SelectedRows[0].Cells[0].Value.ToString());
     CLASS_SUPPLIER.SP_SUPPLIERDELETE(id);
     MessageBox.Show("تم الحذف");
 }
Esempio n. 10
0
        private void txtSEARCH_TextChanged(object sender, EventArgs e)
        {
            DataTable dt = CLASS_SUPPLIER.SP_SUPPLIERSEARCH(txtSEARCH.Text);

            dgvSUPPLIER.DataSource = dt;
        }
Esempio n. 11
0
        private void BTNDISPLAY_Click(object sender, EventArgs e)
        {
            DataTable dt = CLASS_SUPPLIER.SP_SUPPLIERSELECT();

            dgvSUPPLIER.DataSource = dt;
        }