Example #1
0
 public int Update(CompanyML Company)
 {
     try
     {
         ModelDAL ModelDAL = new ModelDAL();
         ModelDAL.UpdateModel(Company, TableName, IdUserSession, ConnectionString);
         return(Company.Id);
     }
     catch (Exception ex)
     {
         throw new Exception(String.Format("{0}.update: {1}", core, ex));
     }
 }
 public int Update(MigrationHistoryML MigrationHistory)
 {
     try
     {
         ModelDAL      ModelDAL = new ModelDAL();
         String        Response = ModelDAL.UpdateModel(MigrationHistory, TableName, IdUserSession);
         SqlConnection Conexion = new SqlConnection()
         {
             ConnectionString = ConnectionString
         };
         Conexion.Open();
         SqlCommand cmd2 = new SqlCommand(Response.ToString(), Conexion);
         cmd2.ExecuteNonQuery();
         return(MigrationHistory.Id);
     }
     catch (Exception ex)
     {
         throw new Exception(String.Format("{0}.update: {1}", core, ex));
     }
 }
 public int Update(AbsenteeismAssignmentML Absenteeismassignment)
 {
     try
     {
         ModelDAL      ModelDAL = new ModelDAL();
         String        Response = ModelDAL.UpdateModel(Absenteeismassignment, TableName, IdUserSession);
         SqlConnection Conexion = new SqlConnection()
         {
             ConnectionString = ConnectionString
         };
         Conexion.Open();
         SqlCommand cmd2 = new SqlCommand(Response.ToString(), Conexion);
         cmd2.ExecuteNonQuery();
         Conexion.Close();
         return(Absenteeismassignment.Id);
     }
     catch (Exception ex)
     {
         throw new Exception(String.Format("{0}.update: {1}", core, ex));
     }
 }
        public int Update(DaysOfWorkEmployeeML DaysOfWorkEmployee)
        {
            try
            {
                ModelDAL      ModelDAL = new ModelDAL();
                String        Response = ModelDAL.UpdateModel(DaysOfWorkEmployee, TableName, IdUserSession);
                SqlConnection Conexion = new SqlConnection()
                {
                    ConnectionString = ConnectionString
                };
                Conexion.Open();
                SqlCommand cmd2 = new SqlCommand(Response.ToString(), Conexion);
                cmd2.ExecuteNonQuery();
                Conexion.Close();

                return(DaysOfWorkEmployee.Id);
            }
            catch (Exception ex)
            {
                throw new Exception(String.Format("{0}.update: {1}", core, ex));
            }
        }