public int Add(string ProfileID) { int status = -1; try { IUnitOfWork objIUnitOfWork = new UnitOfWork(_objLoggedInUser.ConnectionStringAppKey); using (objIUnitOfWork as IDisposable) { Mugurtham.DTO.Profile.Horoscope objDTOHoroscope = new DTO.Profile.Horoscope(); using (objDTOHoroscope as IDisposable) { objDTOHoroscope.ProfileID = ProfileID; } objIUnitOfWork.RepositoryHoroscope.Add(objDTOHoroscope); objIUnitOfWork.commit(); objDTOHoroscope = null; } objIUnitOfWork = null; status = 0; } catch (Exception objEx) { Helpers.LogExceptionInFlatFile(objEx); status = -1; } return(status); }
public int updateHoroscope(ref HoroscopeCoreEntity objHoroscopeCoreEntity) { int status = -1; try { Mugurtham.DTO.Profile.Horoscope objDTOHoroscope = new DTO.Profile.Horoscope(); using (objDTOHoroscope as IDisposable) { IUnitOfWork objIUnitOfWork = new UnitOfWork(_objLoggedInUser.ConnectionStringAppKey); using (objIUnitOfWork as IDisposable) { objDTOHoroscope.ProfileID = objHoroscopeCoreEntity.ProfileID; objDTOHoroscope.Path = objHoroscopeCoreEntity.Path; objDTOHoroscope.DasaBalance = objHoroscopeCoreEntity.DasaBalance; objDTOHoroscope.Year = objHoroscopeCoreEntity.Year; objDTOHoroscope.Month = objHoroscopeCoreEntity.Month; objDTOHoroscope.Day = objHoroscopeCoreEntity.Day; objDTOHoroscope.ModifiedBy = ""; // Fill the modifier objIUnitOfWork.RepositoryHoroscope.Edit(objDTOHoroscope); objIUnitOfWork.commit(); objIUnitOfWork = null; } objDTOHoroscope = null; status = 0; } } catch (Exception objEx) { Helpers.LogExceptionInFlatFile(objEx); status = -1; } return(status); }
public int Add(string ProfileID) { int status = -1; try { IUnitOfWork objIUnitOfWork = new UnitOfWork(); using (objIUnitOfWork as IDisposable) { Mugurtham.DTO.Profile.Horoscope objDTOHoroscope = new DTO.Profile.Horoscope(); using (objDTOHoroscope as IDisposable) { objDTOHoroscope.ProfileID = ProfileID; } objIUnitOfWork.RepositoryHoroscope.Add(objDTOHoroscope); objIUnitOfWork.commit(); objDTOHoroscope = null; } objIUnitOfWork = null; status = 0; } catch (Exception objEx) { Helpers.LogExceptionInFlatFile(objEx); status = -1; } return status; }
public int updateHoroscope(ref HoroscopeCoreEntity objHoroscopeCoreEntity) { int status = -1; try { Mugurtham.DTO.Profile.Horoscope objDTOHoroscope = new DTO.Profile.Horoscope(); using (objDTOHoroscope as IDisposable) { IUnitOfWork objIUnitOfWork = new UnitOfWork(); using (objIUnitOfWork as IDisposable) { objDTOHoroscope.ProfileID = objHoroscopeCoreEntity.ProfileID; objDTOHoroscope.Path = objHoroscopeCoreEntity.Path; objDTOHoroscope.DasaBalance = objHoroscopeCoreEntity.DasaBalance; objDTOHoroscope.Year = objHoroscopeCoreEntity.Year; objDTOHoroscope.Month = objHoroscopeCoreEntity.Month; objDTOHoroscope.Day = objHoroscopeCoreEntity.Day; objDTOHoroscope.ModifiedBy = ""; // Fill the modifier objIUnitOfWork.RepositoryHoroscope.Edit(objDTOHoroscope); objIUnitOfWork.commit(); objIUnitOfWork = null; } objDTOHoroscope = null; status = 0; } } catch (Exception objEx) { Helpers.LogExceptionInFlatFile(objEx); status = -1; } return status; }