Ejemplo n.º 1
0
        public Boolean checkMember(string username, string pwd)
        {
            Boolean status = false;
            try
            {
                ThreeHotelEntities ct = new ThreeHotelEntities();

                User guest = new User();
                string ppwd = Encrypt(pwd);
                var q = from x in ct.Users
                        where x.MembershipId == username && x.Password == ppwd
                        select x;
                User u = q.First();

                if (u == null)
                    status = false;
                else
                    status = true;

                return status;
            }
            catch
            {
                return status;
            }
        }
Ejemplo n.º 2
0
        public string MemberSave(string salut, string familyName, string fName, string pwd, string email, string address, string ph, string country)
        {
            string id;
            ThreeHotelEntities ct = new ThreeHotelEntities();
            Guest g = new Guest();
            User user = new User();

            id = getMemberId();
            g.GuestId = id;

            g.Salutation = salut;
            g.FamilyName = familyName;
            g.FirstName = fName;
            user.MembershipId = id;
            user.Password = Encrypt(pwd);
            g.Email = email;
            g.Address = address;
            g.PhoneNo = ph;
            g.Country = country;

            ct.Guests.Add(g);
            ct.Users.Add(user);
            ct.SaveChanges();

            SendMail(fName, familyName, email, id);
            return id;
        }
Ejemplo n.º 3
0
        public void MemberChangePwd(string id, string newpwd)
        {
            ThreeHotelEntities ct = new ThreeHotelEntities();
            User g = new User();

            g = (from x in ct.Users
                 where x.MembershipId == id
                 select x).First();

            g.Password = Encrypt(newpwd);

            ct.SaveChanges();
        }
Ejemplo n.º 4
0
 public void Setup()
 {
     User = new BusinessLogic.User(UserId, Username);
 }
Ejemplo n.º 5
0
 public string InsertBorrowerReportinCart(string UserId, string ReportId, string TokenId)
 {
     User objUser = new User();
     string objResponse = objUser.InsertBorrowerReportinCart(UserId, ReportId, TokenId);
     return objResponse;
 }
        private void SendReportingEmailtoBorrower(UserReportDetail objReportDetails)
        {
            try
            {
                objUser = new User();
                EmailContent objEmailContent = objUser.GetEmailTemplatebyID(4);
                UserDetails objUserDetails = objUser.GetRegisteredUserDetails(new Guid(Request.Cookies["USERID"].Value));

                objEmailContent.ToAddress = objReportDetails.EMAIL;
                objEmailContent.IsEmailTemplate = true;
                Dictionary<string, string> Obj = new Dictionary<string, string>();
                List<Dictionary<string, string>> List = new List<Dictionary<string, string>>();
                Obj.Add("XXXREPORTERNAMEXXX", objUserDetails.FIRSTNAME + " " + objUserDetails.LASTNAME);
                Obj.Add("XXXREPORTIDXXX", objReportDetails.REPORTID);
                Obj.Add("XXXBORROWINGDATEXXX", objReportDetails.BORROWINGDATE.ToString("dd/MM/yyyy"));
                Obj.Add("XXXBORROWINGAMOUNTXXX", objReportDetails.BORROWINGAMOUNT);

                List.Add(Obj);
                objEmailContent.TemplateObject = new List<Dictionary<string, string>>();
                objEmailContent.TemplateObject = List;
                objUser.Send(objEmailContent);
            }
            catch (Exception ex)
            {
                objMasters.InsertWebsiteLog(Common.TOKEN, "ucReportDebt.aspx.cs", "SendReportingEmailtoBorrower", JsonConvert.SerializeObject(objReportDetails), ex.ToString());
            }
        }