Beispiel #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 }));
            }
        }
Beispiel #2
0
 public ActionResult CreateUser()
 {
     ViewBag.Role = _commonRepository.GetUserRoleList().ToList();
     return(View());
 }