Beispiel #1
0
 public int AssignDTOFromEntity(ref Mugurtham.DTO.Profile.Raasi objDTORaasi, ref Mugurtham.Core.Raasi.RaasiCoreEntity objRaasiCoreEntity)
 {
     try
     {
         objDTORaasi.CreatedBy    = objRaasiCoreEntity.CreatedBy;
         objDTORaasi.Kattam1      = objRaasiCoreEntity.Kattam1;
         objDTORaasi.Kattam2      = objRaasiCoreEntity.Kattam2;
         objDTORaasi.Kattam3      = objRaasiCoreEntity.Kattam3;
         objDTORaasi.Kattam4      = objRaasiCoreEntity.Kattam4;
         objDTORaasi.Kattam5      = objRaasiCoreEntity.Kattam5;
         objDTORaasi.Kattam6      = objRaasiCoreEntity.Kattam6;
         objDTORaasi.Kattam7      = objRaasiCoreEntity.Kattam7;
         objDTORaasi.Kattam8      = objRaasiCoreEntity.Kattam8;
         objDTORaasi.Kattam9      = objRaasiCoreEntity.Kattam9;
         objDTORaasi.Kattam10     = objRaasiCoreEntity.Kattam10;
         objDTORaasi.Kattam11     = objRaasiCoreEntity.Kattam11;
         objDTORaasi.Kattam12     = objRaasiCoreEntity.Kattam12;
         objDTORaasi.CreatedDate  = DateTime.Now;
         objDTORaasi.ModifiedDate = DateTime.Now;
         objDTORaasi.ProfileID    = objRaasiCoreEntity.ProfileID;
     }
     catch (Exception objEx)
     {
         Helpers.LogExceptionInFlatFile(objEx);
     }
     return(0);
 }
Beispiel #2
0
        public RaasiCoreEntity GetByProfileID(string strProfileID)
        {
            RaasiCoreEntity objRaasiCoreEntity = new RaasiCoreEntity();

            try
            {
                Mugurtham.DTO.Profile.Raasi objRaasi = new Mugurtham.DTO.Profile.Raasi();
                IUnitOfWork objUOW = new UnitOfWork(_objLoggedInUser.ConnectionStringAppKey);
                using (objUOW as IDisposable)
                    objRaasi = objUOW.RepositoryRaasi.GetAll().ToList().Where(p => p.ProfileID.Trim().ToLower() == strProfileID.Trim().ToLower()).FirstOrDefault();
                objUOW = null;
                if (objRaasi != null)
                {
                    using (objRaasi as IDisposable)
                    {
                        AssignEntityFromDTO(ref objRaasi, ref objRaasiCoreEntity);
                    }
                }
                objRaasi = null;
            }
            catch (Exception objEx)
            {
                Helpers.LogExceptionInFlatFile(objEx);
            }
            return(objRaasiCoreEntity);
        }
