Example #1
0
 protected void btnRestore_Click(object sender, EventArgs e)
 {
     try
     {
         DataTable dt = RestoreDatabaseService.RestoreDatabase(2, txtFileName.Text, txtDatabase.Text);
         if (dt.Rows.Count > 0)
         {
             if (dt.Rows[0]["Msg"].ToString() == "Database Restored Sucessfully To Database:")
             {
                 msgbox.ShowSuccess("Database Restored Sucessfully To Database: " + fuDatabase.FileName);
             }
             else
             {
                 msgbox.ShowWarning(dt.Rows[0]["Msg"].ToString());
             }
         }
     }
     catch (Exception ex)
     {
         msgbox.ShowWarning(ex.Message);
     }
 }
Example #2
0
 protected void btnClear_Click(object sender, EventArgs e)
 {
     try
     {
         if (txtCacheKey.Text == "All")
         {
             foreach (DictionaryEntry item in Cache)
             {
                 Cache.Remove(item.Key.ToString());
             }
         }
         else
         {
             Cache.Remove(txtCacheKey.Text);
         }
         msgbox.ShowSuccess(txtCacheKey.Text + " Cache Cleared");
     }
     catch (Exception ex)
     {
         msgbox.ShowWarning(ex.Message);
     }
 }