示例#1
0
 protected void btnVerifyDelete_Click(object sender, EventArgs e)
 {
     PopupControlExtender.Show();
     try
     {
         if (ViewState["OTP"] != null)
         {
             if (ViewState["OTP"].ToString() == txtOtp.Text)
             {
                 Label  lbld_id        = ListView1.Items[0].FindControl("lbld_id") as Label;
                 Label  lbld_PayeeText = ListView1.Items[0].FindControl("lbld_PayeeText") as Label;
                 string PayeName       = lbld_PayeeText.Text;
                 string d_id           = lbld_id.Text;
                 dt.DeleteDues(d_id);
                 string textmsg = "" + d_id + " " + PayeName + " Due Record Deleted Successfully !";
                 ScriptManager.RegisterStartupScript(this, typeof(Page), "Warning", "<script>showpopwarning('" + textmsg + "')</script>", false);
                 showDues();
                 PopupControlExtender.Hide();
             }
         }
         else
         {
             lblmessage.Text      = "OTP does not matches";
             lblmessage.ForeColor = System.Drawing.Color.Red;
         }
     }
     catch (Exception ex)
     {
         string text = ex.Message.ToString();
         ScriptManager.RegisterStartupScript(this, typeof(Page), "Warning", "<script>showpoperror('" + text + "')</script>", false);
     }
 }
示例#2
0
 protected void lbtnDelete_Click(object sender, EventArgs e)
 {
     SendOtp();
     PopupControlExtender.Show();
 }