Exemple #1
0
        private void CreateUserNameField(HtmlGenericControl container)
        {
            using (HtmlGenericControl field = HtmlControlHelper.GetField())
            {
                using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.Username, "UserNameInputText"))
                {
                    field.Controls.Add(label);
                }
                using (HtmlGenericControl iconInput = HtmlControlHelper.GetLeftIconInput())
                {
                    using (HtmlInputText userNameInputText = new HtmlInputText())
                    {
                        userNameInputText.ID = "UserNameInputText";
                        userNameInputText.Attributes.Add("readonly", "readonly");
                        userNameInputText.Value = AppUsers.GetCurrent().View.UserName;

                        iconInput.Controls.Add(userNameInputText);
                    }

                    using (HtmlGenericControl icon = HtmlControlHelper.GetIcon("user icon"))
                    {
                        iconInput.Controls.Add(icon);
                    }

                    field.Controls.Add(iconInput);
                }

                container.Controls.Add(field);
            }
        }
Exemple #2
0
        private void CreateNewPasswordField(HtmlGenericControl container)
        {
            using (HtmlGenericControl field = HtmlControlHelper.GetField())
            {
                using (
                    HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.NewPassword, "NewPasswordInputPassword")
                    )
                {
                    field.Controls.Add(label);
                }
                using (HtmlGenericControl iconInput = HtmlControlHelper.GetLeftIconInput())
                {
                    this.newPasswordInputPassword    = new HtmlInputPassword();
                    this.newPasswordInputPassword.ID = "NewPasswordInputPassword";

                    iconInput.Controls.Add(this.newPasswordInputPassword);

                    using (HtmlGenericControl icon = HtmlControlHelper.GetIcon("key icon"))
                    {
                        iconInput.Controls.Add(icon);
                    }

                    field.Controls.Add(iconInput);
                }

                container.Controls.Add(field);
            }
        }
Exemple #3
0
        private void CreateWidget(Control container)
        {
            using (HtmlGenericControl widget = new HtmlGenericControl("div"))
            {
                widget.ID = "OfficeInformationWidget";
                widget.Attributes.Add("class", "four wide column widget");


                using (HtmlGenericControl segment = HtmlControlHelper.GetSegment("ui attached segment"))
                {
                    using (HtmlGenericControl leftFloatedColumn = new HtmlGenericControl("div"))
                    {
                        leftFloatedColumn.Attributes.Add("class", "ui left floated column");
                        this.CreateHeader(leftFloatedColumn);
                        segment.Controls.Add(leftFloatedColumn);
                    }

                    using (HtmlGenericControl rightFloatedColumn = new HtmlGenericControl("div"))
                    {
                        rightFloatedColumn.Attributes.Add("class", "ui right floated column");


                        using (HtmlGenericControl i = HtmlControlHelper.GetIcon("expand disabled icon"))
                        {
                            rightFloatedColumn.Controls.Add(i);
                        }
                        using (HtmlGenericControl i = HtmlControlHelper.GetIcon("move icon"))
                        {
                            rightFloatedColumn.Controls.Add(i);
                        }
                        using (HtmlGenericControl i = HtmlControlHelper.GetIcon("help icon"))
                        {
                            rightFloatedColumn.Controls.Add(i);
                        }
                        using (HtmlGenericControl i = HtmlControlHelper.GetIcon("close icon"))
                        {
                            rightFloatedColumn.Controls.Add(i);
                        }

                        segment.Controls.Add(rightFloatedColumn);
                    }

                    widget.Controls.Add(segment);
                }

                using (HtmlGenericControl segment = HtmlControlHelper.GetSegment("ui attached segment"))
                {
                    this.CreateContent(segment);

                    widget.Controls.Add(segment);
                }

                container.Controls.Add(widget);
            }
        }
Exemple #4
0
        private void AddGoBottomAnchor(Panel p)
        {
            this.goBottomAnchor = new HtmlAnchor();
            this.goBottomAnchor.Attributes.Add("class", this.GetImageButtonCssClass());
            this.goBottomAnchor.ID = "GoBottom";
            this.goBottomAnchor.Attributes.Add("onclick", "window.scrollTo(0,document.body.scrollHeight);");
            this.goBottomAnchor.Title = Titles.GoToBottom;

            using (HtmlGenericControl i = HtmlControlHelper.GetIcon("fa fa-arrow-down"))
            {
                this.goBottomAnchor.Controls.Add(i);
            }

            p.Controls.Add(this.goBottomAnchor);
        }
Exemple #5
0
        private void AddPrintAnchor(Panel p)
        {
            this.printAnchor    = new HtmlAnchor();
            this.printAnchor.ID = "PrintImageButton";
            this.printAnchor.Attributes.Add("class", this.GetImageButtonCssClass());
            this.printAnchor.Attributes.Add("onclick", "javascript:window.print();");
            this.printAnchor.Title = Titles.Print;

            using (HtmlGenericControl i = HtmlControlHelper.GetIcon("fa fa-print"))
            {
                this.printAnchor.Controls.Add(i);
            }

            p.Controls.Add(this.printAnchor);
        }
