private void btnMakeBackup_Click(object sender, EventArgs e) { try { if (txtFileName.Text != string.Empty) { DAL.DataAccessLayer dal = new DAL.DataAccessLayer(); dal.Open(); dal.MakeBackup(txtFileName.Text); dal.Close(); MessageBox.Show("تم انشاء نسخة احتياطية بنجاح", "انشاء نسخة احتياطية", MessageBoxButtons.OK, MessageBoxIcon.Information); txtFileName.Clear(); } else { MessageBox.Show("اختر المسار الذي تريد حفظ النسخة فيه", "انشاء نسخة احتياطية", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception ex) { MessageBox.Show("حصل خطأ في العملية، حاول تغيير مكان الحفظ \n " + ":تفاصيل الخطأ \n " + ex.Message, "انشاء نسخة احتياطية", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } }