Exemple #1
0
        private void Btn_Save_Click(object sender, EventArgs e)
        {
            if (AddNew == false)
            {
                MessageBox.Show("من فضلك جيب الضغط على زر جديد اولا", "خطأ", MessageBoxButtons.OK, MessageBoxIcon.Error); return;
            }
            if (Txt_Name.Text == "" || Txt_Address.Text == "" || Cmb_Emp_Name.Text == "")
            {
                MessageBox.Show("من فضلك يجب ملىء جميع البيانات", "تحذير", MessageBoxButtons.OK, MessageBoxIcon.Warning); return;
            }

            if (MessageBox.Show("هل انت متاكد من حفظ بيانات المخزن جديد ؟", "تأكيد", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
            {
                RetriveData.ExcuteNonQuery("Sp_Store_Data_Insert",
                                           new Pararmter("@Store_Name", SqlDbType.NVarChar, Txt_Name.Text),
                                           new Pararmter("@Emp_ID", SqlDbType.Int, Cmb_Emp_Name.SelectedValue),
                                           new Pararmter("@Store_Address", SqlDbType.NVarChar, Txt_Address.Text),
                                           new Pararmter("@Store_Notes", SqlDbType.NVarChar, Txt_Notes.Text),
                                           new Pararmter("@User_ID", SqlDbType.Int, Login.UserID));

                MessageBox.Show("تم حفظ بيانات المخزن بنجاح", "تم", MessageBoxButtons.OK, MessageBoxIcon.Information);
                AddNew           = false;
                Lbl_Cust_ID.Text = "L01";
                Bind_StoreSearch();
            }
        }
 public void BindCmb_Search()
 {
     comboBox1.DataSource    = RetriveData.ExcuteQuery("Sp_Emplyees_SelectAll", CommandType.StoredProcedure);
     comboBox1.DisplayMember = "Emp_Name";
     comboBox1.ValueMember   = "Emp_ID";
     comboBox1.Text          = "";
 }
Exemple #3
0
        private void Btn_Edit_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("هل انت متاكد من تعديل بيانات العميل ؟", "تأكيد", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
            {
                if (Txt_Name.Text == "" || Txt_Address.Text == "" || Txt_Mobile.Text == "")
                {
                    MessageBox.Show("يجب على حضراتكم اكمال البيانات", "تحذير", MessageBoxButtons.OK, MessageBoxIcon.Warning); return;
                }

                if (Lbl_Cust_ID.Text != "L01")
                {
                    RetriveData.ExcuteNonQuery("Sp_Customers_Update",
                                               new Pararmter("@Cust_ID", SqlDbType.Int, int.Parse(Lbl_Cust_ID.Text).ToString()),
                                               new Pararmter("@Cust_Name", SqlDbType.NVarChar, Txt_Name.Text),
                                               new Pararmter("@Cust_Address", SqlDbType.NVarChar, Txt_Address.Text),
                                               new Pararmter("@Mobile", SqlDbType.NVarChar, Txt_Mobile.Text),
                                               new Pararmter("@Phone", SqlDbType.NVarChar, Txt_Phone.Text),
                                               new Pararmter("@Notes", SqlDbType.NVarChar, Txt_Notes.Text),
                                               new Pararmter("@User_ID", SqlDbType.NVarChar, Login.UserID));

                    MessageBox.Show("تم تعديل بيانات العميل بنجاح", "تم", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    AddNew           = false;
                    Lbl_Cust_ID.Text = "L01";
                    Bindcombo();
                }
            }
        }
Exemple #4
0
        private void Btn_Edit_Click(object sender, EventArgs e)
        {
            if (Lbl_Cust_ID.Text != "l01")
            {
                if (Txt_Name.Text == "" || Txt_Address.Text == "" || Cmb_Emp_Name.Text == "")
                {
                    MessageBox.Show("من فضلك يجب ملىء جميع البيانات", "تحذير", MessageBoxButtons.OK, MessageBoxIcon.Warning); return;
                }

                if (MessageBox.Show("هل انت متاكد من تعديل بيانات المخزن ؟", "تأكيد", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    RetriveData.ExcuteNonQuery("Sp_Store_Data_Update",
                                               new Pararmter("@Store_ID", SqlDbType.Int, int.Parse(Lbl_Cust_ID.Text.ToString())),
                                               new Pararmter("@Store_Name", SqlDbType.NVarChar, Txt_Name.Text),
                                               new Pararmter("@Emp_ID", SqlDbType.Int, Cmb_Emp_Name.SelectedValue),
                                               new Pararmter("@Store_Address", SqlDbType.NVarChar, Txt_Address.Text),
                                               new Pararmter("@Store_Notes", SqlDbType.NVarChar, Txt_Notes.Text),
                                               new Pararmter("@User_ID", SqlDbType.Int, Login.UserID));

                    MessageBox.Show("تم تعديل بيانات المخزن بنجاح", "تم", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    AddNew           = false;
                    Lbl_Cust_ID.Text = "L01";
                    Bind_StoreSearch();
                }
            }
        }
Exemple #5
0
        private void Btn_Save_Click(object sender, EventArgs e)
        {
            if (AddNew == false)
            {
                MessageBox.Show("من فضلك اضغط على زر جديد اولا !", "خطأ", MessageBoxButtons.OK, MessageBoxIcon.Error); return;
            }
            if (Txt_Name.Text == "" || Txt_Address.Text == "" || Txt_Mobile.Text == "")
            {
                MessageBox.Show("يجب على حضراتكم اكمال البيانات", "تحذير", MessageBoxButtons.OK, MessageBoxIcon.Warning); return;
            }
            if (MessageBox.Show("هل انت متاكد من حفظ عميل جديد ؟", "تأكيد", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
            {
                RetriveData.ExcuteNonQuery("Sp_Customers_Insert",
                                           new Pararmter("@Cust_Name", SqlDbType.NVarChar, Txt_Name.Text),
                                           new Pararmter("@Cust_Address", SqlDbType.NVarChar, Txt_Address.Text),
                                           new Pararmter("@Mobile", SqlDbType.NVarChar, Txt_Mobile.Text),
                                           new Pararmter("@Phone", SqlDbType.NVarChar, Txt_Phone.Text),
                                           new Pararmter("@Notes", SqlDbType.NVarChar, Txt_Notes.Text),
                                           new Pararmter("@User_ID", SqlDbType.NVarChar, Login.UserID));

                MessageBox.Show("تم حفظ العميل بنجاح", "تم", MessageBoxButtons.OK, MessageBoxIcon.Information);
                AddNew           = false;
                Lbl_Cust_ID.Text = "L01";
                Bindcombo();
            }
        }
 public void BindCmb_JobType()
 {
     Cmb_Job_Name.DataSource    = RetriveData.ExcuteQuery("Sp_Job_Type_SelectAll", CommandType.StoredProcedure);
     Cmb_Job_Name.DisplayMember = "Job_Name";
     Cmb_Job_Name.ValueMember   = "Job_ID";
     Cmb_Job_Name.Text          = "";
 }
        private void Btn_Save_Click(object sender, EventArgs e)
        {
            if (AddNew == false)
            {
                MessageBox.Show("من فضلك يجب الضغط على زر جديد اولا", "خطأ", MessageBoxButtons.OK, MessageBoxIcon.Error); return;
            }

            if (Txt_Name.Text == "" || Txt_Address.Text == "" || Txt_BasicSalary.Text == "" || Txt_Mobile.Text == "" || Txt_PersonalID.Text == "" || Txt_Phone.Text == "" || Cmb_Job_Name.Text == "")
            {
                MessageBox.Show("من فضلك يجب ملىء جميع البيانات", "تحذير", MessageBoxButtons.OK, MessageBoxIcon.Warning); return;
            }

            if (MessageBox.Show("هل انت متاكد من حفظ بيانات الموظف ؟", "تأكيد", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
            {
                RetriveData.ExcuteNonQuery("Sp_Emplyees_Insert",
                                           new Pararmter("@Emp_Name", SqlDbType.NVarChar, Txt_Name.Text),
                                           new Pararmter("@Job_ID", SqlDbType.Int, Cmb_Job_Name.SelectedValue),
                                           new Pararmter("@Emp_Mobile", SqlDbType.Int, int.Parse(Txt_Mobile.Text)),
                                           new Pararmter("@Emp_Phone", SqlDbType.Int, int.Parse(Txt_Phone.Text)),
                                           new Pararmter("@Emp_Address", SqlDbType.NVarChar, Txt_Address.Text),
                                           new Pararmter("@Personal_ID", SqlDbType.Int, int.Parse(Txt_PersonalID.Text)),
                                           new Pararmter("@Basic_Salary", SqlDbType.Int, decimal.Parse(Txt_BasicSalary.Text)),
                                           new Pararmter("@User_ID", SqlDbType.Int, Login.UserID));

                MessageBox.Show("تم حفظ بيانات الموظف بنجاح", "تم", MessageBoxButtons.OK, MessageBoxIcon.Information);

                AddNew           = false;
                Lbl_Cust_ID.Text = "L01";
                BindCmb_Search();
            }
        }
Exemple #8
0
 void Bindcombo()
 {
     comboBox1.DataSource    = RetriveData.ExcuteQuery("Sp_Customers_SelectAll", CommandType.StoredProcedure);
     comboBox1.DisplayMember = "Cust_Name";
     comboBox1.ValueMember   = "cust_ID";
     comboBox1.Text          = "";
 }
 void Bindcombo()
 {
     Cmb_Search.DataSource    = RetriveData.ExcuteQuery("Sp_Vendors_SelectAll", CommandType.StoredProcedure);
     Cmb_Search.DisplayMember = "Ven_Name";
     Cmb_Search.ValueMember   = "Ven_ID";
     Cmb_Search.Text          = "";
 }
        private void Btn_Save_Click(object sender, EventArgs e)
        {
            if (AddNew == false)
            {
                MessageBox.Show("عفوا ، يجب الضغط على زر جديد اولا", "تحذير", MessageBoxButtons.OK, MessageBoxIcon.Warning); return;
            }
            if (Double.Parse(Txt_RemainValue.Text) == 0)
            {
                MessageBox.Show("عفوا ، هذا العميل ليس عليه دين", "خطأ", MessageBoxButtons.OK, MessageBoxIcon.Error); return;
            }
            if (Txt_PayedValue.Text == "")
            {
                MessageBox.Show("من فضلك ادخل المبلغ المدفوع", "خطأ", MessageBoxButtons.OK, MessageBoxIcon.Error); return;
            }
            if (Double.Parse(Txt_PayedValue.Text) > double.Parse(Txt_RemainValue.Text))
            {
                MessageBox.Show("المبلغ المدفوع اكبر من المبلغ المتبقى", "خطأ", MessageBoxButtons.OK, MessageBoxIcon.Error); return;
            }

            if (MessageBox.Show("هل انت متأكد من حفظ هذه العملية ؟", "تأكيد", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
            {
                RetriveData.ExcuteNonQuery("Sp_Ven_Account_Insert",
                                           new Pararmter("@Ven_ID", SqlDbType.Int, int.Parse(Cmb_Search.SelectedValue.ToString())),
                                           new Pararmter("@Payed_Value", SqlDbType.Decimal, decimal.Parse(Txt_PayedValue.Text)),
                                           new Pararmter("@Payed_Date", SqlDbType.Date, DTP.Text),
                                           new Pararmter("@Account_Notes", SqlDbType.NVarChar, Txt_Notes.Text),
                                           new Pararmter("@User_ID", SqlDbType.NVarChar, Login.UserID));

                MessageBox.Show("تم الحفظ بنجاح", "تم", MessageBoxButtons.OK, MessageBoxIcon.Information);
                AddNew        = false;
                Lbl_Find.Text = "L01";
            }
        }
        private void Btn_Edit_Click(object sender, EventArgs e)
        {
            if (Lbl_Item_ID.Text != "L01")
            {
                if (TxtName.Text == "" || Txt_Min.Text == "" || Cmb_Category_Name.Text == "")
                {
                    MessageBox.Show("من فضلك يجب ملىء جميع البيانات", "تحذير", MessageBoxButtons.OK, MessageBoxIcon.Warning); return;
                }
                if (MessageBox.Show("هل انت متاكد من تعديل بيانات الصنف ؟", "تأكيد", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    RetriveData.ExcuteNonQuery("Sp_items_Update",
                                               new Pararmter("@Item_ID", SqlDbType.Int, int.Parse(Lbl_Item_ID.Text)),
                                               new Pararmter("@Item_Name", SqlDbType.NVarChar, TxtName.Text),
                                               new Pararmter("@Category_ID", SqlDbType.Int, Cmb_Category_Name.SelectedValue),
                                               new Pararmter("@Item_Minimum", SqlDbType.Int, int.Parse(Txt_Min.Text)),
                                               new Pararmter("@User_ID", SqlDbType.Int, Login.UserID));


                    MessageBox.Show("تم تعديل بيانات الصنف بنجاح", "تم", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    AddNew           = false;
                    Lbl_Item_ID.Text = "L01";
                    BindGrid();
                }
            }
        }
Exemple #12
0
        private void Btn_Save_Click(object sender, EventArgs e)
        {
            if (AddNew == false)
            {
                MessageBox.Show("من فضلك يجب الضغط على زر جديد اولاً", "خطأ", MessageBoxButtons.OK, MessageBoxIcon.Error); return;
            }

            if (Cmb_CategoryID.Text == "" || Cmb_Item_Name.Text == "" || Cmb_StoreFrom.Text == "" || Cmb_StoreTo.Text == "" || Txt_Converted.Text == "0")
            {
                MessageBox.Show("من فضلك يجب ملىء جميع البيانات", "تحذير", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }


            if (MessageBox.Show("هل انت متأكد من حفظ عملية التحويل ؟", "تأكيد", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
            {
                RetriveData.ExcuteNonQuery("Sp_Store_Convert_Insert",
                                           new Pararmter("@StoreFrom_ID", SqlDbType.Int, int.Parse(Cmb_StoreFrom.SelectedValue.ToString())),
                                           new Pararmter("@StoreTo_ID", SqlDbType.Int, int.Parse(Cmb_StoreTo.SelectedValue.ToString())),
                                           new Pararmter("@Item_ID", SqlDbType.Int, int.Parse(Cmb_Item_Name.SelectedValue.ToString())),
                                           new Pararmter("@Item_Quantity", SqlDbType.Int, int.Parse(Txt_Converted.Text)),
                                           new Pararmter("@Con_Date", SqlDbType.Date, DTP_Con_Date.Text),
                                           new Pararmter("@Con_Notes", SqlDbType.NVarChar, Txt_Notes.Text),
                                           new Pararmter("@User_ID", SqlDbType.Int, Login.UserID));

                MessageBox.Show("تم تحويل الصنف بنجاح", "تم", MessageBoxButtons.OK, MessageBoxIcon.Information);
                AddNew = false;
            }
        }
Exemple #13
0
        public void BindGrid()
        {
            DataTable dt = new DataTable();

            dt = RetriveData.ExcuteQuery("Sp_Job_Type_SelectAll", CommandType.StoredProcedure);

            DVGrid.DataSource = dt;
        }
        public void BindGrid()
        {
            DataTable Dt = new DataTable();

            Dt = RetriveData.ExcuteQuery("Sp_Ven_Account_SelectAll", CommandType.StoredProcedure);

            DVGrid.DataSource = Dt;
        }
        public void Bind_Cmb_ItemName()
        {
            Cmb_ItemName.DataSource    = RetriveData.ExcuteQuery("Sp_Items_SelectAll", CommandType.StoredProcedure);
            Cmb_ItemName.DisplayMember = "Item_Name";
            Cmb_ItemName.ValueMember   = "Item_ID";

            Cmb_ItemName.Text = "";
        }
Exemple #16
0
        public void Bind_Cmb_CategoryID()
        {
            Cmb_CategoryID.DataSource = RetriveData.ExcuteQuery("Sp_Item_Category_SelectAll", CommandType.StoredProcedure);

            Cmb_CategoryID.DisplayMember = "Category_Name";
            Cmb_CategoryID.ValueMember   = "Category_ID";

            Cmb_CategoryID.Text = "";
        }
        public void Bind_Filter_Items()
        {
            Cmb_ItemName.DataSource = RetriveData.ExcuteQuery("Sp_Store_Convert_SelectByCategoryID", CommandType.StoredProcedure,
                                                              new Pararmter("@Category_ID", SqlDbType.Int, int.Parse(Cmb_CategoryName.SelectedValue.ToString())));

            Cmb_ItemName.DisplayMember = "Item_Name";
            Cmb_ItemName.ValueMember   = "Item_ID";

            Cmb_ItemName.Text = "";
        }
 private void Btn_Search_Click(object sender, EventArgs e)
 {
     if (Cmb_Search.Text != "")
     {
         DataTable Dt = new DataTable();
         Dt                   = RetriveData.ExcuteQuery("Sp_Vendors_SelectByID", CommandType.StoredProcedure, new Pararmter("@Ven_ID", SqlDbType.Int, int.Parse(Cmb_Search.SelectedValue.ToString())));
         Lbl_Find.Text        = Dt.Rows[0]["Ven_ID"].ToString();
         Txt_RemainValue.Text = Dt.Rows[0]["Ven_Debit"].ToString();
     }
 }
Exemple #19
0
        private void Cmb_StoreTo_SelectedValueChanged(object sender, EventArgs e)
        {
            if (Cmb_StoreTo.Text == "" || Cmb_Item_Name.Text == "")
            {
                return;
            }

            DataTable dt = RetriveData.ExcuteQuery("Sp_StoreQuantity_SelectQuantity", CommandType.StoredProcedure,
                                                   new Pararmter("@Item_ID", SqlDbType.Int, int.Parse(Cmb_Item_Name.SelectedValue.ToString())),
                                                   new Pararmter("@Store_ID", SqlDbType.Int, int.Parse(Cmb_StoreTo.SelectedValue.ToString())));

            Txt_CurrentQ2.Text = dt.Rows[0][0].ToString();
        }
Exemple #20
0
        public void Bind_Emp_Name()
        {
            DataTable Dt = new DataTable();

            Dt = RetriveData.ExcuteQuery("Sp_Emplyees_SelectAll", CommandType.StoredProcedure);

            Cmb_Emp_Name.DataSource = Dt;

            Cmb_Emp_Name.DisplayMember = "Emp_Name";
            Cmb_Emp_Name.ValueMember   = "Emp_ID";

            Cmb_Emp_Name.Text = "";
        }
Exemple #21
0
        public void Bind_StoreName()
        {
            Cmb_StoreFrom.DataSource = RetriveData.ExcuteQuery("Sp_Store_Data_SelectAll", CommandType.StoredProcedure);
            Cmb_StoreTo.DataSource   = RetriveData.ExcuteQuery("Sp_Store_Data_SelectAll", CommandType.StoredProcedure);

            Cmb_StoreFrom.DisplayMember = "Store_Name";
            Cmb_StoreFrom.ValueMember   = "Store_ID";

            Cmb_StoreTo.DisplayMember = "Store_Name";
            Cmb_StoreTo.ValueMember   = "Store_ID";

            Cmb_StoreFrom.Text = "";
            Cmb_StoreTo.Text   = "";
        }
Exemple #22
0
 private void Btn_Search_Click(object sender, EventArgs e)
 {
     if (comboBox1.Text != "")
     {
         DataTable Dt = new DataTable();
         Dt = RetriveData.ExcuteQuery("Sp_Customers_SelectByID", CommandType.StoredProcedure, new Pararmter("@Cust_ID", SqlDbType.Int, int.Parse(comboBox1.SelectedValue.ToString())));
         Lbl_Cust_ID.Text = Dt.Rows[0]["Cust_ID"].ToString();
         Txt_Name.Text    = Dt.Rows[0]["cust_Name"].ToString();
         Txt_Address.Text = Dt.Rows[0]["Cust_Address"].ToString();
         Txt_Mobile.Text  = Dt.Rows[0]["Mobile"].ToString();
         Txt_Phone.Text   = Dt.Rows[0]["Phone"].ToString();
         Txt_Notes.Text   = Dt.Rows[0]["Notes"].ToString();
     }
 }
Exemple #23
0
        private void Btn_Search_Click(object sender, EventArgs e)
        {
            if (comboBox1.Text != "")
            {
                DataTable Dt = new DataTable();
                Dt = RetriveData.ExcuteQuery("Sp_Store_Data_selectByID", CommandType.StoredProcedure, new Pararmter("@Store_ID", SqlDbType.Int, comboBox1.SelectedValue));

                Lbl_Cust_ID.Text           = Dt.Rows[0]["Store_ID"].ToString();
                Txt_Address.Text           = Dt.Rows[0]["Store_Address"].ToString();
                Txt_Name.Text              = Dt.Rows[0]["store_Name"].ToString();
                Txt_Notes.Text             = Dt.Rows[0]["Store_Notes"].ToString();
                Cmb_Emp_Name.SelectedValue = Dt.Rows[0]["Emp_ID"];
            }
        }
Exemple #24
0
 private void Btn_Delete_Click(object sender, EventArgs e)
 {
     if (Lbl_Cat_ID.Text != "L01")
     {
         if (MessageBox.Show("هل انت متأكد من حذف فئة الصنف ؟", "تاكيد", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
         {
             RetriveData.ExcuteNonQuery("Sp_Item_Category_Delete", new Pararmter("@Category_ID", SqlDbType.Int, int.Parse(Lbl_Cat_ID.Text).ToString()));
             MessageBox.Show("تم حذف فئة الصنف بنجاح", "تم", MessageBoxButtons.OK, MessageBoxIcon.Information);
             AddNew          = false;
             Lbl_Cat_ID.Text = "L01";
             BindGrid();
             Txt_Category_name.Text = "";
         }
     }
 }
Exemple #25
0
        private void Btn_Delete_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("هل انت متاكد من حذف هذاالعميل ؟", "تأكيد", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
            {
                if (Lbl_Cust_ID.Text != "L01")
                {
                    RetriveData.ExcuteNonQuery("Sp_Customers_Delete", new Pararmter("@Cust_ID", SqlDbType.Int, int.Parse(Lbl_Cust_ID.Text).ToString()));

                    MessageBox.Show("تم حذف العميل بنجاح", "تم", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    AddNew           = false;
                    Lbl_Cust_ID.Text = "L01";
                    Bindcombo();
                }
            }
        }
        private void Btn_Delete_Click(object sender, EventArgs e)
        {
            if (Lbl_Item_ID.Text != "L01")
            {
                if (MessageBox.Show("هل انت متاكد من حذف بيانات الصنف ؟", "تأكيد", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    RetriveData.ExcuteNonQuery("Sp_Items_Delete", new Pararmter("@Item_ID", SqlDbType.Int, int.Parse(Lbl_Item_ID.Text)));

                    MessageBox.Show("تم حذف بيانات الصنف بنجاح", "تم", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    AddNew           = false;
                    Lbl_Item_ID.Text = "L01";
                    BindGrid();
                    TxtClr.TxtClear(this, panelControl3);
                }
            }
        }
        private void Btn_Delete_Click(object sender, EventArgs e)
        {
            if (Lbl_Cust_ID.Text != "L01")
            {
                if (MessageBox.Show("هل انت متاكد من حفظ بيانات الموظف ؟", "تأكيد", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    RetriveData.ExcuteNonQuery("Sp_Emplyees_Delete", new Pararmter("@Emp_ID", SqlDbType.Int, int.Parse(Lbl_Cust_ID.Text)));

                    MessageBox.Show("تم حذف الموظف بنجاح", "تم", MessageBoxButtons.OK, MessageBoxIcon.Information);

                    AddNew           = false;
                    Lbl_Cust_ID.Text = "L01";
                    BindCmb_Search();
                }
            }
        }
Exemple #28
0
 private void Btn_Delete_Click(object sender, EventArgs e)
 {
     if (Lbl_Job_ID.Text == "L01")
     {
         return;
     }
     if (MessageBox.Show("هل انت متأكد من حذف الوظيفة؟", "تأكيد", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
     {
         RetriveData.ExcuteNonQuery("Sp_Job_Type_Delete",
                                    new Pararmter("@Job_ID", SqlDbType.Int, int.Parse(Lbl_Job_ID.Text).ToString()));
         MessageBox.Show("تم حذف الوظيفة بنجاح", "تم", MessageBoxButtons.OK, MessageBoxIcon.Information);
         BindGrid();
         AddNew            = false;
         Lbl_Job_ID.Text   = "L01";
         Txt_Job_Name.Text = "";
     }
 }
Exemple #29
0
        private void Btn_Delete_Click(object sender, EventArgs e)
        {
            if (Lbl_Cust_ID.Text != "L01")
            {
                if (MessageBox.Show("هل انت متاكد من حذف بيانات المخزن ؟", "تأكيد", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    RetriveData.ExcuteNonQuery("Sp_Store_Data_Delete", new Pararmter("@Store_ID", SqlDbType.Int, int.Parse(Lbl_Cust_ID.Text.ToString())));

                    MessageBox.Show("تم حذف بيانات المخزن بنجاح", "تم", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    AddNew           = false;
                    Lbl_Cust_ID.Text = "L01";
                    Bind_StoreSearch();

                    TxtClr.TxtClear(this, panelControl3);
                    Cmb_Emp_Name.Text = "";
                }
            }
        }
        public void Bind_Cmbs()
        {
            Cmb_VendorName.DataSource    = RetriveData.ExcuteQuery("Sp_Vendors_SelectAll", CommandType.StoredProcedure);
            Cmb_VendorName.DisplayMember = "ven_Name";
            Cmb_VendorName.ValueMember   = "Ven_ID";
            Cmb_VendorName.Text          = "";



            Cmb_StoreName.DataSource    = RetriveData.ExcuteQuery("Sp_Store_Data_SelectAll", CommandType.StoredProcedure);
            Cmb_StoreName.DisplayMember = "Store_Name";
            Cmb_StoreName.ValueMember   = "Store_ID";
            Cmb_StoreName.Text          = "";


            Cmb_CategoryName.DataSource    = RetriveData.ExcuteQuery("Sp_Item_Category_selectAll", CommandType.StoredProcedure);
            Cmb_CategoryName.DisplayMember = "Category_Name";
            Cmb_CategoryName.ValueMember   = "Category_ID";
            Cmb_CategoryName.Text          = "";
        }