Пример #1
0
        protected bool updatePersonGrade(Person person, string toGrade)
        {
            bool res = true;

            try
            {
                var pdal = new PersonDal();
                pdal.Update(new Person
                {
                    PID            = person.PID,
                    Ptel           = person.Ptel,
                    Username       = person.Username,
                    Pname          = person.Pname,
                    Ptime          = person.Ptime,
                    Pgrade         = toGrade,
                    PwechatID      = person.PwechatID,
                    Psex           = person.Psex,
                    Pemail         = person.Pemail,
                    Pcontact       = person.Pcontact,
                    Ppro           = person.Ppro,
                    Pwork_years    = person.Pwork_years,
                    Pjob4u         = person.Pjob4u,
                    Padvs          = person.Padvs,
                    Pact4fire      = person.Pact4fire,
                    Pact4water     = person.Pact4water,
                    Phobbies       = person.Phobbies,
                    Pfield_of_firm = person.Pfield_of_firm
                });
            }
            catch (Exception e) {
                res = false;
            }
            return(res);
        }
Пример #2
0
 /// <summary>
 /// Update changes in the context
 /// </summary>
 /// <param name="objContex"></param>
 public static void Update(PeopleContainer objContex)
 {
     try
     {
         PersonDal.Update(objContex);
     }
     catch (Exception)
     {
     }
 }
Пример #3
0
 /// <summary>
 /// Update a Person
 /// </summary>
 /// <param name="objContex">Get table to object</param>
 public static void Update(PersonDto personDto, ModelUnibookContainer objContex)
 {
     try
     {
         Person person = PersonDal.Get(personDto.PersonId, objContex);
         person.Name     = personDto.Name;
         person.LastName = personDto.LastName;
         person.Birthday = personDto.BirthDay;
         person.Deleted  = personDto.Deleted;
         //person.Gender = GenderBrl.Get(personDto.Gender.GenderId, objContex);
         PersonDal.Update(objContex);
     }
     catch (DbEntityValidationException ex)
     {
         throw ex;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Пример #4
0
 //修改自己的信息
 public void updateInfo(Person person, XiaoYan ec)
 {
     _persondal.Update(person);
     _ecdal.Update(ec);
 }
Пример #5
0
 public void updateInfo(Person person, XiaoYan xiaoyan)
 {
     _persondal.Update(person);
     _xiaoyandal.Update(xiaoyan);
 }
Пример #6
0
 public void update_inform(Person person, DaYan dayan)
 {
     _persondal.Update(person);
     _dayandal.Update(dayan);
 }