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(); } }
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; } }
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_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(); } }
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(); } } }
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(); } } }
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(); } } }
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(); } }
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 = ""; } } }
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_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(); } } }
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_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 = ""; } }
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 = ""; } } }
private void Btn_Save_Click(object sender, EventArgs e) { if (AddNew == false) { MessageBox.Show("من فضلك يجب الضغط على زر جديد اولا ", "خطأ", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (Txt_Job_Name.Text == "") { MessageBox.Show("من فضلك يجب كتابة اسم الوظيفة", "خطأ", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (MessageBox.Show("هل انت متأكد من حفظ وظيفة جديدة؟", "تأكيد", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { RetriveData.ExcuteNonQuery("Sp_Job_Type_Insert", new Pararmter("@Job_Name", SqlDbType.NVarChar, Txt_Job_Name.Text), new Pararmter("@User_ID", SqlDbType.NVarChar, Login.UserID)); MessageBox.Show("تم حفظ الوظيفة بنجاح", "تم", MessageBoxButtons.OK, MessageBoxIcon.Information); AddNew = false; BindGrid(); } }
private void Btn_Edit_Click(object sender, EventArgs e) { if (Lbl_Cat_ID.Text != "L01") { if (Txt_Category_name.Text == "") { MessageBox.Show("من فضلك يجب كتابة فئة الصنف", "خطأ", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (MessageBox.Show("هل انت متأكد من تعديل فئة الصنف ؟", "تاكيد", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { RetriveData.ExcuteNonQuery("Sp_Item_Category_Update", new Pararmter("@Category_ID", SqlDbType.Int, int.Parse(Lbl_Cat_ID.Text).ToString()), new Pararmter("@Category_Name", SqlDbType.NVarChar, Txt_Category_name.Text), new Pararmter("@User_ID", SqlDbType.Int, Login.UserID)); MessageBox.Show("تم تعديل فئة الصنف بنجاح", "تم", MessageBoxButtons.OK, MessageBoxIcon.Information); AddNew = false; Lbl_Cat_ID.Text = "L01"; BindGrid(); } } }
private void Btn_AutoDistribute_Click(object sender, EventArgs e) { RetriveData.ExcuteNonQuery("Sp_DistributeItemsAuto", new Pararmter("@User_ID", SqlDbType.Int, Login.UserID)); MessageBox.Show("تم توزيع الاصناف بنجاح", "تم", MessageBoxButtons.OK, MessageBoxIcon.Information); }