示例#1
0
 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"));
     }
 }
示例#2
0
 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"));
     }
 }
示例#3
0
        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);
        }