protected void SaveDocs_Click(object sender, EventArgs e) { SaveDocs.Visible = false; string str = ""; string str2 = ""; string str3 = ""; string path = ""; int num = 0; if ((logo_description.SelectedValue != "2") && !logo_pic.HasFile) { logo_text = "2"; num++; } if (num != 0) { Response.Write("<script language=JavaScript>alert('Please fill in the marked fileds')</script>"); show_image_section = "1"; } else { if ((logo_description.SelectedValue != "2") && logo_pic.HasFile) { path = t.doUploadPic(xmarkID.Value, xmarkID.Value + ".jpg", Server.MapPath("~/") + "admin/tm/Picz/", logo_pic); } if (auth_doc.HasFile) { str3 = t.doUploadDoc(xmarkID.Value, Server.MapPath("~/") + "admin/tm/docz/", auth_doc); } if (sup_doc1.HasFile) { str2 = t.doUploadDoc(xmarkID.Value, Server.MapPath("~/") + "admin/tm/docz/", sup_doc1); } if (sup_doc2.HasFile) { str = t.doUploadDoc(xmarkID.Value, Server.MapPath("~/") + "admin/tm/docz/", sup_doc2); } if (logo_description.SelectedValue != "2") { if (!File.Exists(path)) { SaveDocs.Visible = true; show_imageMsg = "PLEASE UPLOAD A VALID IMAGE!!"; } else { path = path.Replace(Server.MapPath("~/") + "admin/tm/", ""); str3 = str3.Replace(Server.MapPath("~/") + "admin/tm/", ""); str2 = str2.Replace(Server.MapPath("~/") + "admin/tm/", ""); str = str.Replace(Server.MapPath("~/") + "admin/tm/", ""); if (t.updateMarkDocz(path, str3, str2, str, xpwalletID.Value) != "0") { status = t.updateIpoApplicationReferenceStatus(xvid.Value, xgt.Value, "1"); if (status == 1) { Response.Redirect("./tm_acknowledgement.aspx"); } else { Response.Redirect("http://www.iponigeria.com/userarea/dashboard"); } } } } else { path = path.Replace(Server.MapPath("~/") + "admin/tm/", ""); str3 = str3.Replace(Server.MapPath("~/") + "admin/tm/", ""); str2 = str2.Replace(Server.MapPath("~/") + "admin/tm/", ""); str = str.Replace(Server.MapPath("~/") + "admin/tm/", ""); if (t.updateMarkDocz(path, str3, str2, str, xpwalletID.Value) != "0") { status = t.updateIpoApplicationReferenceStatus(xvid.Value, xgt.Value, "1"); if (status == 1) { Response.Redirect("./tm_acknowledgement.aspx"); } else { Response.Redirect("http://www.iponigeria.com/userarea/dashboard"); } } } } }