private void upload_Clicked(object sender, EventArgs e) { try { if (Session["mix_updateID"] != null) { doc_path = Server.MapPath("~/") + "admin/pt/docz/" + Session["mix_updateID"].ToString() + "/"; if (!Directory.Exists(doc_path)) { Directory.CreateDirectory(doc_path); } if (IsValid && fu_loa_doc.HasFile) { loa_newfilename = Path.Combine(doc_path, fu_loa_doc.FileName.Replace(" ", "_")); fu_loa_doc.MoveTo(Path.Combine(doc_path, fu_loa_doc.FileName.Replace(" ", "_")), MoveToOptions.Overwrite); loa_newfilename = loa_newfilename.Replace(Server.MapPath("~/") + "admin/pt/", ""); Session["loa_newfilename"] = loa_newfilename; t.updateLoaDocz(loa_newfilename, txt_loa_no.Text, Session["mix_updateID"].ToString()); Session["txt_loa_no"] = txt_loa_no.Text; } if (IsValid && fu_claim_doc.HasFile) { claim_newfilename = Path.Combine(doc_path, fu_claim_doc.FileName.Replace(" ", "_")); fu_claim_doc.MoveTo(claim_newfilename, MoveToOptions.Overwrite); claim_newfilename = claim_newfilename.Replace(Server.MapPath("~/") + "admin/pt/", ""); Session["claim_newfilename"] = claim_newfilename; t.updateClaimDocz(claim_newfilename, txt_claim_no.Text, Session["mix_updateID"].ToString()); Session["txt_claim_no"] = txt_claim_no.Text; } if (IsValid && fu_pct_doc.HasFile) { pct_newfilename = Path.Combine(doc_path, fu_pct_doc.FileName.Replace(" ", "_")); fu_pct_doc.MoveTo(pct_newfilename, MoveToOptions.Overwrite); pct_newfilename = pct_newfilename.Replace(Server.MapPath("~/") + "admin/pt/", ""); Session["pct_newfilename"] = pct_newfilename; t.updatePctDocz(pct_newfilename, txt_pct_no.Text, Session["mix_updateID"].ToString()); Session["txt_pct_no"] = txt_pct_no.Text; } if (IsValid && fu_doa_doc.HasFile) { doa_newfilename = Path.Combine(doc_path, fu_doa_doc.FileName.Replace(" ", "_")); fu_doa_doc.MoveTo(doa_newfilename, MoveToOptions.Overwrite); doa_newfilename = doa_newfilename.Replace(Server.MapPath("~/") + "admin/pt/", ""); Session["doa_newfilename"] = doa_newfilename; t.updateDoaDocz(doa_newfilename, txt_doa_no.Text, Session["mix_updateID"].ToString()); Session["txt_doa_no"] = txt_doa_no.Text; } if (IsValid && fu_spec_doc.HasFile) { spec_newfilename = Path.Combine(doc_path, fu_spec_doc.FileName.Replace(" ", "_")); fu_spec_doc.MoveTo(spec_newfilename, MoveToOptions.Overwrite); spec_newfilename = spec_newfilename.Replace(Server.MapPath("~/") + "admin/pt/", ""); Session["spec_newfilename"] = spec_newfilename; t.updateSpecDocz(spec_newfilename, Session["mix_updateID"].ToString()); } string transactionID = ""; string gateway = ""; if (Session["vid"] != null) { transactionID = Session["vid"].ToString(); } if (Session["gt"] != null) { gateway = Session["gt"].ToString(); } try { status = ipo_gateway.UpdateTransaction(transactionID, gateway, "1"); } catch (Exception) { if (pc == "P001") { if ((((loa_newfilename != "0") && (claim_newfilename != "0")) && ((pct_newfilename != "0") && (doa_newfilename != "0"))) && (spec_newfilename != "0")) { ack_status = "1"; } } else if (((loa_newfilename != "0") && (claim_newfilename != "0")) && (spec_newfilename != "0")) { ack_status = "1"; } } if (pc == "P001") { if ((((loa_newfilename != "0") && (claim_newfilename != "0")) && ((pct_newfilename != "0") && (doa_newfilename != "0"))) && (spec_newfilename != "0")) { ack_status = "1"; } } else if (((loa_newfilename != "0") && (claim_newfilename != "0")) && (spec_newfilename != "0")) { ack_status = "1"; } } } catch (Exception exception2) { } }