Exemple #6
0
        private void AddGoTopAnchor(Panel p)
        {
            this.goTopAnchor    = new HtmlAnchor();
            this.goTopAnchor.ID = "GoTop";
            this.goTopAnchor.Attributes.Add("class", this.GetImageButtonCssClass());
            this.goTopAnchor.Attributes.Add("onclick", "window.scrollTo(0, 0);");
            this.goTopAnchor.Title = Titles.GoToTop;

            using (HtmlGenericControl i = HtmlControlHelper.GetIcon("fa fa-arrow-up"))
            {
                this.goTopAnchor.Controls.Add(i);
            }


            p.Controls.Add(this.goTopAnchor);
        }
Exemple #7
0
        private void AddCloseAnchor(Panel p)
        {
            this.closeImageButton = new HtmlAnchor();
            this.closeImageButton.Attributes.Add("class", this.GetImageButtonCssClass());
            this.closeImageButton.ID = "CloseImageButton";
            this.closeImageButton.Attributes.Add("onclick", "closeWindow();");

            this.closeImageButton.Title = Titles.Close;


            using (HtmlGenericControl i = HtmlControlHelper.GetIcon("fa fa-close"))
            {
                this.closeImageButton.Controls.Add(i);
            }

            p.Controls.Add(this.closeImageButton);
        }
Exemple #8
0
        private void AddFilterAnchor(Panel p)
        {
            this.filterAnchor    = new HtmlAnchor();
            this.filterAnchor.ID = "FilterImageButton";
            this.filterAnchor.Attributes.Add("class", this.GetImageButtonCssClass());
            this.filterAnchor.Attributes.Add("onclick", "$('.report-parameter').toggle(500);return false;");

            this.filterAnchor.Title = Titles.Filter;


            using (HtmlGenericControl i = HtmlControlHelper.GetIcon("fa fa-filter"))
            {
                this.filterAnchor.Controls.Add(i);
            }

            p.Controls.Add(this.filterAnchor);
        }
        private void CreateReconcileModal(Control container)
        {
            using (HtmlGenericControl modal = HtmlControlHelper.GetModal("ui small modal", "ReconcileModal"))
            {
                using (HtmlGenericControl closeIcon = HtmlControlHelper.GetIcon("close icon"))
                {
                    modal.Controls.Add(closeIcon);
                }

                using (HtmlGenericControl header = HtmlControlHelper.GetModalHeader(Titles.Reconcile, "circle notched icon"))
                {
                    modal.Controls.Add(header);
                }

                this.CreateModalContent(modal);

                container.Controls.Add(modal);
            }
        }
Exemple #10
0
        private HtmlGenericControl GetExportItem(string text, string icon, string onclick)
        {
            using (HtmlGenericControl item = new HtmlGenericControl("a"))
            {
                item.Attributes.Add("class", "item");

                using (HtmlGenericControl i = HtmlControlHelper.GetIcon(icon))
                {
                    item.Controls.Add(i);
                }

                using (Literal literal = new Literal())
                {
                    literal.Text = text;
                    item.Controls.Add(literal);
                }

                item.Attributes.Add("onclick", onclick);

                return(item);
            }
        }
Exemple #11
0
        private void CreateWidget(Control container)
        {
            using (HtmlGenericControl widget = new HtmlGenericControl("div"))
            {
                widget.ID = "SalesByGeographyWidget";
                widget.Attributes.Add("class", "sixteen wide column widget");

                using (HtmlGenericControl segment = new HtmlGenericControl("div"))
                {
                    segment.Attributes.Add("class", "ui attached segment");

                    using (HtmlGenericControl leftFloatedColumn = new HtmlGenericControl("div"))
                    {
                        leftFloatedColumn.Attributes.Add("class", "ui left floated column");

                        using (HtmlGenericControl header = new HtmlGenericControl("div"))
                        {
                            header.Attributes.Add("class", "ui header");
                            header.InnerText = Titles.WorldSalesStatistics;
                            leftFloatedColumn.Controls.Add(header);
                        }

                        segment.Controls.Add(leftFloatedColumn);
                    }

                    using (HtmlGenericControl rightFloatedColumn = new HtmlGenericControl("div"))
                    {
                        rightFloatedColumn.Attributes.Add("class", "right floated column");

                        using (HtmlGenericControl i = HtmlControlHelper.GetIcon("expand disabled icon"))
                        {
                            rightFloatedColumn.Controls.Add(i);
                        }
                        using (HtmlGenericControl i = HtmlControlHelper.GetIcon("move icon"))
                        {
                            rightFloatedColumn.Controls.Add(i);
                        }
                        using (HtmlGenericControl i = HtmlControlHelper.GetIcon("help icon"))
                        {
                            rightFloatedColumn.Controls.Add(i);
                        }
                        using (HtmlGenericControl i = HtmlControlHelper.GetIcon("close icon"))
                        {
                            rightFloatedColumn.Controls.Add(i);
                        }

                        segment.Controls.Add(rightFloatedColumn);
                    }
                    widget.Controls.Add(segment);
                }

                using (HtmlGenericControl bottomAttachedSegment = new HtmlGenericControl("div"))
                {
                    bottomAttachedSegment.Attributes.Add("class", "ui attached segment");
                    using (HtmlGenericControl mapContainer = new HtmlGenericControl("div"))
                    {
                        mapContainer.ID = "map-container";
                        mapContainer.Attributes.Add("style", "height: 400px; width: 980px;");
                        bottomAttachedSegment.Controls.Add(mapContainer);
                    }

                    widget.Controls.Add(bottomAttachedSegment);
                }

                container.Controls.Add(widget);
            }
        }