public ActionResult CreateEdit(vw_HG_UsersDetails Objuser) { if (Objuser.EMail == null) { Objuser.EMail = ""; } if (Objuser.UserType != "A" && Objuser.UserType != "SA") { if (Objuser.OrgID <= 0) { return(Json(new { msg = "Please Select Organization First" })); } } vw_HG_UsersDetails ObjUserAlreadyExist = new vw_HG_UsersDetails().MobileAlreadyExist(Objuser.UserId); if (ObjUserAlreadyExist.UserCode > 0 && ObjUserAlreadyExist.UserCode != Objuser.UserCode) { return(Json(new { msg = "User Id Already Taken" })); } HG_UserTypes objUserType = new HG_UserTypes().GetOne(0, Objuser.UserType); int i = Objuser.save(); Objuser.UserType = objUserType.UserTypeName; if (i > 0) { return(Json(new { data = Objuser }, JsonRequestBehavior.AllowGet)); } return(RedirectToAction("Error")); }
public JObject RatingApplied(int CID) { JObject result = new JObject(); vw_HG_UsersDetails ObjUser = new vw_HG_UsersDetails().GetSingleByUserId(CID); if (ObjUser.UserCode > 0) { ObjUser.RateNow = 1; ObjUser.save(); result.Add("Status", 200); } else { result.Add("Status", 400); } return(result); }