Beispiel #3
0
        private HoroscopeCoreEntity GetByProfileID(string strProfileID)
        {
            HoroscopeCoreEntity objHoroscopeCoreEntity = new HoroscopeCoreEntity();

            Mugurtham.DTO.Profile.Raasi     objRaasi     = new Mugurtham.DTO.Profile.Raasi();
            Mugurtham.DTO.Profile.Amsam     objAmsam     = new Mugurtham.DTO.Profile.Amsam();
            Mugurtham.DTO.Profile.Horoscope objHoroscope = new Mugurtham.DTO.Profile.Horoscope();
            try
            {
                IUnitOfWork objUOW = new UnitOfWork(_objLoggedInUser.ConnectionStringAppKey);
                using (objUOW as IDisposable)
                {
                    objRaasi     = objUOW.RepositoryRaasi.GetAll().ToList().Where(p => p.ProfileID.Trim().ToLower() == strProfileID.Trim().ToLower()).FirstOrDefault();
                    objAmsam     = objUOW.RepositoryAmsam.GetAll().ToList().Where(p => p.ProfileID.Trim().ToLower() == strProfileID.Trim().ToLower()).FirstOrDefault();
                    objHoroscope = objUOW.RepositoryHoroscope.GetAll().ToList().Where(p => p.ProfileID.Trim().ToLower() == strProfileID.Trim().ToLower()).FirstOrDefault();
                }
                objUOW = null;
                //Getting Raasi Data
                if (objRaasi != null)
                {
                    using (objRaasi as IDisposable)
                    {
                        RaasiCoreEntity objRaasiCoreEntity = new RaasiCoreEntity();
                        using (objRaasiCoreEntity as IDisposable)
                        {
                            RaasiCore objRaasiCore = new RaasiCore(ref _objLoggedInUser);
                            using (objRaasiCore as IDisposable)
                                objRaasiCore.AssignEntityFromDTO(ref objRaasi, ref objRaasiCoreEntity);
                            objRaasiCore = null;
                        }
                        objHoroscopeCoreEntity.ProfileID     = objRaasiCoreEntity.ProfileID;
                        objHoroscopeCoreEntity.RaasiKattam1  = objRaasiCoreEntity.Kattam1;
                        objHoroscopeCoreEntity.RaasiKattam2  = objRaasiCoreEntity.Kattam2;
                        objHoroscopeCoreEntity.RaasiKattam3  = objRaasiCoreEntity.Kattam3;
                        objHoroscopeCoreEntity.RaasiKattam4  = objRaasiCoreEntity.Kattam4;
                        objHoroscopeCoreEntity.RaasiKattam5  = objRaasiCoreEntity.Kattam5;
                        objHoroscopeCoreEntity.RaasiKattam6  = objRaasiCoreEntity.Kattam6;
                        objHoroscopeCoreEntity.RaasiKattam7  = objRaasiCoreEntity.Kattam7;
                        objHoroscopeCoreEntity.RaasiKattam8  = objRaasiCoreEntity.Kattam8;
                        objHoroscopeCoreEntity.RaasiKattam9  = objRaasiCoreEntity.Kattam9;
                        objHoroscopeCoreEntity.RaasiKattam10 = objRaasiCoreEntity.Kattam10;
                        objHoroscopeCoreEntity.RaasiKattam11 = objRaasiCoreEntity.Kattam11;
                        objHoroscopeCoreEntity.RaasiKattam12 = objRaasiCoreEntity.Kattam12;
                        objRaasiCoreEntity = null;
                    }
                }
                objRaasi = null;
                // Getting Amsam Data
                if (objAmsam != null)
                {
                    using (objAmsam as IDisposable)
                    {
                        AmsamCoreEntity objAmsamCoreEntity = new AmsamCoreEntity();
                        using (objAmsamCoreEntity as IDisposable)
                        {
                            AmsamCore objAmsamCore = new AmsamCore(ref _objLoggedInUser);
                            using (objAmsamCore as IDisposable)
                                objAmsamCore.AssignEntityFromDTO(ref objAmsam, ref objAmsamCoreEntity);
                            objAmsamCore = null;
                        }
                        objHoroscopeCoreEntity.ProfileID     = objAmsamCoreEntity.ProfileID;
                        objHoroscopeCoreEntity.AmsamKattam1  = objAmsamCoreEntity.Kattam1;
                        objHoroscopeCoreEntity.AmsamKattam2  = objAmsamCoreEntity.Kattam2;
                        objHoroscopeCoreEntity.AmsamKattam3  = objAmsamCoreEntity.Kattam3;
                        objHoroscopeCoreEntity.AmsamKattam4  = objAmsamCoreEntity.Kattam4;
                        objHoroscopeCoreEntity.AmsamKattam5  = objAmsamCoreEntity.Kattam5;
                        objHoroscopeCoreEntity.AmsamKattam6  = objAmsamCoreEntity.Kattam6;
                        objHoroscopeCoreEntity.AmsamKattam7  = objAmsamCoreEntity.Kattam7;
                        objHoroscopeCoreEntity.AmsamKattam8  = objAmsamCoreEntity.Kattam8;
                        objHoroscopeCoreEntity.AmsamKattam9  = objAmsamCoreEntity.Kattam9;
                        objHoroscopeCoreEntity.AmsamKattam10 = objAmsamCoreEntity.Kattam10;
                        objHoroscopeCoreEntity.AmsamKattam11 = objAmsamCoreEntity.Kattam11;
                        objHoroscopeCoreEntity.AmsamKattam12 = objAmsamCoreEntity.Kattam12;
                        objAmsamCoreEntity = null;
                    }
                }
                objAmsam = null;

                objHoroscopeCoreEntity.DasaBalance = objHoroscope.DasaBalance;
                objHoroscopeCoreEntity.Year        = objHoroscope.Year;
                objHoroscopeCoreEntity.Month       = objHoroscope.Month;
                objHoroscopeCoreEntity.Day         = objHoroscope.Day;
                objHoroscopeCoreEntity.Path        = objHoroscope.Path;
            }
            catch (Exception objEx)
            {
                Helpers.LogExceptionInFlatFile(objEx);
            }
            finally
            {
                /*objHoroscopeCoreEntity = null;
                 * objRaasi = null;
                 * objAmsam = null;
                 * objHoroscope = null;*/
            }
            return(objHoroscopeCoreEntity);
        }
