using Swift.DAL.Remittance.Administration.ReceiverInformation; using Swift.web.Library; 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 Swift.web.AgentNew.Administration.CustomerSetup.Benificiar { public partial class NewReceiverPrint : System.Web.UI.Page { private const string ViewFunctionId = "20193010"; private const string PrintFunctionId = "20193020"; private const string ViewFunctionIdAgent = "20900000"; private const string PrintFunctionIdAgent = "20900010"; private readonly ReceiverInformationDAO informationDAO = new ReceiverInformationDAO(); private readonly RemittanceLibrary remittanceLibrary = new RemittanceLibrary(); protected void Page_Load(object sender, EventArgs e) { Authenticate(); remittanceLibrary.CheckSession(); populateForm(); } private void Authenticate() { remittanceLibrary.CheckAuthentication(GetFunctionIdByUserType(ViewFunctionIdAgent, ViewFunctionId) + "," + GetFunctionIdByUserType(PrintFunctionIdAgent, PrintFunctionId)); } public string GetFunctionIdByUserType(string functionIdAgent, string functionIdAdmin) { return (GetStatic.GetUserType() == "HO") ? functionIdAdmin : functionIdAgent; } private void populateForm() { StringBuilder sb = new StringBuilder(); var receiverIds = GetStatic.ReadSession("receiverIds", ""); var data = informationDAO.GetAllReceiverSenderDataForPrint(receiverIds, GetStatic.GetUser()); foreach (DataRow item in data.Rows) { sb.Append(ReceiverPageByReceiverId(item)); } receiveTable.InnerHtml = sb.ToString(); } private string ReceiverPageByReceiverId(DataRow item) { StringBuilder sb = new StringBuilder(); sb.AppendLine("
"); sb.AppendLine(""); sb.AppendLine(""); //Body Start sb.AppendLine(""); sb.AppendLine(""); //Body END //information section sb.AppendLine(" "); sb.AppendLine(" "); //end information section sb.AppendLine("
"); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine("

info@japanremit.com


From : " + item["fullName"] + " <'" + item["email"] + "'>
Send : " + item["createdDate"] + "
To :INFO; SUPPORT; BASANTA; JMEJAPAN
Subject : New User
"); sb.AppendLine("
"); sb.AppendLine("
"); sb.AppendLine("
"); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine(""); sb.AppendLine("
"); sb.AppendLine("
Sender Details
"); sb.AppendLine("
" + item["fullName"] + "
" + item["dob"] + "
" + item["mobile"] + "
Receiver Details
" + item["receiverName"] + "
" + item["receiverAddress"] + "
" + item["country"] + "
" + item["receiverMobile"] + "
Mode Of Receipt :" + item["paymentMode"] + "
" + item["bankName"] + "
" + item["bankName"] + "
" + item["receiverAccountNo"] + "
" + item["relationship"] + "
" + item["purposeOfRemit"] + "
" + item["createdDate"] + "
"); sb.AppendLine(""); sb.AppendLine("

" + item["fullName"] + "

" + item["remarks"] + "

"); sb.AppendLine(""); return sb.ToString(); } } }