Esempio n. 1
0
        public ActionResult Delete(string permissionCode, CommonModel param, MemberDTO dto)
        {
            //파라미터가 없는 접근을 차단
            if (!NoParamValueCheck(permissionCode) || !NoParamValueCheck(dto.memId))
            {
                return RedirectToAction("NoParameterValue", "Home");
            }

            param.SearchField = Request.Params["SearchField"];
            param.SearchKeyword = Request.Params["SearchKeyword"];

            int result;

            dto.regIP = System.Web.HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];

            _MemberService.MemberDelete(permissionCode, param, dto, out result);

            TempData["resultNum"] = result;
            TempData["commonModelParam"] = param;

            return RedirectToAction("", new { Page = Request.Params["Page"] });
        }
Esempio n. 2
0
        public ActionResult EditPasswordProc(string permissionCode, CommonModel param, MemberDTO dto)
        {
            //파라미터가 없는 접근을 차단
            if (!NoParamValueCheck(permissionCode) || !NoParamValueCheck(dto.memId))
            {
                return RedirectToAction("NoParameterValue", "Home");
            }

            //넘어온 인자값 확인
            if (dto.memPassword != Request.Params["memPassword2"])
            {
                return Content("<script type='text/javascript'>alert('비밀번호/비밀번호 확인 이 일치하지 않습니다.');history.go(-1);</script>");
            }

            param.SearchField = Request.Params["SearchField"];
            param.SearchKeyword = Request.Params["SearchKeyword"];

            int result;

            dto.regIP = System.Web.HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];

            //비밀번호 암호화
            string noneHashPwd = dto.memPassword;
            AES256Cipher objEnc = new AES256Cipher();
            string M_PWD_MD5_HASH = objEnc.MD5Hash(noneHashPwd);   //MD5: PW -> M_PWD_MD5_HASH
            string M_PWD_SHA256_HASH = objEnc.SHA256Hash(M_PWD_MD5_HASH);   //MD5: M_PWD_MD5_HASH -> M_PWD_SHA256_HASH
            dto.memPassword = M_PWD_SHA256_HASH;

            _MemberService.MemberUpdatePassword(permissionCode, param, dto, out result);

            //http://blog.i6020345.com/life-cycle-of-tempdata-in-asp-net-mvc/
            TempData["resultNum"] = result;
            TempData["commonModelParam"] = param;

            return RedirectToAction("ViewInfo", new { memId = dto.memId, Page = Request.Params["Page"] });
        }
Esempio n. 3
0
        public ActionResult EditProc(string permissionCode, CommonModel param, MemberDTO dto)
        {
            //파라미터가 없는 접근을 차단
            if (!NoParamValueCheck(permissionCode) || !NoParamValueCheck(dto.memId))
            {
                return RedirectToAction("NoParameterValue", "Home");
            }

            param.SearchField = Request.Params["SearchField"];
            param.SearchKeyword = Request.Params["SearchKeyword"];

            int result;

            dto.regIP = System.Web.HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];

            _MemberService.MemberUpdateInfo(permissionCode, param, dto, out result);

            //http://blog.i6020345.com/life-cycle-of-tempdata-in-asp-net-mvc/
            TempData["resultNum"] = result;
            TempData["commonModelParam"] = param;

            return RedirectToAction("ViewInfo", new { memId = dto.memId, Page = Request.Params["Page"] });
            //return ViewInfo(dto.memId, param);
            //return RedirectToAction(c => c.ViewInfo)
        }
Esempio n. 4
0
        /// <summary>
        /// 회원정보 삭제
        /// </summary>
        /// <param name="permissionCode"></param>
        /// <param name="param"></param>
        /// <param name="memberDTO"></param>
        /// <param name="outReturnValue"></param>
        public void MemberDelete(string permissionCode, CommonModel param, MemberDTO dto, out int outReturnValue)
        {
            ObjectParameter returnValue = new ObjectParameter("returnValue", typeof(int));

            using (MemberEntities EfContext = new MemberEntities())
            {
                EfContext.SPMemberDelete(permissionCode, dto.memId, dto.regIP, returnValue);
            }

            outReturnValue = (int)returnValue.Value;
        }
Esempio n. 5
0
        /// <summary>
        /// 회원정보 수정
        /// </summary>
        /// <param name="permissionCode"></param>
        /// <param name="param"></param>
        /// <param name="memberDTO"></param>
        /// <returns></returns>
        public void MemberUpdateInfo(string permissionCode, CommonModel param, MemberDTO dto, out int outReturnValue)
        {
            ObjectParameter returnValue = new ObjectParameter("returnValue", typeof(int));

            using (MemberEntities EfContext = new MemberEntities())
            {
                EfContext.SPMemberUpdateInfo(permissionCode, dto.memId, dto.memName, dto.memMobile
                    , dto.memSite, dto.memSMSListenYN, dto.memDMListenYN
                    , ""//dto.memPicturePath.ToString()
                    , dto.memGradeCode, dto.regIP, dto.memStatusCode, returnValue);
            }

            outReturnValue = (int)returnValue.Value;
        }
Esempio n. 6
0
 public void MemberInsert(string permissionCode, CommonModel param, MemberDTO dto, out int outReturnValue)
 {
     throw new NotImplementedException();
 }