public IHttpActionResult GetUserInfoByUID(string uid) { objUserInfoDAL = new DA.UserInfoDAL(); retUserInfo = objUserInfoDAL.GetUserInfoByUId(Guid.Parse(uid.Replace("\"", ""))); if (retUserInfo != null) { return(Ok(new { result = retUserInfo })); } else { return(BadRequest("error occure while geting userinfo")); } }
public IHttpActionResult UpdateUserInfo(BE.UserInfo objUserInfo) { objUserInfoDAL = new DA.UserInfoDAL(); qresult = objUserInfoDAL.UpdateUserinfo(objUserInfo); if (qresult) { return(Ok("updated user info")); } else { return(BadRequest("error occure while updating")); } }
public IHttpActionResult Register(BE.User objUser) { objUserDAL = new DA.UserDal(); registeruserid = objUserDAL.InsertLogin(objUser); if (registeruserid != Guid.Empty) { objUserInfoDAL = new DA.UserInfoDAL(); objUser.userinfo.uid = registeruserid; objUserInfoDAL.InsertUserInfo(objUser.userinfo); return(Ok(new { result = objUser })); } else { return(BadRequest("Error occure while register")); } throw new HttpResponseException(HttpStatusCode.NotFound); }