void updateDetails() { saveLocal(); Loans2Function i = new Loans2Function(); i.Save(l); }
protected void uploadF_Click(object sender, EventArgs e) { //read and create loan if (File.Exists(Server.MapPath(" ") + FileUpload1.FileName) == true && (FileUpload1.FileName != string.Empty)) { File.Delete(Server.MapPath(" ") + FileUpload1.FileName); } FileUpload1.SaveAs(Server.MapPath(" ") + FileUpload1.FileName); string fileName = Server.HtmlEncode(FileUpload1.FileName); // Get the extension of the uploaded file. string extension = System.IO.Path.GetExtension(fileName); // Allow only files with .doc or .xls extensions // to be uploaded. if (extension == ".pdf") { List <string> l = new List <string>(); StringBuilder text = new StringBuilder(); if (File.Exists(Server.MapPath(" ") + FileUpload1.FileName)) { PdfReader pdfReader = new PdfReader(Server.MapPath(" ") + FileUpload1.FileName); AllLoansFunction a = new AllLoansFunction(); a.CreateLoanByFile(pdfReader, uid); pdfReader.Close(); } File.Delete(Server.MapPath(" ") + FileUpload1.FileName); } //save the upload file in the system for our employees string filename = Path.GetFileName(FileUpload1.PostedFile.FileName); string contentType = FileUpload1.PostedFile.ContentType; try { UploadDocdfunction inter = new UploadDocdfunction(); inter.createDoc(uid, filename, contentType, "Source Loan 2", FileUpload1); Loans2Function loan2 = new Loans2Function(); loan2.uploadAndCreate(uid); Waiting.Visible = true; } catch (Exception ex) { Error.Text = "Sorry Our System Work Only With Experian Document. You Can Fill In The Information Yourself"; } Response.Redirect(Request.Url.AbsoluteUri); }
protected void Submit_Click(object sender, EventArgs e) { saveLocal(); Loans2Function i = new Loans2Function(); i.Save(l); try { loan.Submit(l); } catch (Exception ex) { visabaleStep(ex.Message.Split('@')[1], ex.Message.Split('@')[0]); } }