Beispiel #4
0
 public RaasiCoreEntity GetByProfileID(string strProfileID)
 {
     RaasiCoreEntity objRaasiCoreEntity = new RaasiCoreEntity();
     try
     {
         Mugurtham.DTO.Profile.Raasi objRaasi = new Mugurtham.DTO.Profile.Raasi();
         IUnitOfWork objUOW = new UnitOfWork();
         using (objUOW as IDisposable)
             objRaasi = objUOW.RepositoryRaasi.GetAll().ToList().Where(p => p.ProfileID.Trim().ToLower() == strProfileID.Trim().ToLower()).FirstOrDefault();
         objUOW = null;
         if (objRaasi != null)
         {
             using (objRaasi as IDisposable)
             {
                 AssignEntityFromDTO(ref objRaasi, ref objRaasiCoreEntity);
             }
         }
         objRaasi = null;
     }
     catch (Exception objEx)
     {
         Helpers.LogExceptionInFlatFile(objEx);
     }
     return objRaasiCoreEntity;
 }
Beispiel #5
0
        public HoroscopeCoreEntity GetByProfileID(string strProfileID)
        {
            HoroscopeCoreEntity objHoroscopeCoreEntity = new HoroscopeCoreEntity();
            Mugurtham.DTO.Profile.Raasi objRaasi = new Mugurtham.DTO.Profile.Raasi();
            Mugurtham.DTO.Profile.Amsam objAmsam = new Mugurtham.DTO.Profile.Amsam();
            Mugurtham.DTO.Profile.Horoscope objHoroscope = new Mugurtham.DTO.Profile.Horoscope();
            try
            {

                IUnitOfWork objUOW = new UnitOfWork();
                using (objUOW as IDisposable)
                {
                    objRaasi = objUOW.RepositoryRaasi.GetAll().ToList().Where(p => p.ProfileID.Trim().ToLower() == strProfileID.Trim().ToLower()).FirstOrDefault();
                    objAmsam = objUOW.RepositoryAmsam.GetAll().ToList().Where(p => p.ProfileID.Trim().ToLower() == strProfileID.Trim().ToLower()).FirstOrDefault();
                    objHoroscope = objUOW.RepositoryHoroscope.GetAll().ToList().Where(p => p.ProfileID.Trim().ToLower() == strProfileID.Trim().ToLower()).FirstOrDefault();
                }
                objUOW = null;
                //Getting Raasi Data
                if (objRaasi != null)
                {
                    using (objRaasi as IDisposable)
                    {
                        RaasiCoreEntity objRaasiCoreEntity = new RaasiCoreEntity();
                        using (objRaasiCoreEntity as IDisposable)
                        {
                            RaasiCore objRaasiCore = new RaasiCore();
                            using (objRaasiCore as IDisposable)
                                objRaasiCore.AssignEntityFromDTO(ref objRaasi, ref objRaasiCoreEntity);
                            objRaasiCore = null;
                        }
                        objHoroscopeCoreEntity.ProfileID = objRaasiCoreEntity.ProfileID;
                        objHoroscopeCoreEntity.RaasiKattam1 = objRaasiCoreEntity.Kattam1;
                        objHoroscopeCoreEntity.RaasiKattam2 = objRaasiCoreEntity.Kattam2;
                        objHoroscopeCoreEntity.RaasiKattam3 = objRaasiCoreEntity.Kattam3;
                        objHoroscopeCoreEntity.RaasiKattam4 = objRaasiCoreEntity.Kattam4;
                        objHoroscopeCoreEntity.RaasiKattam5 = objRaasiCoreEntity.Kattam5;
                        objHoroscopeCoreEntity.RaasiKattam6 = objRaasiCoreEntity.Kattam6;
                        objHoroscopeCoreEntity.RaasiKattam7 = objRaasiCoreEntity.Kattam7;
                        objHoroscopeCoreEntity.RaasiKattam8 = objRaasiCoreEntity.Kattam8;
                        objHoroscopeCoreEntity.RaasiKattam9 = objRaasiCoreEntity.Kattam9;
                        objHoroscopeCoreEntity.RaasiKattam10 = objRaasiCoreEntity.Kattam10;
                        objHoroscopeCoreEntity.RaasiKattam11 = objRaasiCoreEntity.Kattam11;
                        objHoroscopeCoreEntity.RaasiKattam12 = objRaasiCoreEntity.Kattam12;
                        objRaasiCoreEntity = null;
                    }
                }
                objRaasi = null;
                // Getting Amsam Data
                if (objAmsam != null)
                {
                    using (objAmsam as IDisposable)
                    {
                        AmsamCoreEntity objAmsamCoreEntity = new AmsamCoreEntity();
                        using (objAmsamCoreEntity as IDisposable)
                        {
                            AmsamCore objAmsamCore = new AmsamCore();
                            using (objAmsamCore as IDisposable)
                                objAmsamCore.AssignEntityFromDTO(ref objAmsam, ref objAmsamCoreEntity);
                            objAmsamCore = null;
                        }
                        objHoroscopeCoreEntity.ProfileID = objAmsamCoreEntity.ProfileID;
                        objHoroscopeCoreEntity.AmsamKattam1 = objAmsamCoreEntity.Kattam1;
                        objHoroscopeCoreEntity.AmsamKattam2 = objAmsamCoreEntity.Kattam2;
                        objHoroscopeCoreEntity.AmsamKattam3 = objAmsamCoreEntity.Kattam3;
                        objHoroscopeCoreEntity.AmsamKattam4 = objAmsamCoreEntity.Kattam4;
                        objHoroscopeCoreEntity.AmsamKattam5 = objAmsamCoreEntity.Kattam5;
                        objHoroscopeCoreEntity.AmsamKattam6 = objAmsamCoreEntity.Kattam6;
                        objHoroscopeCoreEntity.AmsamKattam7 = objAmsamCoreEntity.Kattam7;
                        objHoroscopeCoreEntity.AmsamKattam8 = objAmsamCoreEntity.Kattam8;
                        objHoroscopeCoreEntity.AmsamKattam9 = objAmsamCoreEntity.Kattam9;
                        objHoroscopeCoreEntity.AmsamKattam10 = objAmsamCoreEntity.Kattam10;
                        objHoroscopeCoreEntity.AmsamKattam11 = objAmsamCoreEntity.Kattam11;
                        objHoroscopeCoreEntity.AmsamKattam12 = objAmsamCoreEntity.Kattam12;
                        objAmsamCoreEntity = null;
                    }
                }
                objAmsam = null;

                objHoroscopeCoreEntity.DasaBalance = objHoroscope.DasaBalance;
                objHoroscopeCoreEntity.Year = objHoroscope.Year;
                objHoroscopeCoreEntity.Month = objHoroscope.Month;
                objHoroscopeCoreEntity.Day = objHoroscope.Day;
                objHoroscopeCoreEntity.Path = objHoroscope.Path;

            }
            catch (Exception objEx)
            {
                Helpers.LogExceptionInFlatFile(objEx);
            }
            finally
            {
                /*objHoroscopeCoreEntity = null;
                objRaasi = null;
                objAmsam = null;
                objHoroscope = null;*/
            }
            return objHoroscopeCoreEntity;
        }