Exemplo n.º 1
0
        public bool UpdateVerifyMember(VerifyMemberViewModel model)
        {
            try
            {
                VerifyMember verify = _Context.VerifyMember.Where(x => x.VerifyId == model.VerifyId).FirstOrDefault();
                verify.VerifyId   = model.VerifyId;
                verify.VerifyName = model.VerifyName;

                _Context.VerifyMember.Update(verify);
                _Context.SaveChanges();

                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
Exemplo n.º 2
0
        public VerifyMemberViewModel GetVerifyMemberDetail(int id)
        {
            try
            {
                VerifyMember verify = _Context.VerifyMember.Where(x => x.VerifyId == id).FirstOrDefault();

                VerifyMemberViewModel model = new VerifyMemberViewModel
                {
                    VerifyId   = verify.VerifyId,
                    VerifyName = verify.VerifyName
                };

                return(model);
            }
            catch (Exception)
            {
                VerifyMemberViewModel emptymodel = new VerifyMemberViewModel();
                return(emptymodel);
            }
        }