Пример #1
0
        protected void lnkDelete_OnClick(object sender, EventArgs e)
        {
            var usnme = Session["username"].ToString();
            var refNo = Session["ref_no"].ToString();

            try
            {
            }
            catch (Exception ex)
            {
                var credentials = new NetworkCredential(ConfigurationManager.AppSettings["W_USER"],
                                                        ConfigurationManager.AppSettings["W_PWD"], ConfigurationManager.AppSettings["DOMAIN"]);
                var nws = new Portals();
                nws.Credentials     = credentials;
                nws.PreAuthenticate = true;

                nws.FnDeleteReferee(usnme, refNo);
                KCDFAlert.ShowAlert("Referee Deleted!");
                loadRefs();
            }
        }
Пример #2
0
 protected void tblRefs_OnRowDeleting(object sender, GridViewDeleteEventArgs e)
 {
     try
     {
         var del_id      = tblRefs.DataKeys[e.RowIndex].Values[0].ToString();
         var credentials = new NetworkCredential(ConfigurationManager.AppSettings["W_USER"],
                                                 ConfigurationManager.AppSettings["W_PWD"], ConfigurationManager.AppSettings["DOMAIN"]);
         Portals sup = new Portals();
         sup.Credentials     = credentials;
         sup.PreAuthenticate = true;
         if (sup.FnDeleteReferee(Session["username"].ToString(), del_id) == true)
         {
             ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop",
                                                 "alert('Application Entry deleted successfully!');", true);
             loadRefs();
         }
     }
     catch (Exception ex)
     {
         //KCDFAlert.ShowAlert(ex.Message);
         ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "alert('" + ex.Message + "');", true);
         loadRefs();
     }
 }