Exemplo n.º 1
0
 public void CanLoginToUmbraco()
 {
     _backOffice = new BackOffice(WebSiteRoot, _browserType);
     _backOffice.Login(UserName, Password);
     //Assert.That(_backOffice.Selenium.Driver.Url,Is.EqualTo("https://dev.appstract.dk/umbraco#/umbraco"));
     Assert.Pass("Login passed");
 }
Exemplo n.º 2
0
        public void CanGetContentTree()
        {
            _backOffice = new BackOffice(WebSiteRoot, _browserType);
            _backOffice.Login(UserName, Password);
            var contentMenu = _backOffice.Sections.Section(Sections.SectionEnum.Content);

            contentMenu.Click();
            PrintAllNodes(contentMenu.ContentTree.GetNodeByTitle("DK").ContentTree);
        }
Exemplo n.º 3
0
        static void Main()
        {
            objhope = new Hope.Hope_m();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            BackOffice back = new BackOffice();

            back.ShowDialog();
        }
Exemplo n.º 4
0
        public void CanGetContentTreeRoot()
        {
            _backOffice = new BackOffice(WebSiteRoot, _browserType);
            _backOffice.Login(UserName, Password);
            var content = _backOffice.Sections.Section(Sections.SectionEnum.Content);

            foreach (var treeNode in content.ContentTree)
            {
                Console.WriteLine($"Root:{treeNode.Title} - {treeNode.ContentId}");
            }
        }
Exemplo n.º 5
0
 public void CanGetSections()
 {
     _backOffice = new Selenium.Umbraco.BackOffice(WebSiteRoot, _browserType);
     _backOffice.Login(UserName, Password);
     foreach (var section in _backOffice.Sections)
     {
         Console.WriteLine($"Section:{section.Title}");
         section.Click();
         //Thread.Sleep(1000);
     }
 }
Exemplo n.º 6
0
 public PointofSaleTest()
 {
     this.backOffice = new BackOffice();
     this.backOffice.CreateItem("A", 50, 50);
     this.backOffice.CreateItem("B", 30, 50);
     this.backOffice.CreateItem("C", 20, 50);
     this.backOffice.CreateItem("D", 15, 50);
     this.backOffice.CreatePromotion(new[] { "A" }, 130, 3);
     this.backOffice.CreatePromotion(new[] { "B" }, 45, 2);
     this.backOffice.CreatePromotion(new[] { "C", "D" }, 30, 1);
 }
Exemplo n.º 7
0
        private void SearchForDefault(FilterEditModel filters)
        {
            var backOffice = new BackOffice();

            foreach (Location location in backOffice.Locations)
            {
                if (filters.ZipCodes.Contains(location.ZipCode) && location.IsValid && (!filters.OnlyOpenBars || location.IsOpenNow))
                {
                    Locations.Add(location);
                }
            }
        }
 public List <Movimiento> ObtenerTodosMovimientos()
 {
     try
     {
         var bc = new BackOffice();
         return(bc.ObtenerTodosMovimientos());
     }
     catch (Exception ex)
     {
         throw new FaultException <ProcessExecutionFault>
                   (new ProcessExecutionFault(), ex.Message);
     }
 }
 public void ModificarMovimiento(Movimiento movimiento)
 {
     try
     {
         var bc = new BackOffice();
         bc.ModificarMovimiento(movimiento);
     }
     catch (Exception ex)
     {
         throw new FaultException <ProcessExecutionFault>
                   (new ProcessExecutionFault(), ex.Message);
     }
 }
 public List <Movimiento> ObtenerMovimientosPaginando(int pageNumber, int pageSize)
 {
     try
     {
         var bc = new BackOffice();
         return(bc.ObtenerMovimientosPaginando(pageNumber, pageSize));
     }
     catch (Exception ex)
     {
         throw new FaultException <ProcessExecutionFault>
                   (new ProcessExecutionFault(), ex.Message);
     }
 }
 public Movimiento ObtenerMovimientoXId(int idMovimiento)
 {
     try
     {
         var bc = new BackOffice();
         return(bc.ObtenerMovimientoXId(idMovimiento));
     }
     catch (Exception ex)
     {
         throw new FaultException <ProcessExecutionFault>
                   (new ProcessExecutionFault(), ex.Message);
     }
 }
 public Movimiento AgregarMovimiento(Movimiento movimiento)
 {
     try
     {
         var bc = new BackOffice();
         return(bc.AgregarMovimiento(movimiento));
     }
     catch (Exception ex)
     {
         throw new FaultException <ProcessExecutionFault>
                   (new ProcessExecutionFault(), ex.Message);
     }
 }
 public void AgregarFuente(FuenteWEB fuente)
 {
     try
     {
         var bc = new BackOffice();
         bc.AgregarFuente(fuente);
     }
     catch (Exception ex)
     {
         throw new FaultException <ProcessExecutionFault>
                   (new ProcessExecutionFault(), ex.Message);
     }
 }
