Ejemplo n.º 1
0
        public async Task <IActionResult> Create([Bind(properties)] RateView c)
        {
            await validateId(c.ID, ModelState);

            if (!ModelState.IsValid)
            {
                return(View(c));
            }
            var o = RateFactory.Create(c.CurrencyID, c.Rate, c.ValidFrom, c.RateTypeID);
            await repository.AddObject(o);

            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Edit([Bind(properties)] RateView c)
        {
            if (!ModelState.IsValid)
            {
                return(View(c));
            }
            var o = await repository.GetObject(c.ID);

            o.Data.Rate       = c.Rate;
            o.Data.RateTypeID = c.RateTypeID;
            o.Data.ValidFrom  = c.ValidFrom ?? DateTime.MinValue;
            o.Data.ValidTo    = c.ValidTo ?? DateTime.MaxValue;
            await repository.UpdateObject(o);

            return(RedirectToAction("Index"));
        }
        // Metodos

        // Metodo que dado un objeto ChatbotController permite abrir la ventana de rate.
        // Entrada : Objeto ChatbotController
        // Salida : Vacia.
        public void openRateView(ChatbotController cbot, string aux, TextBox chat)
        {
            if (aux.Equals("AVISO : Debe iniciar una conversacion con BeginDialog y un seed (0 o 1).\r\n"))
            {
            }
            else
            {
                Application.DoEvents();
                Thread.Sleep(2500);
                chat.Text += "AVISO : Abriendo ventada de Rate...\r\n";
                Application.DoEvents();
                Thread.Sleep(2500);
                chatbot  = cbot;
                rateView = new RateView(this, cbot);
                rateView.ShowDialog();
            }
        }
Ejemplo n.º 4
0
 public int Update(RateView item)
 {
     throw new NotImplementedException();
 }
        void ReleaseDesignerOutlets()
        {
            if (EmailLabel != null)
            {
                EmailLabel.Dispose();
                EmailLabel = null;
            }

            if (WorkspaceLabel != null)
            {
                WorkspaceLabel.Dispose();
                WorkspaceLabel = null;
            }

            if (PlanLabel != null)
            {
                PlanLabel.Dispose();
                PlanLabel = null;
            }

            if (TwentyFourHourClockSwitch != null)
            {
                TwentyFourHourClockSwitch.Dispose();
                TwentyFourHourClockSwitch = null;
            }

            if (AddMobileTagSwitch != null)
            {
                AddMobileTagSwitch.Dispose();
                AddMobileTagSwitch = null;
            }

            if (FeedbackView != null)
            {
                FeedbackView.Dispose();
                FeedbackView = null;
            }

            if (RateView != null)
            {
                RateView.Dispose();
                RateView = null;
            }

            if (UpdateView != null)
            {
                UpdateView.Dispose();
                UpdateView = null;
            }

            if (HelpView != null)
            {
                HelpView.Dispose();
                HelpView = null;
            }

            if (VersionLabel != null)
            {
                VersionLabel.Dispose();
                VersionLabel = null;
            }

            if (AddMobileTagView != null)
            {
                AddMobileTagView.Dispose();
                AddMobileTagView = null;
            }

            if (TwentyFourHourClockView != null)
            {
                TwentyFourHourClockView.Dispose();
                TwentyFourHourClockView = null;
            }

            if (SubscriptionView != null)
            {
                SubscriptionView.Dispose();
                SubscriptionView = null;
            }

            if (WorkspaceView != null)
            {
                WorkspaceView.Dispose();
                WorkspaceView = null;
            }

            if (EmailView != null)
            {
                EmailView.Dispose();
                EmailView = null;
            }

            if (LoggingOutIndicator != null)
            {
                LoggingOutIndicator.Dispose();
                LoggingOutIndicator = null;
            }

            if (LoggingOutLabel != null)
            {
                LoggingOutLabel.Dispose();
                LoggingOutLabel = null;
            }

            if (LoggingOutView != null)
            {
                LoggingOutView.Dispose();
                LoggingOutView = null;
            }

            if (LogoutButton != null)
            {
                LogoutButton.Dispose();
                LogoutButton = null;
            }

            if (SyncedIcon != null)
            {
                SyncedIcon.Dispose();
                SyncedIcon = null;
            }

            if (SyncedLabel != null)
            {
                SyncedLabel.Dispose();
                SyncedLabel = null;
            }

            if (SyncedView != null)
            {
                SyncedView.Dispose();
                SyncedView = null;
            }

            if (SyncingIndicator != null)
            {
                SyncingIndicator.Dispose();
                SyncingIndicator = null;
            }

            if (SyncingLabel != null)
            {
                SyncingLabel.Dispose();
                SyncingLabel = null;
            }

            if (SyncingView != null)
            {
                SyncingView.Dispose();
                SyncingView = null;
            }
        }