Exemplo n.º 1
0
 public Beurt(int id,DateTime datumtijdbegin, DateTime datumtijdEind, string beschrijving, int tramID, EnumTypeBeurt type)
 {
     this.ID = id;
     this.DatumTijdBegin = datumtijdbegin;
     this.DatumTijdEind = datumtijdEind;
     this.Beschrijving = beschrijving;
     this.TramID = tramID;
     this.Type = type;
 }
Exemplo n.º 2
0
 public bool NieuweBeurt(DateTime datumtijdBegin, DateTime datumtijdEind,string beschrijving, Tram tram, EnumTypeBeurt type)
 {
     return db.NieuweBeurt(tram.TramID, datumtijdBegin, datumtijdEind, beschrijving, type);
 }
Exemplo n.º 3
0
        public bool NieuweBeurt(int tramID, DateTime datumtijdBegin, DateTime datumtijdEind, string beschrijving, EnumTypeBeurt typeBeurt)
        {
            var cmds = new OracleCommand("MAAKRESERVERING", conn);
             cmds.CommandType = CommandType.StoredProcedure;

             cmds.Parameters.Add("p_tramID", OracleType.Number).Value = tramID;
             cmds.Parameters.Add("p_datum_begin", OracleType.DateTime).Value = datumtijdBegin;
             cmds.Parameters.Add("p_datum_eind", OracleType.DateTime).Value = datumtijdEind;
             cmds.Parameters.Add("p_beschrijving", OracleType.VarChar).Value = beschrijving;
             cmds.Parameters.Add("p_type_beurt", OracleType.VarChar).Value = datumtijdBegin;

             cmds.Parameters.Add("p_geslaagd_out", OracleType.Number, 1);
             cmds.Parameters["p_geslaagd_out"].Direction = ParameterDirection.Output;

             OpenVerbinding();

             using (var da = new OracleDataAdapter(cmds))
             {
                 cmds.ExecuteNonQuery();
             }

             //VERBINDING SLUITEN
             conn.Close();
             cmds.Dispose();

             //RETURN VALUE
             if (cmds.Parameters["p_geslaagd_out"].Value.ToString() == "1")
             {
                 return true;
             }
             else
             {
                 return false;
             }
        }