public override PersistenceResult Save()
        {
            PersistenceResult persistenceResult = new PersistenceResult();

            try
            {
                if (this.ID == 0)
                {
                    this.ID = PozitiiFacturiIntrareDataHelper.GetInstance().Create(PropertiesNamesWithValues);
                    if (pozitieFacturaIntrareList == null)
                    {
                        pozitieFacturaIntrareList = new List <PozitieFacturaIntrare>();
                    }
                    pozitieFacturaIntrareList.Add(this);
                }
                else
                {
                    PozitiiFacturiIntrareDataHelper.GetInstance().Update(PropertiesNamesWithValues, this.ID);
                }
                persistenceResult.Message = StringSaveSuccess;
                persistenceResult.Status  = Enums.StatusEnum.Saved;
            }
            catch (Exception ex)
            {
                persistenceResult.Message           = StringSaveFail;
                persistenceResult.Status            = Enums.StatusEnum.Errors;
                persistenceResult.ExceptionOccurred = ex;
            }
            return(persistenceResult);
        }
 public static List <PozitieFacturaIntrare> GetAll()
 {
     try
     {
         if (pozitieFacturaIntrareList == null)
         {
             pozitieFacturaIntrareList = PozitiiFacturiIntrareDataHelper.GetInstance().GetAll().Cast <PozitieFacturaIntrare>().ToList();
         }
         return(pozitieFacturaIntrareList);
     }
     catch (Exception)
     {
         return(null);
     }
 }