Exemplo n.º 1
0
        private void CreateBottomForm(Control container)
        {
            using (HtmlGenericControl form = HtmlControlHelper.GetForm())
            {
                form.Attributes.Add("style", "width:300px;");


                using (HtmlGenericControl field = HtmlControlHelper.GetField())
                {
                    using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.StatementReference, "StatementReferenceTextArea"))
                    {
                        field.Controls.Add(label);
                    }

                    using (HtmlTextArea statementReferenceTextArea = new HtmlTextArea())
                    {
                        statementReferenceTextArea.ID   = "StatementReferenceTextArea";
                        statementReferenceTextArea.Rows = 4;
                        field.Controls.Add(statementReferenceTextArea);
                    }

                    form.Controls.Add(field);
                }

                this.CreateSaveButton(form);

                container.Controls.Add(form);
            }
        }
        private void AddContent(HtmlGenericControl container)
        {
            using (HtmlGenericControl content = new HtmlGenericControl("div"))
            {
                content.Attributes.Add("class", "ui inverted red content");

                using (HtmlGenericControl form = HtmlControlHelper.GetForm())
                {
                    using (HtmlGenericControl header = new HtmlGenericControl("div"))
                    {
                        header.Attributes.Add("class", "ui blue large dividing header");
                        form.Controls.Add(header);
                    }

                    using (HtmlGenericControl field = HtmlControlHelper.GetField())
                    {
                        using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.VerificationReason, "ReasonTextArea"))
                        {
                            field.Controls.Add(label);
                        }

                        using (HtmlTextArea textArea = new HtmlTextArea())
                        {
                            textArea.ID = "ReasonTextArea";
                            field.Controls.Add(textArea);
                        }
                        form.Controls.Add(field);
                    }

                    content.Controls.Add(form);
                }

                container.Controls.Add(content);
            }
        }
Exemplo n.º 3
0
        private void CreateFilterSegment(Control container)
        {
            using (HtmlGenericControl filterSegment = HtmlControlHelper.GetSegment())
            {
                filterSegment.ID = "FilterDiv";

                using (HtmlGenericControl form = HtmlControlHelper.GetForm())
                {
                    form.Attributes.Add("margin-left", "8px;");

                    using (HtmlGenericControl nineFields = HtmlControlHelper.GetFields("nine fields"))
                    {
                        this.CreateDateFromField(nineFields);
                        this.CreateDateToField(nineFields);
                        this.CreateOfficeField(nineFields);
                        this.CreatePartyField(nineFields);
                        this.CreatePriceTypeField(nineFields);
                        this.CreateUserField(nineFields);
                        this.CreateReferenceNumberField(nineFields);
                        this.CreateStatementReferenceField(nineFields);
                        this.CreateShowButtonField(nineFields);

                        form.Controls.Add(nineFields);
                    }

                    filterSegment.Controls.Add(form);
                }

                container.Controls.Add(filterSegment);
            }
        }
Exemplo n.º 4
0
 private void CreateModalForm(HtmlGenericControl container)
 {
     using (HtmlGenericControl form = HtmlControlHelper.GetForm())
     {
         this.CreateModalFormFields(form);
         this.CreateModalButtons(form);
         container.Controls.Add(form);
     }
 }
Exemplo n.º 5
0
        private void CreateTopFormPanel(Control container)
        {
            using (HtmlGenericControl segment = HtmlControlHelper.GetSegment())
            {
                using (HtmlGenericControl form = new HtmlGenericControl("div"))
                {
                    form.Attributes.Add("class", "ui stackable form");

                    var totalFields = this.CountTopFormControls();

                    using (HtmlGenericControl fields = HtmlControlHelper.GetFields(this.numbers[totalFields] + " fields"))
                    {
                        this.AddTopFormControls(fields);

                        form.Controls.Add(fields);
                    }

                    segment.Controls.Add(form);
                }

                container.Controls.Add(segment);
            }


            using (HtmlGenericControl form = HtmlControlHelper.GetForm())
            {
                using (HtmlGenericControl fields = HtmlControlHelper.GetFields("two fields"))
                {
                    if (this.ShowShippingInformation)
                    {
                        AddShippingAddressCompositeField(fields);
                    }

                    if (this.Book == TranBook.Sales && this.ShowSalesType)
                    {
                        this.AddSalesTypeField(fields);
                    }

                    form.Controls.Add(fields);
                }

                container.Controls.Add(form);
            }
        }
Exemplo n.º 6
0
        private void CreateTopFormPanel(Control container)
        {
            using (HtmlGenericControl segment = HtmlControlHelper.GetSegment())
            {
                using (HtmlTable table = new HtmlTable())
                {
                    table.Attributes.Add("class", "ui form");

                    this.AddTopFormLabels(table);
                    this.AddTopFormControls(table);
                    segment.Controls.Add(table);
                }

                container.Controls.Add(segment);
            }


            using (HtmlGenericControl form = HtmlControlHelper.GetForm())
            {
                using (HtmlGenericControl fields = HtmlControlHelper.GetFields("two fields"))
                {
                    if (this.ShowShippingInformation)
                    {
                        AddShippingAddressCompositeField(fields);
                    }

                    if (this.Book == TranBook.Sales && this.ShowSalesType)
                    {
                        this.AddSalesTypeField(fields);
                    }

                    form.Controls.Add(fields);
                }

                container.Controls.Add(form);
            }
        }