public string updateRenewal(pt.Renewal aa) { string connectionString = Connect(); string str2 = ""; SqlConnection connection = new SqlConnection(connectionString); SqlCommand command = connection.CreateCommand(); command.CommandText = "UPDATE renewal SET title=@title,type=@type,reg_no=@reg_no,app_no=@app_no,app_date=@app_date,xname=@xname ,xmobile=@xmobile ,xemail=@xemail,xaddy=@xaddy, "; command.CommandText += " agt_code=@agt_code,agt_name=@agt_name,agt_addy=@agt_addy,agt_mobile=@agt_mobile,agt_email=@agt_email,last_rwl_date=@last_rwl_date ,reg_date=@reg_date "; command.CommandText += " WHERE log_staff=@papp "; connection.Open(); command.Parameters.Add("@title", SqlDbType.NVarChar); command.Parameters.Add("@type", SqlDbType.NVarChar); command.Parameters.Add("@reg_no", SqlDbType.NVarChar); command.Parameters.Add("@app_no", SqlDbType.NVarChar); command.Parameters.Add("@app_date", SqlDbType.NVarChar); command.Parameters.Add("@xname", SqlDbType.NVarChar); command.Parameters.Add("@xmobile", SqlDbType.NVarChar); command.Parameters.Add("@xemail", SqlDbType.NVarChar); command.Parameters.Add("@xaddy", SqlDbType.Text); command.Parameters.Add("@agt_code", SqlDbType.NVarChar); command.Parameters.Add("@agt_name", SqlDbType.NVarChar); command.Parameters.Add("@agt_addy", SqlDbType.Text); command.Parameters.Add("@agt_mobile", SqlDbType.NVarChar); command.Parameters.Add("@agt_email", SqlDbType.NVarChar); command.Parameters.Add("@last_rwl_date", SqlDbType.NVarChar); command.Parameters.Add("@reg_date", SqlDbType.NVarChar); command.Parameters.Add("@papp", SqlDbType.NVarChar); command.Parameters["@title"].Value = aa.title; command.Parameters["@type"].Value = aa.type; command.Parameters["@reg_no"].Value = aa.reg_no; command.Parameters["@app_no"].Value = aa.app_no; command.Parameters["@app_date"].Value = aa.app_date; command.Parameters["@xname"].Value = aa.xname; command.Parameters["@xmobile"].Value = aa.xmobile; command.Parameters["@xemail"].Value = aa.xemail; command.Parameters["@papp"].Value = aa.log_staff; command.Parameters["@xaddy"].Value = aa.xaddy; command.Parameters["@agt_code"].Value = aa.agt_code; command.Parameters["@agt_name"].Value = aa.agt_name; command.Parameters["@agt_addy"].Value = aa.agt_addy; command.Parameters["@agt_mobile"].Value = aa.agt_mobile; command.Parameters["@agt_email"].Value = aa.agt_email; command.Parameters["@last_rwl_date"].Value = aa.last_rwl_date; command.Parameters["@reg_date"].Value = aa.reg_date; str2 = command.ExecuteNonQuery().ToString(); connection.Close(); string admin = Session["pwalletID"].ToString(); pt.XPwallet xxs = t.getXPwalletDetailsByID2(TextBox6.Text); t.activity_log(admin, "Edit Renewal", "Update", xxs.ID, xxs.data_status, "", "", "", "", "", ""); return(str2); }
protected void Page_Load(object sender, EventArgs e) { Verify.Visible = false; if (rbValid.SelectedValue == "Valid") { admin_status = "2"; Verify.Visible = true; } else if (rbValid.SelectedValue == "Invalid") { admin_status = "1"; Verify.Visible = true; } if (Request.QueryString["x"] != null) { if (Session["pwalletID"] != null) { if (Session["pwalletID"].ToString() != "") { admin = Session["pwalletID"].ToString(); } else { Response.Redirect("../lo.aspx"); } } else { Response.Redirect("../lo.aspx"); } pID = Request.QueryString["x"].ToString(); c_x = t.getRenewalByID(pID); c_p = t.getXPwalletDetailsByID(c_x.log_staff); payment_date.Text = c_p.reg_date; transID.Text = c_p.validationID; p_type.Text = c_x.type; p_title.Text = c_x.title; p_item_code.Text = c_p.item_code; p_app_no.Text = c_x.app_no; p_app_date.Text = c_x.app_date; p_xname.Text = c_x.xname; p_xaddy.Text = c_x.xaddy; p_xemail.Text = c_x.xemail; p_xmobile.Text = c_x.xmobile; p_agt_addy.Text = c_x.agt_addy; p_agt_code.Text = c_x.agt_code; p_agt_email.Text = c_x.agt_email; p_agt_mobile.Text = c_x.agt_mobile; p_agt_name.Text = c_x.agt_name; p_last_rwl_date.Text = c_x.last_rwl_date; p_due_date.Text = Convert.ToDateTime(c_x.last_rwl_date).AddYears(1).ToString("yyyy-MM-dd"); } else { Response.Redirect("./n_renewal.aspx"); } }
protected void Save_Click(object sender, EventArgs e) { if ((xref.Text != "") && (x_code.Text != "")) { c_p = t.getXPwalletDetailsByCode(xref.Text, x_code.Text); if (c_p.ID != null) { c_ren = t.getRenewalByLogstaffID(c_p.ID); if (c_ren.xID != null) { transID.Text = c_p.validationID; payment_date.Text = c_p.reg_date; p_title.Text = c_ren.title; p_app_no.Text = c_ren.app_no; p_type.Text = c_ren.type; p_app_date.Text = c_ren.app_date; p_xname.Text = c_ren.xname; p_xaddy.Text = c_ren.xaddy; p_xmobile.Text = c_ren.xmobile; p_xemail.Text = c_ren.xemail; p_agt_code.Text = c_ren.agt_code; p_agt_name.Text = c_ren.agt_name; p_agt_addy.Text = c_ren.agt_addy; p_agt_mobile.Text = c_ren.agt_mobile; p_agt_email.Text = c_ren.agt_email; p_due_date.Text = Convert.ToDateTime(c_ren.last_rwl_date).AddYears(1).ToString("yyyy-MM-dd"); p_next_due_date.Text = Convert.ToDateTime(c_ren.last_rwl_date).AddYears(2).ToString("yyyy-MM-dd"); showt = 1; } } else { msg = "NO ENTRY EXISTS WITH THE DETAILS ABOVE,PLEASE CHECK THE DETAILS AND TRY AGAIN!!"; showt = 0; } } else { Response.Write("<script language=JavaScript>alert('PLEASE ENTER A VALID REFERENCE NUMBER')</script>"); showt = 0; } }
protected void Page_Load(object sender, EventArgs e) { if ((((this.Session["transID"] != null) && (this.Session["transID"].ToString() != "")) && (this.Session["x_code"] != null)) && (this.Session["x_code"].ToString() != "")) { this.c_p = this.t.getXPwalletDetailsByCode(this.Session["transID"].ToString(), this.Session["x_code"].ToString()); if (this.c_p.ID != null) { this.c_ren = this.t.getRenewalByLogstaffID(this.c_p.ID); if (this.c_ren.xID != null) { this.transID.Text = this.c_p.validationID; this.payment_date.Text = this.c_p.reg_date; this.p_title.Text = this.c_ren.title; this.p_app_no.Text = this.c_ren.app_no; this.p_type.Text = this.c_ren.type; this.p_app_date.Text = this.c_ren.app_date; this.p_xname.Text = this.c_ren.xname; this.p_xaddy.Text = this.c_ren.xaddy; this.p_xmobile.Text = this.c_ren.xmobile; this.p_xemail.Text = this.c_ren.xemail; this.p_agt_code.Text = this.c_ren.agt_code; this.p_agt_name.Text = this.c_ren.agt_name; this.p_agt_addy.Text = this.c_ren.agt_addy; this.p_agt_mobile.Text = this.c_ren.agt_mobile; this.p_agt_email.Text = this.c_ren.agt_email; this.p_due_date.Text = Convert.ToDateTime(this.c_ren.last_rwl_date).AddYears(1).ToString("yyyy-MM-dd"); this.p_next_due_date.Text = Convert.ToDateTime(this.c_ren.last_rwl_date).AddYears(2).ToString("yyyy-MM-dd"); } } else { this.msg = "NO ENTRY EXISTS WITH THE DETAILS ABOVE,PLEASE CHECK THE DETAILS AND TRY AGAIN!!"; } } else { base.Response.Write("<script language=JavaScript>alert('PLEASE ENTER A VALID REFERENCE NUMBER')</script>"); } }
protected void Page_Load(object sender, EventArgs e) { Verify.Visible = false; if (rbValid.SelectedValue == "Approved") { admin_status = "3"; Verify.Visible = true; } else if (rbValid.SelectedValue == "Refused") { admin_status = "2"; Verify.Visible = true; } if (Request.QueryString["x"] != null) { if (Session["pwalletID"] != null) { if (Session["pwalletID"].ToString() != "") { admin = Session["pwalletID"].ToString(); } else { Response.Redirect("../lo.aspx"); } } else { Response.Redirect("../lo.aspx"); } pID = Request.QueryString["x"].ToString(); c_x = t.getRenewalByID(pID); c_p = t.getXPwalletDetailsByID(c_x.log_staff); lt_tm_office = z.getXPtOfficeDetailsByID(c_x.log_staff); this.lt_mi = this.t.getPtInfoByUserID(this.pID); this.lt_rep = this.t.getRepListByUserID(this.lt_mi[0].log_staff); xname.Value = lt_rep[0].agent_code; xname2.Value = lt_mi[0].title_of_invention; xname3.Value = lt_mi[0].reg_number; xname4.Value = "OAI/PT/" + t.ValidationIDByPwalletID(lt_mi[0].log_staff); xname5.Value = lt_mi[0].log_staff; for (int i = 0; i < lt_tm_office.Count; i++) { xcomments = xcomments + "<tr>"; xcomments = xcomments + "<td align=\"center\" colspan=\"2\">"; xcomments = xcomments + "<strong>" + lt_tm_office[i].xcomment.ToUpper() + "</strong><br />"; lt_x_admin_details = z.getTmAdminDetailsByID(lt_tm_office[i].xofficer); if (lt_x_admin_details.Count > 0) { xcomments = xcomments + "COMMENT BY: <strong>" + lt_x_admin_details[0].xname.ToUpper() + "( " + z.getRoleNameByID(lt_x_admin_details[0].xroleID).ToUpper() + " )</strong><br /> Date: <strong>" + lt_tm_office[i].reg_date.ToUpper() + "</strong>"; } else { xcomments = xcomments + "COMMENT BY: <strong> NA</strong>"; } xcomments = xcomments + "</td>"; xcomments = xcomments + "</tr>"; if (lt_tm_office[i].xdoc1 != "") { xcomments = xcomments + "<tr>"; xcomments = xcomments + "<td colspan=\"2\" align=\"center\">"; xcomments = xcomments + "View Document 1: <a href=" + lt_tm_office[i].xdoc1 + " target='_blank'>View</a>"; xcomments = xcomments + "</td>"; xcomments = xcomments + "</tr>"; } if (lt_tm_office[i].xdoc2 != "") { xcomments = xcomments + "<tr>"; xcomments = xcomments + "<td colspan=\"2\" align=\"center\">"; xcomments = xcomments + "View Document 2: <a href=" + lt_tm_office[i].xdoc2 + " target='_blank'>View</a>"; xcomments = xcomments + "</td>"; xcomments = xcomments + "</tr>"; } if (lt_tm_office[i].xdoc3 != "") { xcomments = xcomments + "<tr>"; xcomments = xcomments + "<td colspan=\"2\" align=\"center\">"; xcomments = xcomments + "View Document 3: <a href=" + lt_tm_office[i].xdoc3 + " target='_blank'>View</a>"; xcomments = xcomments + "</td>"; xcomments = xcomments + "</tr>"; } } payment_date.Text = c_p.reg_date; transID.Text = c_p.validationID; p_type.Text = c_x.type; p_title.Text = c_x.title; p_item_code.Text = c_p.item_code; p_app_no.Text = c_x.app_no; p_app_date.Text = c_x.app_date; p_xname.Text = c_x.xname; p_xaddy.Text = c_x.xaddy; p_xemail.Text = c_x.xemail; p_xmobile.Text = c_x.xmobile; p_agt_addy.Text = c_x.agt_addy; p_agt_code.Text = c_x.agt_code; p_agt_email.Text = c_x.agt_email; p_agt_mobile.Text = c_x.agt_mobile; p_agt_name.Text = c_x.agt_name; p_last_rwl_date.Text = c_x.last_rwl_date; p_due_date.Text = Convert.ToDateTime(c_x.last_rwl_date).AddYears(1).ToString("yyyy-MM-dd"); } else { Response.Redirect("./rej_renewal.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { if ((((Session["transID"] != null) && (Session["transID"].ToString() != "")) && (Session["x_code"] != null)) && (Session["x_code"].ToString() != "")) { c_p = t.getXPwalletDetailsByCode(Session["transID"].ToString(), Session["x_code"].ToString()); string admin = Session["pwalletID"].ToString(); ad = z.getAdminDetails(admin); // vame2.Text = z.getRoleName(ad.xroleID).ToUpper(); try { // vame2.Text = z.getRoleName(ad.xroleID).ToUpper(); vame2.Text = ad.Designation.ToUpper(); } catch (Exception ee) { } try { // vame.Text = ad.Designation.ToUpper(); vame.Text = ad.xname.ToUpper(); } catch (Exception ee) { } if (string.IsNullOrEmpty(ad.FilePath)) { img.Visible = false; } else { img.Visible = true; img.ImageUrl = ".." + ad.FilePath; } if (c_p.ID != null) { c_ren = t.getRenewalByLogstaffID(c_p.ID); if (c_ren.xID != null) { transID.Text = c_p.validationID; payment_date.Text = c_p.reg_date; p_title.Text = c_ren.title; p_app_no.Text = c_ren.app_no; p_type.Text = c_ren.type; p_app_date.Text = c_ren.app_date; p_xname.Text = c_ren.xname; p_xaddy.Text = c_ren.xaddy; p_xmobile.Text = c_ren.xmobile; p_xemail.Text = c_ren.xemail; p_agt_code.Text = c_ren.agt_code; p_agt_name.Text = c_ren.agt_name; p_agt_addy.Text = c_ren.agt_addy; p_agt_mobile.Text = c_ren.agt_mobile; p_agt_email.Text = c_ren.agt_email; p_due_date.Text = Convert.ToDateTime(c_ren.last_rwl_date).AddYears(1).ToString("yyyy-MM-dd"); p_next_due_date.Text = Convert.ToDateTime(c_ren.last_rwl_date).AddYears(2).ToString("yyyy-MM-dd"); } } else { msg = "NO ENTRY EXISTS WITH THE DETAILS ABOVE,PLEASE CHECK THE DETAILS AND TRY AGAIN!!"; } } else { Response.Write("<script language=JavaScript>alert('PLEASE ENTER A VALID REFERENCE NUMBER')</script>"); } }
protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["x"] != null) { if (Session["pwalletID"] != null) { if (Session["pwalletID"].ToString() != "") { admin = Session["pwalletID"].ToString(); } else { Response.Redirect("../lo.aspx"); } } else { Response.Redirect("../lo.aspx"); } pID = Request.QueryString["x"].ToString(); c_x = t.getRenewalByID(pID); Session["Cx"] = c_x; c_p = t.getXPwalletDetailsByID(c_x.log_staff); lt_tm_office = z.getXPtOfficeDetailsByID(c_x.log_staff); for (int i = 0; i < lt_tm_office.Count; i++) { xcomments = xcomments + "<tr>"; xcomments = xcomments + "<td align=\"center\" colspan=\"2\">"; xcomments = xcomments + "<strong>" + lt_tm_office[i].xcomment.ToUpper() + "</strong><br />"; lt_x_admin_details = z.getTmAdminDetailsByID(lt_tm_office[i].xofficer); if (lt_x_admin_details.Count > 0) { xcomments = xcomments + "COMMENT BY: <strong>" + lt_x_admin_details[0].xname.ToUpper() + "( " + z.getRoleNameByID(lt_x_admin_details[0].xroleID).ToUpper() + " )</strong><br /> Date: <strong>" + lt_tm_office[i].reg_date.ToUpper() + "</strong>"; } else { xcomments = xcomments + "COMMENT BY: <strong> NA</strong>"; } xcomments = xcomments + "</td>"; xcomments = xcomments + "</tr>"; if (lt_tm_office[i].xdoc1 != "") { xcomments = xcomments + "<tr>"; xcomments = xcomments + "<td colspan=\"2\" align=\"center\">"; xcomments = xcomments + "View Document 1: <a href=" + lt_tm_office[i].xdoc1 + " target='_blank'>View</a>"; xcomments = xcomments + "</td>"; xcomments = xcomments + "</tr>"; } if (lt_tm_office[i].xdoc2 != "") { xcomments = xcomments + "<tr>"; xcomments = xcomments + "<td colspan=\"2\" align=\"center\">"; xcomments = xcomments + "View Document 2: <a href=" + lt_tm_office[i].xdoc2 + " target='_blank'>View</a>"; xcomments = xcomments + "</td>"; xcomments = xcomments + "</tr>"; } if (lt_tm_office[i].xdoc3 != "") { xcomments = xcomments + "<tr>"; xcomments = xcomments + "<td colspan=\"2\" align=\"center\">"; xcomments = xcomments + "View Document 3: <a href=" + lt_tm_office[i].xdoc3 + " target='_blank'>View</a>"; xcomments = xcomments + "</td>"; xcomments = xcomments + "</tr>"; } } payment_date.Text = c_p.reg_date; transID.Text = c_p.validationID; p_type.Text = c_x.type; p_title.Text = c_x.title; p_item_code.Text = c_p.item_code; p_app_no.Text = c_x.app_no; p_app_date.Text = c_x.app_date; p_xname.Text = c_x.xname; p_xaddy.Text = c_x.xaddy; p_xemail.Text = c_x.xemail; p_xmobile.Text = c_x.xmobile; p_agt_addy.Text = c_x.agt_addy; p_agt_code.Text = c_x.agt_code; p_agt_email.Text = c_x.agt_email; p_agt_mobile.Text = c_x.agt_mobile; p_agt_name.Text = c_x.agt_name; p_last_rwl_date.Text = c_x.last_rwl_date; p_due_date.Text = Convert.ToDateTime(c_x.last_rwl_date).AddYears(1).ToString("yyyy-MM-dd"); } else { Response.Redirect("./app_renewal.aspx"); } if (Request.QueryString["x2"] != null) { Session["transID"] = null; Session["x_code"] = null; Session["transID"] = transID.Text; Session["x_code"] = c_p.log_officer; Response.Redirect("./admin_cert_status.aspx"); } }