예제 #1
0
        public string GiaoVien_update(GiaoVienModel m)
        {
            string dt;

            try
            {
                var sp_result = db.GiaoVien_update(
                    int.Parse(m.ID),
                    m.Ma_gv,
                    m.Ten_gv,
                    m.Gioi_tinh,
                    DateTime.Parse(m.Ngay_sinh),
                    m.Email,
                    m.Sđt,
                    int.Parse(m.Active),
                    m.UserName,
                    m.PassWord
                    );

                if (sp_result.FirstOrDefault().Updated == 1)
                {
                    dt = "Sửa thành công";
                }
                else
                {
                    dt = "Sửa thất bại";
                }
            }
            catch (Exception e)
            {
                dt = "Đã có lỗi tại GiaoVien_update" + e;
            }
            return(dt);
        }