예제 #1
0
 public void Insert(DbTransaction transaction, PCMSOXSetor ObjPCMSOXSetor, int idPCMSO)
 {
     try
     {
         Database  db      = DatabaseFactory.CreateDatabase();
         DbCommand command = db.GetStoredProcCommand("PCMSOXSetorInsert");
         //Dados
         db.AddInParameter(command, "@idPCMSO", DbType.Int32, idPCMSO);
         db.AddInParameter(command, "@idSetor", DbType.Int32, ObjPCMSOXSetor.idSetor);
         db.AddInParameter(command, "@idCargo", DbType.Int32, ObjPCMSOXSetor.idCargo);
         ////Executa a proc que esta em transação e salva as informacoes dos procedimentos solicitados
         db.ExecuteNonQuery(command, transaction);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
예제 #2
0
 public void Insert(DbTransaction transaction,PCMSOXSetor ObjPCMSOXSetor,int idPCMSO)
 {
     try
     {
         Database db = DatabaseFactory.CreateDatabase();
         DbCommand command = db.GetStoredProcCommand("PCMSOXSetorInsert");
         //Dados
         db.AddInParameter(command, "@idPCMSO", DbType.Int32, idPCMSO);
         db.AddInParameter(command, "@idSetor", DbType.Int32, ObjPCMSOXSetor.idSetor);
         db.AddInParameter(command, "@idCargo", DbType.Int32, ObjPCMSOXSetor.idCargo);
         ////Executa a proc que esta em transação e salva as informacoes dos procedimentos solicitados
         db.ExecuteNonQuery(command, transaction);
     }
     catch (Exception e)
     {
         throw e;
     }
 }