You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
using Swift.DAL.OnlineAgent; using Swift.web.Library; using System; using System.Collections.Generic; using System.Data; using System.IO; using System.Linq; using System.Text; using System.Web; using System.Web.UI; using System.Web.UI.WebControls;
namespace Swift.web.Remit.Administration.OnlineCustomer { public partial class LetterForCustomerFromMobile : System.Web.UI.Page { OnlineCustomerDao _cd = new OnlineCustomerDao(); private readonly SwiftLibrary sl = new SwiftLibrary(); protected void Page_Load(object sender, EventArgs e) { sl.CheckSession(); PopulateInfo(); SavePDF(); } private void PopulateInfo() { DataRow result = _cd.GetDetailsWithPinNo(GetCustomerId(),GetStatic.GetUser()); customerName.InnerText = result["FullName"].ToString(); customerName1.InnerText = result["FullName"].ToString(); customerAddress1.InnerText = result["Address1"].ToString(); customerAddress2.InnerText = result["Address2"].ToString(); additionalAddress.InnerText = result["additionalAddress"].ToString(); pinNO.InnerText = result["pinNo"].ToString(); userName.InnerText = result["userName"].ToString(); } private string GetCustomerId() { return GetStatic.ReadQueryString("customerId", ""); } private void SavePDF() { var result = _cd.GetCustomerDetailsForLetterPDFSave(GetMembershipId(), GetCustomerId(), "letter").Split('|'); if (result[0] != "0") { return; } var customerId = result[1]; var membershipId = result[2]; var registerDate = result[3]; string path = GetStatic.GetCustomerFilePath() + "CustomerDocument\\" + registerDate.Replace("-", "\\") + "\\" + membershipId + "\\";
var sb = new StringBuilder(); downloadDivPDF.RenderControl(new HtmlTextWriter(new StringWriter(sb)));
string s = sb.ToString();
string fileName = GetStatic.HTMLToPDF(s, GetStatic.GetUser(), path, "letter"); _cd.AddCustomerLetterPDFUpload(customerId, GetStatic.GetUser(), fileName, "letter", customerId); } private string GetMembershipId() { return GetStatic.ReadQueryString("membershipId", ""); } private string GetRowId() { return GetStatic.ReadQueryString("customerId", ""); } } }
|