Exemplo n.º 14
0
        public void CanClickOnContentTreeOptions()
        {
            _backOffice = new BackOffice(WebSiteRoot, _browserType);
            _backOffice.Login(UserName, Password);
            var content = _backOffice.Sections.Section(Sections.SectionEnum.Content);

            foreach (var treeNode in content.ContentTree)
            {
                Console.WriteLine($"Root:{treeNode.Title} - {treeNode.ContentId}");
                treeNode.Click();                 // tree node must be visible to be possible to click on its Options
                treeNode.Options.Click();
                Thread.Sleep(1000);
            }
        }
Exemplo n.º 15
0
        public void CanGetContentForm()
        {
            _backOffice = new BackOffice(WebSiteRoot, _browserType);
            _backOffice.Login(UserName, Password);
            var content = _backOffice.Sections.Section(Sections.SectionEnum.Content);

            content.Click();
            var form = content.ContentTree.GetNodeByTitle("DK").ContentForm;

            foreach (var tab in form.Tabs)
            {
                Console.WriteLine($"Tab:'{tab.Title}'");
            }
        }
        private async Task <DialogTurnResult> NotifyBackOfficeAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken)
        {
            var notificationOfIllnessDetails = (NotificationOfIllnessDetails)stepContext.Options;
            var backOffice       = new BackOffice(notificationOfIllnessDetails.TokenResponse);
            var backOfficeMember = backOffice.GetBackOfficeMember();
            var mailClient       = new ExchangeMailClient(notificationOfIllnessDetails.TokenResponse, m_ExchangeSettings);
            var message          = $"Dies ist eine automatisch generierte Nachricht. {notificationOfIllnessDetails.TokenResponse.GetNameClaim()?.Value} ist bis zum {notificationOfIllnessDetails.SickUntil.GetValueOrDefault():dd.MM.yyyy} krank und ist nicht im Büro.";;

            mailClient.SendMail(new[] { backOfficeMember.MailAddress }, "Krankmeldung", message);
            var msg = $"Ich habe {backOfficeMember.Name} vom Backoffice eine Mail ({backOfficeMember.MailAddress}) gesendet, daß Du bis zum {notificationOfIllnessDetails.SickUntil?.ToString("dd.MM.yyyy")} krank bist.";
            await stepContext.Context.SendActivityAsync(MessageFactory.Text(msg, msg, InputHints.IgnoringInput), cancellationToken);

            return(await stepContext.NextAsync(notificationOfIllnessDetails, cancellationToken));
        }
Exemplo n.º 17
0
        public void CanGetSiteMap()
        {
            var webSiteRoot = "http://lbf.dev.appstract.dk";
            var userName    = "******";
            var password    = "******";

            _backOffice = new BackOffice(webSiteRoot, _browserType);
            _backOffice.Login(userName, Password);
            var content = _backOffice.Sections.Section(Sections.SectionEnum.Content);

            foreach (var child in content.ContentTree.Where(node => node.Title != "Recycle Bin"))
            {
                PrintAllUrls(child.ContentTree);
            }
        }
Exemplo n.º 18
0
        private void buttonBackOffice_Click(object sender, RoutedEventArgs e)
        {
            PinCode    Pin = new PinCode();
            BackOffice BO  = new BackOffice();

            BO.mainWindow = this;
            Pin.MW        = this;
            this.Opacity  = 0.4;
            Pin.ShowDialog();
            if (Pin.IsValidUser)
            {
                this.Hide();
                BO.ShowDialog();
            }
        }
Exemplo n.º 19
0
        public void InsertarBackoffice(BackofficeInsVO bkvo)
        {
            var useless = System.Data.Entity.SqlServer.SqlProviderServices.Instance;

            BackOffice be = new BackOffice(bkvo);

            using (TiendaVirtualEntities db = new TiendaVirtualEntities())
            {
                int uid = (from user in db.Usuario
                           where user.UsuarioEmail == bkvo.Email
                           select user).First().UsuarioId;
                be.UsuarioId        = uid;
                be.RolId            = bkvo.RolId;
                be.BackOfficeNombre = bkvo.Nombre;
                db.BackOffice.Add(be);
                db.SaveChanges();
            }
        }
Exemplo n.º 20
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="admin"><code>Back Office</code> admin.</param>
 public BackOfficeAssistant(BackOffice admin)
 {
     this._admin     = admin;
     this._logger    = new N_Shared.Logger();
     this._validator = new N_Shared.Validator();
 }
