public ActionResult VIP(string search, int?page)
        {
            List <BOVIPTable> lst = bllvip.GetAllVIP().Where(u => u.lstDepartment.CompanyId == companyId).ToList();

            if (search != null)
            {
                lst = bllvip.GetAllVIP().Where(u => u.lstDepartment.CompanyId == companyId && u.FullName.StartsWith(search)).ToList();
            }
            return(View(lst.ToPagedList(page ?? 1, 10)));
        }
Ejemplo n.º 2
0
        public ActionResult SaveToDateTimeTable(FormCollection fc)
        {
            BODateTime           bDateTime    = new BODateTime();
            BOAppointmentDetails bAppointment = new BOAppointmentDetails();
            var companyId = fc["dropdownCompany"].ToString();                                                                        //CompanyId
            var vipId     = fc["dropdownVIP"].ToString();                                                                            //VipId
            var dateId    = fc["dropdownDate"].ToString();
            var dateValue = bllAvailable.GetAllAvailableTiming().Where(u => u.Id == Convert.ToInt32(dateId)).SingleOrDefault().Date; ////date

            bDateTime.Date = Convert.ToDateTime(dateValue);
            //string resultString = Regex.Match(bDateTime.Date.ToString(), @"\d{4}-\d{2}-\d{2}").Value;
            bDateTime.FromTime   = fc["dropdownInterval"].ToString();
            bDateTime.ToTime     = endTime;
            bDateTime.IsCanceled = false;
            int i = bllDateTime.CreateDateTime(bDateTime);

            bAppointment.DepartmentId    = Convert.ToInt32(fc["dropdownDepartment"].ToString());
            bAppointment.AppointmentFrom = emailId;
            bAppointment.AppointmentTo   = bllVIP.GetAllVIP().Where(u => u.Id == Convert.ToInt32(vipId)).SingleOrDefault().Email;
            bAppointment.DateTimeId      = bllDateTime.GetLastId();
            bAppointment.Details         = fc["Details"].ToString();
            bAppointment.status          = "True";
            int j = bllAppointment.CreateAppointment(bAppointment);

            if (j > 0)
            {
                ViewBag.Appointment = "Successfully Created";
            }
            else
            {
                ViewBag.Appointment = "Failed";
            }
            return(RedirectToAction("FixAppointment"));
        }
Ejemplo n.º 3
0
        public VIPController()
        {
            string id  = System.Web.HttpContext.Current.User.Identity.GetUserId();
            var    vip = blvip.GetAllVIP().Where(u => u.UserId == id).FirstOrDefault();

            VIPID = vip.Id;
        }