private void btnbackup_Click(object sender, EventArgs e)
 {
     try
     {
         string path = string.Format("{0}\\INVENTORY-{1}{2}.bak", txtpath.Text, DateTime.Now.ToShortDateString().Replace('/', '-'), DateTime.Now.ToShortTimeString().Replace(':', '-'));
         CLASS_HELPER.Backup_DB(path);
         MessageBox.Show("Sauvgarder avec succes");
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Beispiel #2
0
        private void btn_Backup_Click(object sender, EventArgs e)
        {
            try
            {
                string path = string.Format("{0}\\Pharmacy_DB-{1}{2}.bak", txt_Path.Text, DateTime.Now.ToShortDateString().Replace('/', '-'),
                                            DateTime.Now.ToLongTimeString().Replace(':', '-'));

                CLASS_HELPER.Backup_DB(path);
                MessageBox.Show("backup success");
            }
            catch (Exception ex) {
                MessageBox.Show(ex.Message);
            }
        }