Exemplo n.º 21
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="admin"><code>Back Office</code> object.</param>
 public SuperTool(BackOffice admin)
 {
     this._admin = admin;
 }
Exemplo n.º 22
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="admin"><code>Back Office</code> admin.</param>
 public SortBySurnameThenGivenNameAssistant(BackOffice admin)
     : base(admin)
 {
 }
Exemplo n.º 23
0
        void getStoreInfo()
        {
            //server side field validation totr ensure not too long or \
            //pw not over 25, greater than 5 characters, alphanumberic only letter and number plus
            string l_strEmail    = usernamefield.Text;
            string l_strPassword = passwordfield.Text;
            string l_strError    = "";

            errorLabel.Text = "";
            bool l_bValid = false;

            if (CyberpassReg.VerifyEmail(l_strEmail, out l_strError))
            {
                if (CyberpassReg.VerifyPassword(l_strPassword, out l_strError))
                {
                    l_bValid = true;
                }
            }
            if (l_bValid)
            {
                //login in the member. If they don't have a parent store, create one. Then save the ManageStore object to the session
                if (c_ManageStore.Login(usernamefield.Text, passwordfield.Text) == true)
                {
                    Session["UserNameField"] = usernamefield.Text;
                    Session["PasswordField"] = passwordfield.Text;

                    // Initialize the BrandBuilder object for use with the Subscription Plan code <CarlB 08-01-2018>
                    BackOffice l_BackOffice = new BackOffice("");
                    if (l_BackOffice.Login(Session["UserNameField"].ToString(), Session["PasswordField"].ToString()) == true)
                    {
                        Session["BackOffice"] = l_BackOffice.BrandBuilderInfo.Serialize();
                    }
                    else
                    {
                        Session["BackOffice"] = null;
                    }

                    c_Parents = c_ManageStore.StoreInfo.StoreInfoList;

                    if (c_Parents.Count > 0)
                    {
                        //It worked
                        if (c_Parents.Count > 1)
                        {
                            //they need to pick what parent they would like to manage
                            global.SaveManageStore(c_ManageStore.StoreInfo);
                        }
                        else
                        {
                            StoreInformationServer l_Parent = (CBQ.StoreInformationServer)c_Parents[0];

                            Session["parent"] = l_Parent.Serialize();

                            //might be a better place for this. This should be the only place this happens, but might want to put this out at global
                            //this really needs to pull from the database so we will do that instead, using parameterized queries of course
                            if (l_Parent.SalesAgentID == "palmetto01")
                            {
                                Session["partnerID"] = "1";
                                handleBrand();
                            }
                            else if (l_Parent.SalesAgentID == "ignite01")
                            {
                                Session["partnerID"] = "2";
                                handleBrand();
                            }
                            else if (l_Parent.SalesAgentID == "cbq")
                            {
                                Session["partnerID"] = "0";
                                handleBrand();
                            }
                            else if (l_Parent.SalesAgentID == "blackstone01")
                            {
                                Session["partnerID"] = "3";
                                handleBrand();
                            }
                            else if (l_Parent.SalesAgentID == "vantiv01")
                            {
                                Session["partnerID"] = "4";
                                handleBrand();
                            }
                            else if (l_Parent.SalesAgentID == "globalpayments01")
                            {
                                Session["partnerID"] = "5";
                                handleBrand();
                            }
                            else if (l_Parent.SalesAgentID == "usacard01")
                            {
                                Session["partnerID"] = "6";
                                handleBrand();
                            }

                            global.SaveManageStore(c_ManageStore.StoreInfo);
                        }
                    }
                    else
                    {
                        l_strError = "Your Login Is Correct But There Was An Error Generating Your Store. Please Contact Us.";
                        showError(l_strError);
                    }
                }
                else
                {
                    l_strError = "Your Login Information is Incorrect. Please Try Again.";
                    showError(l_strError);
                }
            }
            else
            {
                //display an error. message is in l_strError
                showError(l_strError);
            }
        }
Exemplo n.º 24
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="admin"><code>Back Office</code> admin.</param>
 public FileReaderAssistant(BackOffice admin)
     : base(admin)
 {
 }
Exemplo n.º 25
0
 private void button4_Click(object sender, RoutedEventArgs e)
 {
     BackOffice back = new BackOffice();
     back.Show();
     this.Close();
 }
Exemplo n.º 26
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="admin"><code>Back Office</code> object.</param>
 public ToNameListAssistant(BackOffice admin)
     : base(admin)
 {
 }
Exemplo n.º 27
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="admin"><code>Back Office</code> admin.</param>
 public FileInfoAssistant(BackOffice admin)
     : base(admin)
 {
 }