예제 #1
0
        public static string update_Candidate(INSERT_CANDIDATE_INPUT d)
        {
            ResponseModel rs  = new ResponseModel();
            var           dto = new INSERT_CANDIDATE
            {
                userName    = d.userName,
                FullName    = d.FullName,
                Address     = d.Address,
                School      = d.School,
                PhoneNumber = d.PhoneNumber,
                Email       = d.Email,
                Skill       = d.Skill,
                Specialized = d.Specialized,
                CareerGoal  = d.CareerGoal,
                DateBirth   = d.DateBirth,
                Image       = d.Image,
                Interests   = d.Interests
            };
            var res = IData.update_Candidate(dto);

            if (res.ResponseCode == 1)
            {
                rs.Returncode    = ResponseCodeEnum.Success.GetHashCode();
                rs.ReturnMessage = "Cập nhật thông tin  thành công";
            }
            else
            {
                rs.Returncode    = ResponseCodeEnum.Failed.GetHashCode();
                rs.ReturnMessage = "Cập nhật tin thất bại";
            }
            string js = CONVERJS.convert(rs);

            return(js);
        }
예제 #2
0
 public ResponseResult update_Candidate(INSERT_CANDIDATE model)
 {
     try
     {
         var lp = new List <SqlParameter>
         {
             new SqlParameter("@userName", model.userName),
             new SqlParameter("@FullName", model.FullName),
             new SqlParameter("@Address", model.Address),
             new SqlParameter("@School", model.School),
             new SqlParameter("@PhoneNumber", model.PhoneNumber),
             new SqlParameter("@Email", model.Email),
             new SqlParameter("@Skill", model.Skill),
             new SqlParameter("@Image", model.Image),
             new SqlParameter("@CareerGoal", model.CareerGoal),
             new SqlParameter("@DateBirth", model.DateBirth),
             new SqlParameter("@Specialized", model.Specialized),
             new SqlParameter("@Interests", model.Interests),
         };
         return(CONNECT.CONNECT.ExecuteSP <ResponseResult>("update_Candidate", lp));
     }
     catch (Exception e)
     {
         throw e;
     }
 }