Beispiel #1
0
        private void AddCashTransactionDivCell(HtmlTableRow row)
        {
            using (HtmlTableCell cell = Helpers.TableHelper.GetFieldCell())
            {
                if (this.ShowTransactionType)
                {
                    using (HtmlGenericControl toggleCheckBox = HtmlControlHelper.GetToggleCheckBox())
                    {
                        toggleCheckBox.ID = "CashTransactionDiv";
                        using (HtmlInputCheckBox cashTransactionInputCheckBox = new HtmlInputCheckBox())
                        {
                            cashTransactionInputCheckBox.ID = "CashTransactionInputCheckBox";
                            cashTransactionInputCheckBox.Attributes.Add("checked", "checked");
                            toggleCheckBox.Controls.Add(cashTransactionInputCheckBox);
                        }

                        using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.CashTransaction))
                        {
                            toggleCheckBox.Controls.Add(label);
                        }

                        cell.Controls.Add(toggleCheckBox);
                    }
                }

                row.Cells.Add(cell);
            }
        }
Beispiel #2
0
        private void AddCashTransactionDivField(HtmlGenericControl container)
        {
            using (HtmlGenericControl field = HtmlControlHelper.GetField())
            {
                using (HtmlGenericControl label = HtmlControlHelper.GetLabel(" "))
                {
                    field.Controls.Add(label);
                }

                using (HtmlGenericControl toggleCheckBox = HtmlControlHelper.GetToggleCheckBox())
                {
                    toggleCheckBox.ID = "CashTransactionDiv";
                    using (HtmlInputCheckBox cashTransactionInputCheckBox = new HtmlInputCheckBox())
                    {
                        cashTransactionInputCheckBox.ID = "CashTransactionInputCheckBox";
                        cashTransactionInputCheckBox.Attributes.Add("checked", "checked");
                        toggleCheckBox.Controls.Add(cashTransactionInputCheckBox);
                    }

                    using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.CashTransaction))
                    {
                        toggleCheckBox.Controls.Add(label);
                    }

                    field.Controls.Add(toggleCheckBox);
                }

                container.Controls.Add(field);
            }
        }