public ActionResult InsertOutlet(OutletDetailModel oOutletInfo)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    oCurrentUser = (SysUser)Session["User"];
                    var existOutlet = oDBContext.OfferLocOutletMaps.FirstOrDefault(t => t.ID == oOutletInfo.Outlet.ID);

                    if (existOutlet == null)
                    {
                        OfferLocOutletMap oOfferLocOutletMap = oOutletInfo.Outlet;
                        oOfferLocOutletMap.IsActive  = true;
                        oOfferLocOutletMap.CreatedBy = oCurrentUser.ID;
                        oOfferLocOutletMap.CreatedOn = DateTime.Now;
                        oDBContext.OfferLocOutletMaps.Add(oOfferLocOutletMap);
                        oDBContext.SaveChanges();
                        TempData["SuccessMsg"] = "Data Saved Successfully";
                    }
                    else
                    {
                        TempData["ErrorMsg"] = "Data already Exists!!!";
                    }
                }
            }
            catch (Exception ex)
            {
                TempData["ErrorMsg"] = "Error Occured Due to " + ExceptionMsg(ex);
            }
            return(RedirectToAction("Index"));
        }
        public ActionResult NewOutlet()
        {
            oCurrentUser = (SysUser)Session["User"];
            var newOutlet = new OfferLocOutletMap();

            newOutlet.IsActive = true;
            newOutlet.UserId   = oCurrentUser.ID;

            var outletInfo = new OutletDetailModel();

            outletInfo.IsNew  = true;
            outletInfo.Outlet = newOutlet;

            ViewBag.LocationList = oDBContext.OfferLocations.Select(x => x).ToList().Select(x => new SelectListItem
            {
                Value = x.ID.ToString(),
                Text  = x.LocationName.ToString()
            });

            return(PartialView("_outletDetailPartial", outletInfo));
        }