コード例 #1
0
 public static EngineerModel ConvertfromEntity(Engineer inengineer)
 {
     EngineerModel engineer = null;
     try
     {
         engineer = new EngineerModel();
         engineer.engineerid = inengineer.engineerid;
         engineer.firstname = inengineer.firstname;
         engineer.lastname = inengineer.lastname;
         engineer.username = inengineer.username;
         engineer.password = inengineer.password;
         engineer.email = inengineer.email;
         log.Info("Engineer wurde konvertiert.");
     }
     catch (Exception exp)
     {
         log.Error("Engineer konnte nicht konvertiert werden.");
         throw new DalException("Engineer konnte nicht konvertiert werden.", exp);
     }
     return engineer;
 }
コード例 #2
0
        public static EngineerModel ConvertfromEntity(Engineer inengineer)
        {
            EngineerModel engineer = null;

            try
            {
                engineer            = new EngineerModel();
                engineer.engineerid = inengineer.engineerid;
                engineer.firstname  = inengineer.firstname;
                engineer.lastname   = inengineer.lastname;
                engineer.username   = inengineer.username;
                engineer.password   = inengineer.password;
                engineer.email      = inengineer.email;
                log.Info("Engineer wurde konvertiert.");
            }
            catch (Exception exp)
            {
                log.Error("Engineer konnte nicht konvertiert werden.");
                throw new DalException("Engineer konnte nicht konvertiert werden.", exp);
            }
            return(engineer);
        }
コード例 #3
0
 public static Engineer ConverttoEntity(EngineerModel inengineer)
 {
     Engineer engineer = null;
     try
     {
         EngineerRepository erepo = new EngineerRepository();
         engineer = new Engineer();
         engineer.firstname = inengineer.firstname;
         engineer.lastname = inengineer.lastname;
         engineer.username = inengineer.username;
         engineer.password = inengineer.password;
         engineer.engineerid = inengineer.engineerid;
         engineer.email = inengineer.email;
         log.Info("EngineerModel wurde konvertiert.");
     }
     catch (Exception exp)
     {
         log.Error("EngineerModel konnte nicht konvertiert werden.");
         throw new DalException("EngineerModel konnte nicht konvertiert werden.", exp);
     }
     return engineer;
 }
コード例 #4
0
        public static Engineer ConverttoEntity(EngineerModel inengineer)
        {
            Engineer engineer = null;

            try
            {
                EngineerRepository erepo = new EngineerRepository();
                engineer            = new Engineer();
                engineer.firstname  = inengineer.firstname;
                engineer.lastname   = inengineer.lastname;
                engineer.username   = inengineer.username;
                engineer.password   = inengineer.password;
                engineer.engineerid = inengineer.engineerid;
                engineer.email      = inengineer.email;
                log.Info("EngineerModel wurde konvertiert.");
            }
            catch (Exception exp)
            {
                log.Error("EngineerModel konnte nicht konvertiert werden.");
                throw new DalException("EngineerModel konnte nicht konvertiert werden.", exp);
            }
            return(engineer);
        }