Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     string ID = Request.QueryString["ReservationId"];
     var res = new Reservation(new Guid(ID));
     var sms = new Service1();
     var smsAntwort = sms.sendSMS(res.Mobile, "Lieber Gast, leider koennen wir Ihren Reservierungswunsch nicht bestaetigen. Bitte rufen Sie uns unter  089 54726690  an. Ihr Loewenbraeukeller Team          ");
     if (smsAntwort == "OK")
         res.SetDeclining(new Guid(ID));
     Response.Redirect("default.aspx");
 }
Ejemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     var id = Request.QueryString["ReservationId"];
     var res = new Reservation(new Guid(id));
     var sms = new Service1();
     var smsAntwort = sms.sendSMS(res.Mobile, "Lieber Gast, Ihr Loewenbraeu-Code lautet:  " + res.ConfirmCode + "  !! Erst wenn Sie diesen Code in Ihre APP eingeben ist die Reservierung verbindlich. Ihr Loewenbraeukeller Team");
     if (smsAntwort == "OK")
         res.SetConfirmation(new Guid(id));
     Response.Redirect("default.aspx");
                         
 }
Ejemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var resListStatus1 = new Reservation(new Guid()).GetReservationsByStatus(1);
            this.GridViewReservationList1.DataSource = resListStatus1;
            this.GridViewReservationList1.DataBind();

            var resListStatus2 = new Reservation(new Guid()).GetReservationsByStatus(2);
            this.GridViewReservationList2.DataSource = resListStatus2;
            this.GridViewReservationList2.DataBind();

            var resListStatus3 = new Reservation(new Guid()).GetReservationsByStatus(3);
            this.GridViewReservationList3.DataSource = resListStatus3;
            this.GridViewReservationList3.DataBind();        
        }
Ejemplo n.º 4
0
 public List<Reservation> GetReservationsByStatus(int status) 
 {
     var tmpErgebnis = new Reservation();
     var ergebnis = tmpErgebnis.GetReservationsByStatus(status);
     return ergebnis;
 }
Ejemplo n.º 5
0
 public Boolean SetDeclining(Guid reservationId)
 {
     var ergebnis = new Reservation().SetDeclining(reservationId);
     return ergebnis == reservationId;
 }
Ejemplo n.º 6
0
 public Boolean SetReservationConfirmCustomer(Guid reservationId)
 {
     var ergebnis = new Reservation().SetConfirmationCustomer(reservationId);
     return ergebnis == reservationId;
 }
Ejemplo n.º 7
0
 public Guid CreateReservationByObject(Reservation tmpReservation)
 {
     tmpReservation.Add();
     return tmpReservation.ReservationId;
 }
Ejemplo n.º 8
0
 public Reservation GetReservationById(Guid reservationId)
 {
     var ergebnis = new Reservation(reservationId);
     return ergebnis;
 }
Ejemplo n.º 9
0
 public Boolean IsDeclinedByRestaurant(Guid reservationId)
 {
     var ergebnis = new Reservation(reservationId);
     return (ergebnis.Status == StatusArt.DeclinedByRestaurant);
 }
Ejemplo n.º 10
0
        public Guid SetDeclining(Guid reservationId)
        {
            var connectionString = ConfigurationManager.ConnectionStrings["lbkmobile_ConnectionString"].ConnectionString;
            var objConn = new SqlConnection(connectionString);
            try
            {
                objConn.Open();

                var strSql = @"update Reservation set status=4 where ReservationId='" + reservationId + "'";
                var myCommand = new SqlCommand(strSql, objConn);
                myCommand.ExecuteNonQuery();
                objConn.Close();
            }
            catch (Exception ex)
            {
                Logger.Append("SetDeclining: " + ex.Message, Logger.ERROR);
                objConn.Close();
            }

            var ergebnis = new Reservation(reservationId);
            return ergebnis._guidReservationId;
        }
Ejemplo n.º 11
0
        public Guid SetConfirmationCustomer(Guid reservationId)
        {
            var connectionString = ConfigurationManager.ConnectionStrings["lbkmobile_ConnectionString"].ConnectionString;
            var objConn = new SqlConnection(connectionString);
            try
            {
                objConn.Open();
                var strSql = @"update Reservation set status=3 where ReservationId='" + reservationId + "'";
                var myCommand = new SqlCommand(strSql, objConn);
                myCommand.ExecuteNonQuery();
                objConn.Close();
            }
            catch (Exception ex)
            {
                Logger.Append("SetConfirmationCustomer: " + ex.Message, Logger.ERROR);
                objConn.Close();
            }

            var ergebnis = new Reservation(reservationId);
            var sms = new Service1();
            var smstext = "Lieber Gast, wir haben fuer Sie " + ergebnis.Seats.ToString(CultureInfo.InvariantCulture) +
                          " Plaetze fuer den " + ergebnis.ReservationTime.ToString("dd.MM.yyyy") + " um " +
                          ergebnis.ReservationTime.ToString("HH:mm") + " reserviert. Ihr Loewenbraeukeller Team";
            smstext = smstext.PadRight(160, ' ');
            var smsAntwort = sms.sendSMS(ergebnis.Mobile, smstext);
            return ergebnis._guidReservationId;
        }