private void upload_Clicked(object sender, EventArgs e) { if (Session["mi_updateID"] != null) { doc_path = base.Server.MapPath("~/") + "admin/tm/docz/" + Session["mi_updateID"].ToString() + "/"; pic_path = base.Server.MapPath("~/") + "admin/tm/Picz/" + Session["mi_updateID"].ToString() + "/"; if (!Directory.Exists(doc_path)) { Directory.CreateDirectory(doc_path); } if (!Directory.Exists(pic_path)) { Directory.CreateDirectory(pic_path); } if (IsValid && fu_logo_pic.HasFile) { logo_pic_newfilename = Path.Combine(pic_path, fu_logo_pic.FileName.Replace(" ", "_")); fu_logo_pic.MoveTo(logo_pic_newfilename, MoveToOptions.Overwrite); } if (IsValid && fu_auth_doc.HasFile) { auth_doc_newfilename = Path.Combine(doc_path, fu_auth_doc.FileName.Replace(" ", "_")); fu_auth_doc.MoveTo(auth_doc_newfilename, MoveToOptions.Overwrite); } if (IsValid && fu_sup_doc1.HasFile) { sup_doc1_newfilename = Path.Combine(doc_path, fu_sup_doc1.FileName.Replace(" ", "_")); fu_sup_doc1.MoveTo(sup_doc1_newfilename, MoveToOptions.Overwrite); } if (IsValid && fu_sup_doc2.HasFile) { sup_doc2_newfilename = Path.Combine(doc_path, fu_sup_doc2.FileName.Replace(" ", "_")); fu_sup_doc2.MoveTo(sup_doc2_newfilename, MoveToOptions.Overwrite); } logo_pic_newfilename = logo_pic_newfilename.Replace(base.Server.MapPath("~/") + "admin/tm/", ""); auth_doc_newfilename = auth_doc_newfilename.Replace(base.Server.MapPath("~/") + "admin/tm/", ""); sup_doc1_newfilename = sup_doc1_newfilename.Replace(base.Server.MapPath("~/") + "admin/tm/", ""); sup_doc2_newfilename = sup_doc2_newfilename.Replace(base.Server.MapPath("~/") + "admin/tm/", ""); Session["logo_pic_newfilename"] = logo_pic_newfilename; Session["auth_doc_newfilename"] = auth_doc_newfilename; Session["sup_doc1_newfilename"] = sup_doc1_newfilename; Session["sup_doc2_newfilename"] = sup_doc2_newfilename; if ((Session["logo_text"] != null) && (Session["logo_text"].ToString() != "2")) { if (logo_pic_newfilename != "0") { if (t.UpdateMarkDocz(logo_pic_newfilename, auth_doc_newfilename, sup_doc1_newfilename, sup_doc2_newfilename, Session["mi_updateID"].ToString()) > 0) { this.status = "1"; if (this.status == "1") { ack_status = "1"; } else { // base.Response.Redirect("http://www.iponigeria.com/userarea/dashboard"); } } } } else { if (t.UpdateMarkDocz(logo_pic_newfilename, auth_doc_newfilename, sup_doc1_newfilename, sup_doc2_newfilename, Session["mi_updateID"].ToString()) > 0) { this.status = "1"; if (this.status == "1") { ack_status = "1"; } else { // base.Response.Redirect("http://www.iponigeria.com/userarea/dashboard"); } } } } }