public frmDetailKQKB(int KhamBenh_Id) { InitializeComponent(); var obj = new KQKBBUS(this).NVGetByKhamBenhId(KhamBenh_Id); if (obj != null) { TenBenhNhan.FormatTextFromTag(obj.TenBenhNhan); MaYTe.FormatTextFromTag(obj.MaYTe); Tuoi.FormatTextFromTag(obj.Tuoi); GioiTinh.FormatTextFromTag(obj.GioiTinh); DiaChi.FormatTextFromTag(obj.DiaChi); SDT.FormatTextFromTag(obj.SoDienThoai); THoiGianKham.FormatTextFromTag(obj.ThoiGianKham); NoiDungKham.FormatTextFromTag(obj.NoiDungKham); TrieuChungLamSang.FormatTextFromTag(obj.TrieuChungLamSang); ChuanDoanLamSang.FormatTextFromTag(obj.ChanDoanKhoaKham); TenPhongBan.FormatTextFromTag(obj.TenPhongBan); HuyeAp.FormatTextFromTag(obj.HuyetAp); Mach.FormatTextFromTag(obj.Mach); NhietDo.FormatTextFromTag(obj.NhietDo); NhipTho.FormatTextFromTag(obj.NhipTho); ChieuCao.FormatTextFromTag(obj.ChieuCao); CanNang.FormatTextFromTag(obj.CanNang); SoBHYT.FormatTextFromTag(obj.SoBHYT); NguoiLienHe.FormatTextFromTag(obj.NguoiLienHe); NgayhentaiKham.FormatTextFromTag(obj.NgayHenTaiKham); MaBenh.FormatTextFromTag(obj.MaBenh); MaBenhPhu.FormatTextFromTag(obj.MaBenhPhu); } }
public HttpResponseMessage Update(HttpRequestMessage request, CanNang canNang) { CanNang modelCanNang = null; try { canNang.TrangThai = true; _canNangService.Update(canNang); _canNangService.SaveChange(); modelCanNang = _canNangService.GetById(canNang.IdCanNang); if (modelCanNang != null) { Message = "Sửa thông tin cân nặng thành công"; } else { throw new DbEntityValidationException("sửa thông tin cân nặng không thành công"); } } catch (DbEntityValidationException ex) { LogException(ex); } return(GetResponseMessage(IsSuccess, Message, 1, modelCanNang)); }
public HttpResponseMessage Create(HttpRequestMessage request, CanNang canNang) { CanNang modelCanNang = null; try { canNang.NgayCapNhat = DateTime.Now; canNang.TrangThai = true; modelCanNang = _canNangService.Add(canNang); if (modelCanNang != null) { Message = "Tạo mới cân nặng thành công"; _canNangService.SaveChange(); } else { throw new DbEntityValidationException("tạo mới cân nặng không thành công"); } } catch (DbEntityValidationException ex) { LogException(ex); } return(GetResponseMessage(IsSuccess, Message, 1, modelCanNang)); }
public HttpResponseMessage GetById(HttpRequestMessage request, int id) { CanNang canNangSingler = null; try { canNangSingler = _canNangService.GetById(id); if (canNangSingler != null) { Message = "Thông tin cân nặng với id: " + id; } else { throw new DbEntityValidationException(string.Format("Không tìm kiếm được cân nặng với id {0}", id)); } } catch (DbEntityValidationException ex) { LogException(ex); } return(GetResponseMessage(IsSuccess, Message, 1, canNangSingler)); }
public HttpResponseMessage Delete(HttpRequestMessage request, int id) { CanNang modelCanNang = null; try { modelCanNang = _canNangService.Delete(id); _canNangService.SaveChange(); if (modelCanNang != null) { Message = "Xóa can nang thành công"; } else { throw new DbEntityValidationException("Xóa can nang không thành công"); } } catch (DbEntityValidationException ex) { LogException(ex); } return(GetResponseMessage(IsSuccess, Message, 1, modelCanNang)); }
public void Update(CanNang canNang) { _canNangRepository.Update(canNang); }
public CanNang Add(CanNang canNang) { return(_canNangRepository.Add(canNang)); }