public ActionResult UserOperationsEdit(string UserID)
        {
            AssignBizContext();
            SecurityUtils.SetGlobalViewbags(this, ActiveMenu, BizContext.UserContext.IsAdmin(), BizContext.UserContext.IsHotelAdmin(), BizContext.HotelID);

            UserOperationsRepository modelRepo = new UserOperationsRepository();
            UserOperationsRepository.Encryption64 ob = new UserOperationsRepository.Encryption64();
               // ViewBag.Countries = DropDownLists.GetCountries(1);
            var Countries = new SelectList(DropDownLists.GetCountries(1), "Value", "Text").OrderBy(i => i.Text);
            ViewBag.Countries = new SelectList(Countries, "Value", "Text");

            ViewBag.status = DropDownLists.GetStatus(null);
            ViewBag.SalutionType = DropDownLists.GetTitle(null);
            //ViewBag.Firm = DropDownLists.GetFirms("100001");
            ViewBag.Firm = DropDownLists.GetFirms(null);

            if (UserID != "")
            {
                long ID = Convert.ToInt64(ob.Decrypt(ConvertHexToString(System.Web.HttpContext.Current.Server.UrlDecode(UserID)), "58421043"));
                var UserOperations = modelRepo.GetUserOperations().FirstOrDefault(f => f.ID == ID);
                return View(UserOperations);
                // BindViewBagsUsers(UserOperations);
            }
            //SecurityUtils.SetGlobalViewbags(this, ActiveMenu);

            return View();
            //}
        }
 public ActionResult _Read([DataSourceRequest]DataSourceRequest request)
 {
     UserOperationsRepository modelRepo = new UserOperationsRepository();
     DataSourceResult result = modelRepo.GetUserOperations().ToDataSourceResult(request);
     return Json(result);
 }
 public ActionResult UserOperationsEdit(string UserID)
 {
     UserOperationsRepository modelRepo = new UserOperationsRepository();
     UserOperationsRepository.Encryption64 ob = new UserOperationsRepository.Encryption64();
     ViewBag.Countries = DropDownLists.GetCountries(1);
     ViewBag.status = DropDownLists.GetStatus(0);
     ViewBag.SalutionType = DropDownLists.GetTitle(1);
     ViewBag.Firm = DropDownLists.GetFirms("100001");
     try
     {
         if (UserID != "")
         {
             long ID = Convert.ToInt64(ob.Decrypt(ConvertHexToString(System.Web.HttpContext.Current.Server.UrlDecode(UserID)), "58421043"));
             var UserOperations = modelRepo.GetUserOperations().FirstOrDefault(f => f.ID == ID);
             return View(UserOperations);
             // BindViewBagsUsers(UserOperations);
         }
         SecurityUtils.SetGlobalViewbags(this, ActiveMenu);
     }
     catch (Exception ex)
     {
         string hostName1 = Dns.GetHostName();
         string GetUserIPAddress = Dns.GetHostByName(hostName1).AddressList[0].ToString();
         string PageName = Convert.ToString(Session["PageName"]);
         //string GetUserIPAddress = GetUserIPAddress1();
         using (BaseRepository baseRepo = new BaseRepository())
         {
             //BizContext BizContext1 = new BizContext();
             BizApplication.AddError(baseRepo.BizDB, PageName, ex.Message, ex.StackTrace, DateTime.Now, GetUserIPAddress);
         }
         Session["PageName"] = "";
         string error = ErrorHandling.HandleException(ex);
         return this.Json(new DataSourceResult { Errors = error });
     }
     return View();
     //}
 }