예제 #1
0
        public void ContactScheduleAdd(ContactScheduleViewModel model)
        {
            ContactSchedule contact = new ContactSchedule
            {
                ContactEmail     = model.ContactEmail,
                ContactFirstName = model.ContactFirstName,
                ContactLastName  = model.ContactLastName,
                ContactPhone     = model.ContactPhone,
                ContactPhoneExt  = model.ContactPhoneExt,
                ContactTitle     = model.ContactTitle,
                MemberCoverageID = model.MemberCoverageID
            };

            ContextPerRequest.CurrentData.ContactSchedules.Add(contact);
            ContextPerRequest.CurrentData.SaveChanges();
        }
예제 #2
0
        public void ContactScheduleEdit(ContactScheduleViewModel model)
        {
            string UserId = BHIP.Model.Helper.Security.GetLoggedInUserID();

            var query = (from contact in ContextPerRequest.CurrentData.ContactSchedules
                         where contact.ContactScheduleID == model.ContactScheduleID
                         select contact).FirstOrDefault <ContactSchedule>();

            if (query != null)
            {
                query.ContactEmail     = model.ContactEmail;
                query.ContactFirstName = model.ContactFirstName;
                query.ContactLastName  = model.ContactLastName;
                query.ContactPhone     = model.ContactPhone;
                query.ContactPhoneExt  = model.ContactPhoneExt;
                query.ContactTitle     = model.ContactTitle;
                query.MemberCoverageID = model.MemberCoverageID;
                ContextPerRequest.CurrentData.SaveChanges();
            }
        }
예제 #3
0
        public void ContactScheduleEdit(ContactScheduleViewModel model)
        {
            string UserId = BHIP.Model.Helper.Security.GetLoggedInUserID();

            ContactScheduleHold hold = new ContactScheduleHold
            {
                ContactEmail      = model.ContactEmail,
                ContactFirstName  = model.ContactFirstName,
                ContactLastName   = model.ContactLastName,
                ContactPhone      = model.ContactPhone,
                ContactPhoneExt   = model.ContactPhoneExt,
                ContactTitle      = model.ContactTitle,
                ContactScheduleID = model.ContactScheduleID,
                EditType          = "Edit",
                MemberCoverageID  = model.MemberCoverageID,
                ScheduleStatusID  = 2,
                UserID            = UserId
            };

            ContextPerRequest.CurrentData.ContactScheduleHolds.Add(hold);
            ContextPerRequest.CurrentData.SaveChanges();
        }