private void btnUpdate_Click(object sender, EventArgs e)
        {
            int I = CLASS_CATEGORY.SP_UPDATECATEGORY(int.Parse(txtCatID.Text), txtCatName.Text);

            MessageBox.Show("تم تعديل عدد" + I + "بنجاح");
            btnSelectALL_Click(null, null);
        }
        private void btnDelete_Click(object sender, EventArgs e)
        {
            int I = CLASS_CATEGORY.SP_DELETECATEGORY(int.Parse(txtCatID.Text));

            MessageBox.Show("تم حذف" + I + "بنجاح");
            btnSelectALL_Click(null, null);
            txtCatID.Text = txtCatName.Text = string.Empty;
        }
 private void btnDelete_Click(object sender, EventArgs e)
 {
     if (txtCatID.Text != string.Empty)
     {
         CLASS_CATEGORY.SP_CATEGORYDELTE(int.Parse(txtCatID.Text));
         MessageBox.Show("Supprimé avec succès", "Notification", MessageBoxButtons.OK, MessageBoxIcon.Information);
         btnDisplayAll_Click(null, null);
         txtCatID.Text = txtCatName.Text = string.Empty;
     }
 }
        private void button5_Click(object sender, EventArgs e)
        {
            if (txtSearch.Text == string.Empty)
            {
                MessageBox.Show("يجب ادخال الكلمة المراد البحث عنها");
                return;
            }
            DataTable dt = CLASS_CATEGORY.SP_SEARCECATEGORIES(txtSearch.Text);

            dgvCategories.DataSource = dt;
        }
 private void btnAdd_Click(object sender, EventArgs e)
 {
     if (txtCategoryName.Text == string.Empty)
     {
         MessageBox.Show("Veuillez et un nom de catégorie", "Message", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
         return;
     }
     CLASS_CATEGORY.SP_ADDCATEGORY(txtCategoryName.Text);
     MessageBox.Show("Catégorie a été ajouté avec succès", "Confirmation", MessageBoxButtons.OK, MessageBoxIcon.Information);
     txtCategoryName.Text = string.Empty;
 }
Exemple #6
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            if (txtCategory.Text == string.Empty)
            {
                MessageBox.Show("يجب ادخال اسم الصنف");
                return;
            }
            int i = CLASS_CATEGORY.SP_ADDNEWCATEGORY(txtCategory.Text);

            MessageBox.Show("تم اضافة عدد" + i + "من الصفوف");
            txtCategory.Text = string.Empty;
        }
        private void btnSelectALL_Click(object sender, EventArgs e)
        {
            DataTable dt = CLASS_CATEGORY.SP_SELECTALLCATEGORIES();

            dgvCategories.DataSource = dt;
        }
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     CLASS_CATEGORY.SP_CATEGORYUPDATE(int.Parse(txtCatID.Text), txtCatName.Text);
     MessageBox.Show("Mise à jour réussie", "Notification", MessageBoxButtons.OK, MessageBoxIcon.Information);
     btnDisplayAll_Click(null, null);
 }
        private void btnSearch_Click(object sender, EventArgs e)
        {
            DataTable dt = CLASS_CATEGORY.SP_CATEGORYSEARSH(txtDisplay.Text);

            dgvCategory.DataSource = dt;
        }
        private void btnDisplayAll_Click(object sender, EventArgs e)
        {
            DataTable dt = CLASS_CATEGORY.SP_CATEGORYSELECTALL();

            dgvCategory.DataSource = dt;
        }