public void SendMail(int SendByUserId, int SendToUserId, string Subject, string _EmailBody) { EmailManager objec = new EmailManager(); objec.SendMail(SendByUserId, SendToUserId, Subject, _EmailBody); }
public object InsertCreditPointCCDetails(object[] objValue) { StringBuilder sb = new StringBuilder(); UserRegistration objUserReg = new UserRegistration(); BillingResource objBillingResource = new BillingResource(); BillingHistory objBilling = new BillingHistory(); EmailManager objEmailManager = new EmailManager(); TributePackage objpackage = new TributePackage(); // return objBillingResource.InsertRecord(objValue); UserCreditcardDetails objCCdetail = new UserCreditcardDetails(); SessionValue objUser = new SessionValue(); Tributes objTribute = new Tributes(); object identity = new object(); using (TransactionScope trans = new TransactionScope()) { identity = objBillingResource.InsertRecord(objValue); //Transaction Commited trans.Complete(); } return identity; }
public object SendSponsorEmailOnFreeUpgrade(object[] objValue) { StringBuilder sb = new StringBuilder(); UserRegistration objUserReg = new UserRegistration(); BillingResource objBillingResource = new BillingResource(); BillingHistory objBilling = new BillingHistory(); EmailManager objEmailManager = new EmailManager(); TributePackage objpackage = new TributePackage(); // return objBillingResource.InsertRecord(objValue); UserCreditcardDetails objCCdetail = new UserCreditcardDetails(); SessionValue objUser = new SessionValue(); Tributes objTribute = new Tributes(); String[] SponsorNameandMsgForEmail; object identity = new object(); //using (TransactionScope trans = new TransactionScope()) //{ // identity = objBillingResource.InsertRecord(objValue); // //Transaction Commited // trans.Complete(); //} objUserReg = (UserRegistration)objValue[0]; if (objValue.Length > 1) { objUser = (SessionValue)objValue[1]; objTribute = (Tributes)objValue[2]; objpackage = (TributePackage)objValue[3]; SponsorNameandMsgForEmail = (String[])objValue[4]; // Send the email to all the adminstrator if (objpackage.IsSponserHide) { if (SponsorNameandMsgForEmail[0] != string.Empty) { objEmailManager.SendSponsorMailsWithMessage(SponsorNameandMsgForEmail[0], SponsorNameandMsgForEmail[1], objTribute.TributeId, objTribute.TypeDescription, objTribute.TributeName, objTribute.TributeUrl, objpackage.EndDate != null ? DateTime.Parse(objpackage.EndDate.ToString()).ToString("MMMM dd, yyyy") : "Never", objpackage.PackageId); } /* commented by Mohit else if (objpackage.IsSponsor) { objEmailManager.SendSponsorMails(objUser.UserType == 1 ? objUser.UserName : objUser.FirstName, objUser.UserEmail, objTribute.TributeId, objTribute.TypeDescription, objTribute.TributeName, objTribute.TributeUrl, objpackage.EndDate != null ? DateTime.Parse(objpackage.EndDate.ToString()).ToString("MMMM dd, yyyy") : "Never", objpackage.PackageId); } */ else { objEmailManager.SendSponsorMails("An anonymous person has", "Your " + WebConfig.ApplicationWord + "<" + WebConfig.NoreplyEmail + ">", objTribute.TributeId, objTribute.TypeDescription, objTribute.TributeName, objTribute.TributeUrl, objpackage.EndDate != null ? DateTime.Parse(objpackage.EndDate.ToString()).ToString("MMMM dd, yyyy") : "Never", objpackage.PackageId); } //objEmailManager.SendSponsorMails(objUser.UserName, objUser.UserEmail, objTribute.TributeId, objTribute.TypeDescription, objTribute.TributeName, objTribute.TributeUrl, objUserReg.UserCreditcardDetails.ExpirationDate.ToString("MMMM dd, yyyy"), objpackage.PackageId); } } return identity; }
public void SendMailReply(int SendByUserId, int SendToUserId, string Subject, string _EmailBody, int Messageid) { EmailManager objec = new EmailManager(); objec.SendMailReply(SendByUserId, SendToUserId, Subject, _EmailBody,Messageid); }