예제 #1
0
 private void Restore_Click(object sender, EventArgs e)
 {
     if (base.CheckCookie())
     {
         if (!base.IsFounderUid(this.userid))
         {
             base.Response.Write(base.GetShowMessage());
             base.Response.End();
             return;
         }
         if (Request["id"] != "")
         {
             string @string = Request["id"];
             if (@string.IndexOf(",0") > 0)
             {
                 base.RegisterStartupScript("", this.GetMessageScript("您一次只能选择一个备份进行提交"));
                 return;
             }
             DataRow[] array = this.buildGridData().Select("id=" + @string.Replace("0 ", ""));
             this.aysncallback = new backupandrestore.delegateBackUpDatabase(this.RestoreDB);
             AsyncCallback callback = new AsyncCallback(this.CallBack);
             this.aysncallback.BeginInvoke(this.ServerName.Text, this.UserName.Text, this.Password.Text, this.strDbName.Text, array[0]["filename"].ToString(), callback, this.username);
             base.LoadRegisterStartupScript("PAGE", "window.location.href='global_backupandrestore.aspx';");
             return;
         }
         else
         {
             base.RegisterStartupScript("", this.GetMessageScript("您未选中任何选项"));
         }
     }
 }
예제 #2
0
 private void BackUP_Click(object sender, EventArgs e)
 {
     if (base.CheckCookie())
     {
         if (!base.IsFounderUid(this.userid))
         {
             base.Response.Write(base.GetShowMessage());
             base.Response.End();
             return;
         }
         if (String.IsNullOrEmpty(this.backupname.Text))
         {
             base.RegisterStartupScript("PAGE", "alert('备份名称不能为空');");
             return;
         }
         this.aysncallback = new backupandrestore.delegateBackUpDatabase(this.BackUPDB);
         AsyncCallback callback = new AsyncCallback(this.CallBack);
         this.aysncallback.BeginInvoke(this.ServerName.Text, this.UserName.Text, this.Password.Text, this.strDbName.Text, this.backupname.Text, callback, this.username);
         base.LoadRegisterStartupScript("PAGE", "window.location.href='global_backupandrestore.aspx';");
     }
 }