Ejemplo n.º 1
0
        public bool UpdateTeacher(TeacherDTO teacher)
        {
            //Check this
            //TeacherDTO tchr= JsonConvert.DeserializeObject<TeacherDTO>(teacher);

            int c = TeacherDAO.Save(teacher);

            //bool status = true;
            if (c > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }

            //var Status = new { IsUpdated = status };
            //return new HttpResponseMessage(HttpStatusCode.Accepted);
            //return Status;
        }
Ejemplo n.º 2
0
        public Object UpdateTeacher1(string teacher)
        {
            //Check this
            TeacherDTO tchr = JsonConvert.DeserializeObject <TeacherDTO>(teacher);

            int c = TeacherDAO.Save(tchr);

            bool status = true;

            if (c > 1)
            {
                status = true;
            }
            else
            {
                status = false;
            }

            var Status = new { IsUpdated = status };

            return(Status);
        }