Пример #1
0
 protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
 {
     RadGrid1.Rebind();
     if (e.Argument == "new")
     {
         RadGrid1.CurrentPageIndex = RadGrid1.PageCount - 1;
         RadGrid1.Rebind();
     }
     if (e.Argument == "yes")
     {
         if (Session["DeleteId"] != null)
         {
             try
             {
                 serviceNoteId = (int)Session["DeleteId"];
                 ServiceNote sn = CntAriCli.GetServiceNote(serviceNoteId, ctx);
                 CntAriCli.DeleteServiceNote(sn, ctx);
                 RadGrid1.Rebind();
                 Session["DeleteId"] = null;
             }
             catch (Exception ex)
             {
                 Session["Exception"] = ex;
                 string command = String.Format("showDialog('Error','{0}','error',null, 0, 0)"
                                                , Resources.GeneralResource.DeleteRecordFail);
                 RadAjaxManager1.ResponseScripts.Add(command);
             }
         }
     }
 }