public CateBed Get(int key) { using (GiuongProvider giuongprovider = new GiuongProvider()) { return(giuongprovider.Get(key)); } }
public CoreResult Get() { using (GiuongProvider giuongprovider = new GiuongProvider()) { var entity = giuongprovider.Get(this.BedID); if (entity != null) { #region Assign value this.BedID = entity.BedID; this.BedCode = entity.BedCode; this.BedName = entity.BedName; this.PersonNumberMax = entity.PersonNumberMax; this.Discription = entity.Discription; this.DepartmentsID = entity.DepartmentsID; this.isActivity = entity.isActivity; #endregion return(giuongprovider.GetResultFromStatusCode(CoreStatusCode.OK, ActionType.Get)); } else { return(giuongprovider.GetResultFromStatusCode(CoreStatusCode.Failed, ActionType.Get)); } } }