private void InsertDestinationButton_Click(object sender, EventArgs e) { DestinationVO dest = new DestinationVO(); dest.Name = DestinationTB.Text.Trim(); if (!manager.IsDestinationNew(dest)) { Error("اسم الوجهة موجود سابقاً", "تعذر إضافة وجهة جديد"); return; } if (DestinationTB.Text.Trim() == "") { Error("اسم الوجهة لا يمكن أن يكون فارغاً"); return; } if (manager.Insert(dest) < 0) { Error("حدث خطأ أثناء عملية إضافة الوجهة", "فشل عملية الإضافة"); } else { bindingSource1.Add(dest); Message("تم إضافة الملف بنجاح", "عملية ناجحة"); DestinationTB.Text = ""; DestinationTB.Focus(); Log(OperationsManager.EDIT_DESTINATIONS); } }