public override GestiuneBusiness.DataHelper.Kernel.PersistenceResult Save() { var result = new PersistenceResult(); try { if (this.ID == 0) { this.ID = PlatiDataHelper.GetInstance().Create(PropertiesNamesWithValues); if (plataList == null) { plataList = new List <Plata>(); } plataList.Add(this); } else { PlatiDataHelper.GetInstance().Update(PropertiesNamesWithValues, this.ID); } result.Message = StringSaveSuccess; result.Status = Enums.StatusEnum.Saved; } catch (Exception ex) { result.Message = StringSaveFail; result.Status = Enums.StatusEnum.Errors; result.ExceptionOccurred = ex; } return(result); }
public static List <Plata> GetAll() { try { if (plataList == null) { plataList = PlatiDataHelper.GetInstance().GetAll().Cast <Plata>().ToList(); } return(plataList); } catch (Exception) { return(null); } }