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 Business.Configuration; using Business.Customer; using Common.Helper; using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Text; using System.Web; using System.Web.UI; using System.Web.UI.WebControls;
namespace JMEAgentSystem.WebPages.CustomerRegistration { public partial class PrintDetails : System.Web.UI.Page { private readonly ICustomerServices _customerServices = AutoFacContainer.Resolve<ICustomerServices>(); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { GetStatic.PrintMessage(this.Page); LoadCustomerDetails(); } }
protected void approve_Click(object sender, EventArgs e) {
} private void LoadCustomerDetails() { var membershipId = GetMembershipId();
var receiverId = GetReceiverId(); if (membershipId == "" || receiverId == "") { return; } var dataSet = _customerServices.GetCustomerInfoFromMembershiId(GetStatic.GetUser(), membershipId, receiverId,"");
//set customer details
SetCustomerDetails(dataSet.Tables[1].Rows[0]); //set receiver dettails
SetReceiverDetails(dataSet.Tables[2].Rows[0]); //get signature
docDiv.InnerHtml = GetSignatrueHtml(dataSet, "agent-upload", dataSet.Tables[1].Rows[0]["customerId"].ToString()); } private string GetMembershipId() { return GetStatic.ReadQueryString("membershipId", ""); } private string GetReceiverId() { return GetStatic.ReadQueryString("receiverId", ""); } private void SetCustomerDetails(DataRow dr) { hdnCustomerId.Value = dr["customerId"].ToString(); TxtMembershipId.InnerText = dr["membershipId"].ToString(); txtCustomerType.InnerText = dr["customerType"].ToString(); txtFullName.InnerText = dr["fullName"].ToString(); hdnAccountName.Value = txtFullName.InnerText; txtGender.InnerText = dr["gender"].ToString(); txtCountry.InnerText = dr["country"].ToString(); txtAddress.InnerText = dr["address"].ToString(); txtZipcCode.InnerText = dr["zipcode"].ToString(); txtCity.InnerText = dr["city"].ToString(); txtEmailId.InnerText = dr["email"].ToString(); txtTelephoneNo.InnerText = dr["telNo"].ToString(); txtMobileNo.InnerText = dr["mobile"].ToString(); txtNativeCountry.InnerText = dr["nativeCountry"].ToString(); txtDateOfBirth.InnerText = dr["dob"].ToString(); txtOccupation.InnerText = dr["occupation"].ToString(); txtOtherOccupation.InnerText = dr["occupationOther"].ToString(); txtIssueDate.InnerText = dr["idIssueDate"].ToString(); txtExpireDate.InnerText = dr["idExpiryDate"].ToString(); txtIdType.InnerText = dr["idType"].ToString(); txtIdNumber.InnerText = dr["idNumber"].ToString(); txtVisaStatus.InnerText = dr["visaStatus"].ToString(); txtEmployeeBusinessType.InnerText = dr["employeeBusinessType"].ToString(); txtNameOfEmployer.InnerText = dr["nameOfEmployeer"].ToString(); txtSSnNo.InnerText = dr["SSNNO"].ToString(); txtMonthlyIncome.InnerText = dr["monthlyIncome"].ToString(); txtRemittanceAllowed.InnerText = dr["remittanceAllowed"].ToString(); txtOnlineLoginAllowed.InnerText = dr["onlineUser"].ToString(); txtRemarks.InnerText = dr["remarks"].ToString(); txtSourceOfFund.InnerText = dr["sourceOfFund"].ToString(); } private void SetReceiverDetails(DataRow dr) { recCountry.InnerText = dr["country"].ToString(); recBeneficiaryType.InnerText = dr["receiverType"].ToString(); recFullName.InnerText = dr["customerName"].ToString(); recNativeCountry.InnerText = dr["NativeCountry"].ToString(); recAddress.InnerText = dr["address"].ToString(); recCity.InnerText = dr["city"].ToString(); recContactNo.InnerText = dr["homePhone"].ToString(); recMobile.InnerText = dr["mobile"].ToString(); recIdType.InnerText = dr["idType"].ToString(); recIdNumber.InnerText = dr["idNumber"].ToString(); recPlaceOfIssue.InnerText = dr["placeOfIssue"].ToString(); recRelationship.InnerText = dr["relationship"].ToString(); recOtherRelationDescription.InnerText = dr["otherRelationDesc"].ToString(); recPurposeOfRemittance.InnerText = dr["purposeOfRemit"].ToString(); otherPurpose.InnerText = dr["otherPurpose"].ToString(); recPaymentMode.InnerText = dr["paymentMode"].ToString(); pagent.InnerText = dr["payOutPartner"].ToString(); recAccountNumber.InnerText = dr["receiverAccountNo"].ToString(); pBranch.InnerText = dr["bankBranchName"].ToString(); recRemarks.InnerText = dr["remarks"].ToString(); } public string GetSignatrueHtml(DataSet dataSet,string fileDescription,string sessionId) { var dr = dataSet.Tables[1].Rows[0]; var registerDate = dr["createdDate"].ToString(); var membershipId = dr["membershipId"].ToString(); var documentDetails = _customerServices.GetDocumentByCustomerId(dr["customerId"].ToString(), fileDescription, sessionId); StringBuilder imageHtml = new StringBuilder(); if (documentDetails != null) { foreach (DataRow item in documentDetails.Rows) { var customerId = dr["customerId"].ToString(); var fileName = item["fileName"].ToString(); string imageUrl = "/WebPages/GetFileView.ashx?registerDate=" + Convert.ToDateTime(registerDate).ToString("yyyy-MM-dd") + "&customerId=" + customerId + "&membershipNo=" + membershipId + "&fileName=" + fileName;
imageHtml.Append("<div class=\"col-md-12\"><div class=\"form-group\"><div class=\"col-md-12\">"); imageHtml.Append("<label>" + item["documentName"].ToString() + "</label>"); imageHtml.Append("<img src=\"" + imageUrl + "\" height=\"150\" width=\"200\" onclick=\'showImage(this);\'/>"); imageHtml.Append("</div>"); imageHtml.Append("</div>"); imageHtml.Append("</div>"); } } return imageHtml.ToString(); } } }
|