Exemple #1
0
        public HttpResponseMessage CommonBinder(string Ids)
        {
            CommonBinderModel model = new CommonBinderModel();

            string[] arr = Ids.Split(',');
            if (arr.Length > 0)
            {
                for (int i = 0; i < arr.Length; i++)
                {
                    if (Convert.ToInt32(arr[i]) == (int)CommonBinding.State)
                    {
                        model.lstState = _common.GetState(1).ToList();
                    }
                    if (Convert.ToInt32(arr[i]) == (int)CommonBinding.Roles)
                    {
                        model.lstRole = _common.GetUserRoleList().ToList();
                    }
                }
                if (model != null)
                {
                    return(Request.CreateResponse(HttpStatusCode.OK, new { Type = "success", Message = "Success", data = model }));
                }
                else
                {
                    return(Request.CreateResponse(HttpStatusCode.OK, new { Type = "error", Message = "No Record Found", data = model }));
                }
            }
            else
            {
                return(Request.CreateResponse(HttpStatusCode.OK, new { Type = "error", Message = "No Record Found", data = model }));
            }
        }
Exemple #2
0
        public ActionResult CreateRegistration()
        {
            Int64 userId = Convert.ToInt64(TempData["UserId"]);

            ViewBag.BindState = _commonRepository.GetState(1).ToList();
            var userDetails = _user.FindBy(x => x.UserId == userId).FirstOrDefault();
            RegistrationModel registrationModel = new RegistrationModel();

            registrationModel.UserId = userId;
            if (userDetails != null)
            {
                registrationModel.FirstName = userDetails.Name;
                registrationModel.PhoneNo   = userDetails.Phone;
                registrationModel.Email     = userDetails.Email;
            }
            return(View(registrationModel));
        }