protected void Page_Init(object sender, EventArgs e) { using (HtmlGenericControl header = new HtmlGenericControl("h1")) { header.InnerText = Resources.Warnings.AccessIsDenied; this.Placeholder1.Controls.Add(header); } using (HtmlGenericControl divider = HtmlControlHelper.GetDivider()) { this.Placeholder1.Controls.Add(divider); } using (HtmlGenericControl p = new HtmlGenericControl("p")) { p.InnerText = Resources.Warnings.NotAuthorized; this.Placeholder1.Controls.Add(p); } }
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); } }
private void AddCompanyField(HtmlGenericControl container) { using (HtmlGenericControl field = new HtmlGenericControl("div")) { field.Attributes.Add("class", "field"); using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.SelectCompany, "CompanySelect")) { field.Controls.Add(label); } this.companySelect = new DropDownList(); this.companySelect.ID = "CompanySelect"; field.Controls.Add(this.companySelect); container.Controls.Add(field); } }
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()) { this.CreateHeader(segment); this.CreateDivider(segment); this.CreateContent(segment); widget.Controls.Add(segment); } container.Controls.Add(widget); } }
private void AddPreviousPeriodField(HtmlGenericControl container) { using (HtmlGenericControl field = HtmlControlHelper.GetField()) { using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.PreviousPeriod, "PreviousPeriodDateTextBox")) { field.Controls.Add(label); } this.previousPeriodDateTextBox = new DateTextBox(); this.previousPeriodDateTextBox.ID = "PreviousPeriodDateTextBox"; this.previousPeriodDateTextBox.Mode = FrequencyType.FiscalYearStartDate; this.previousPeriodDateTextBox.OfficeId = CurrentUser.GetSignInView().OfficeId.ToInt(); field.Controls.Add(this.previousPeriodDateTextBox); container.Controls.Add(field); } }
private void AddShowButton(HtmlGenericControl container) { using (HtmlGenericControl field = HtmlControlHelper.GetField()) { using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.Prepare, "ShowButton")) { field.Controls.Add(label); } this.showButton = new Button(); this.showButton.ID = "ShowButton"; this.showButton.Attributes.Add("class", "ui positive button"); this.showButton.Text = Titles.Show; this.showButton.Click += this.ShowButton_Click; field.Controls.Add(this.showButton); container.Controls.Add(field); } }
private void AddToDateTextBoxField(HtmlGenericControl container) { using (HtmlGenericControl field = HtmlControlHelper.GetField()) { using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.To, "ToDateTextBox")) { field.Controls.Add(label); } this.toDateTextBox = new DateTextBox(); this.toDateTextBox.ID = "ToDateTextBox"; this.toDateTextBox.Mode = FrequencyType.QuarterEndDate; this.toDateTextBox.OfficeId = CurrentUser.GetSignInView().OfficeId.ToInt(); field.Controls.Add(this.toDateTextBox); container.Controls.Add(field); } }
private void CreateWidget(Control container) { using (HtmlGenericControl widget = new HtmlGenericControl("div")) { widget.ID = "WorkflowWidget"; widget.Attributes.Add("class", "eight wide column widget"); using (HtmlGenericControl segment = HtmlControlHelper.GetSegment()) { this.CreateHeader(segment); this.CreateDivider(segment); this.CreateList(segment); widget.Controls.Add(segment); } container.Controls.Add(widget); } }
private void AddFromDateTextBoxField(HtmlGenericControl container) { using (HtmlGenericControl field = HtmlControlHelper.GetField()) { using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.From, "FromDateTextBox")) { field.Controls.Add(label); } this.fromDateTextBox = new DateTextBox(); this.fromDateTextBox.ID = "FromDateTextBox"; this.fromDateTextBox.Mode = FrequencyType.FiscalYearStartDate; this.fromDateTextBox.Catalog = AppUsers.GetCurrentUserDB(); this.fromDateTextBox.OfficeId = AppUsers.GetCurrent().View.OfficeId.ToInt(); field.Controls.Add(this.fromDateTextBox); container.Controls.Add(field); } }
private void CreateForm(Control container) { using (HtmlGenericControl formSegment = new HtmlGenericControl("div")) { formSegment.Attributes.Add("class", "ui form segment"); using (HtmlGenericControl fields = HtmlControlHelper.GetFields("inline fields")) { this.AddFromDateTextBoxField(fields); this.AddToDateTextBoxField(fields); this.AddFactorField(fields); this.AddCompactCheckBoxField(fields); this.AddShowButton(fields); this.AddPrintButton(fields); formSegment.Controls.Add(fields); } container.Controls.Add(formSegment); } }
private void AddReferenceNumberInputTextField(HtmlGenericControl container) { using (HtmlGenericControl field = HtmlControlHelper.GetField()) { using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.ReferenceNumberAbbreviated)) { field.Controls.Add(label); } this.referenceNumberInputText = new HtmlInputText(); this.referenceNumberInputText.ID = "ReferenceNumberInputText"; this.referenceNumberInputText.MaxLength = 24; field.Controls.Add(this.referenceNumberInputText); container.Controls.Add(field); } }
private void CreateEODConsole(Control container) { using (HtmlGenericControl segment = HtmlControlHelper.GetSegment("ui segment initially hidden")) { segment.ID = "EODSegment"; segment.Attributes.Add("style", "overflow:auto;"); using (HtmlGenericControl console = new HtmlGenericControl("h2")) { console.InnerText = Titles.EODConsole; console.Attributes.Add("class", "ui blue header initially hidden"); segment.Controls.Add(console); this.CreateList(segment); } container.Controls.Add(segment); } }
private void CreateValueDateField(HtmlGenericControl container) { using (HtmlGenericControl field = HtmlControlHelper.GetField()) { using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.ValueDate, "ValueDateTextBox")) { field.Controls.Add(label); } this.valueDateTextBox = new DateTextBox(); this.valueDateTextBox.ID = "ValueDateTextBox"; this.valueDateTextBox.OfficeId = CurrentUser.GetSignInView().OfficeId.ToInt(); this.valueDateTextBox.Mode = FrequencyType.Today; field.Controls.Add(this.valueDateTextBox); container.Controls.Add(field); } }
private void CreatePasswordField(HtmlGenericControl container) { using (HtmlGenericControl field = HtmlControlHelper.GetField()) { using ( HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.EnterNewPassword, "PasswordInputPassword")) { field.Controls.Add(label); } this.passwordInputPassword = new HtmlInputPassword(); this.passwordInputPassword.ID = "PasswordInputPassword"; field.Controls.Add(this.passwordInputPassword); container.Controls.Add(field); } }
private static void AddShippingAddressCompositeField(HtmlGenericControl container) { using (HtmlGenericControl shippingAddressInfoDiv = HtmlControlHelper.GetField()) { shippingAddressInfoDiv.ID = "ShippingAddressInfoDiv"; shippingAddressInfoDiv.Attributes.Add("style", "width:500px;"); using (HtmlGenericControl fields = HtmlControlHelper.GetFields("two fields")) { AddShippingCompanyField(fields); AddShippingAddressField(fields); shippingAddressInfoDiv.Controls.Add(fields); } container.Controls.Add(shippingAddressInfoDiv); } }
private void AddPrintButton(HtmlGenericControl container) { using (HtmlGenericControl field = HtmlControlHelper.GetField()) { field.Controls.Add(this.GetEmptyLabel()); using (HtmlInputButton printButton = new HtmlInputButton()) { printButton.ID = "PrintButton"; printButton.Attributes.Add("class", "ui orange button"); printButton.Value = Titles.Print; field.Controls.Add(printButton); } container.Controls.Add(field); } }
private void CreateField(HtmlGenericControl container, string label, string id) { using (HtmlGenericControl field = HtmlControlHelper.GetField()) { using (HtmlGenericControl fieldLabel = HtmlControlHelper.GetLabel(label, id)) { field.Controls.Add(fieldLabel); } using (HtmlInputText inputText = new HtmlInputText()) { inputText.ID = id; inputText.Disabled = true; field.Controls.Add(inputText); } container.Controls.Add(field); } }
internal static void CreateHeaderCell(TableRow row, string text, string targetControlId) { using (TableHeaderCell cell = new TableHeaderCell()) { if (targetControlId != null) { using (HtmlGenericControl label = HtmlControlHelper.GetLabel(text, targetControlId)) { cell.Controls.Add(label); } } else { cell.Text = text; } row.Cells.Add(cell); } }
private static void AddStoreSelectField(HtmlGenericControl container) { using (HtmlGenericControl field = HtmlControlHelper.GetField()) { using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.SelectStore)) { field.Controls.Add(label); } using (HtmlSelect storeSelect = new HtmlSelect()) { storeSelect.ID = "StoreSelect"; field.Controls.Add(storeSelect); } container.Controls.Add(field); } }
private void LoadLabels() { this.DateLiteral.Text = HtmlControlHelper.GetLabel(this.DateTextBox.ClientID, StockTransactionFactoryResourceHelper.GetResourceString("Titles", "ValueDate")); this.StoreLiteral.Text = HtmlControlHelper.GetLabel(this.StoreDropDownList.ClientID, StockTransactionFactoryResourceHelper.GetResourceString("Titles", "SelectStore")); this.PartyLiteral.Text = HtmlControlHelper.GetLabel(this.PartyCodeTextBox.ClientID, StockTransactionFactoryResourceHelper.GetResourceString("Titles", "SelectParty")); this.PriceTypeLiteral.Text = HtmlControlHelper.GetLabel(this.PriceTypeDropDownList.ClientID, StockTransactionFactoryResourceHelper.GetResourceString("Titles", "PriceType")); this.ReferenceNumberLiteral.Text = HtmlControlHelper.GetLabel(this.ReferenceNumberTextBox.ClientID, StockTransactionFactoryResourceHelper.GetResourceString("Titles", "ReferenceNumberAbbreviated")); this.ItemCodeLiteral.Text = HtmlControlHelper.GetLabel("ItemCodeTextBox", StockTransactionFactoryResourceHelper.GetResourceString("Titles", "ItemCode")); this.ItemNameLiteral.Text = HtmlControlHelper.GetLabel("ItemDropDownList", StockTransactionFactoryResourceHelper.GetResourceString("Titles", "ItemName")); this.QuantityLiteral.Text = HtmlControlHelper.GetLabel("QuantityTextBox", StockTransactionFactoryResourceHelper.GetResourceString("Titles", "QuantityAbbreviated")); this.UnitLiteral.Text = HtmlControlHelper.GetLabel("UnitDropDownList", StockTransactionFactoryResourceHelper.GetResourceString("Titles", "Unit")); this.PriceLiteral.Text = HtmlControlHelper.GetLabel("PriceTextBox", StockTransactionFactoryResourceHelper.GetResourceString("Titles", "Price")); this.AmountLiteral.Text = HtmlControlHelper.GetLabel("AmountTextBox", StockTransactionFactoryResourceHelper.GetResourceString("Titles", "Amount")); this.DiscountLiteral.Text = HtmlControlHelper.GetLabel("DiscountTextBox", StockTransactionFactoryResourceHelper.GetResourceString("Titles", "Discount")); this.SubTotalLiteral.Text = HtmlControlHelper.GetLabel("SubTotalTextBox", StockTransactionFactoryResourceHelper.GetResourceString("Titles", "SubTotal")); this.RateLiteral.Text = HtmlControlHelper.GetLabel("TaxRateTextBox", StockTransactionFactoryResourceHelper.GetResourceString("Titles", "Rate")); this.TaxLiteral.Text = HtmlControlHelper.GetLabel("TaxTextBox", StockTransactionFactoryResourceHelper.GetResourceString("Titles", "Tax")); this.TotalLiteral.Text = HtmlControlHelper.GetLabel("TotalTextBox", StockTransactionFactoryResourceHelper.GetResourceString("Titles", "Total")); this.RunningTotalTextBoxLabelLiteral.Text = HtmlControlHelper.GetLabel(this.RunningTotalTextBox.ClientID, StockTransactionFactoryResourceHelper.GetResourceString("Titles", "RunningTotal")); this.TaxTotalTextBoxLabelLiteral.Text = HtmlControlHelper.GetLabel(this.TaxTotalTextBox.ClientID, StockTransactionFactoryResourceHelper.GetResourceString("Titles", "TaxTotal")); this.GrandTotalTextBoxLabelLiteral.Text = HtmlControlHelper.GetLabel(this.GrandTotalTextBox.ClientID, StockTransactionFactoryResourceHelper.GetResourceString("Titles", "GrandTotal")); this.ShippingAddressDropDownListLabelLiteral.Text = HtmlControlHelper.GetLabel(this.ShippingAddressDropDownList.ClientID, StockTransactionFactoryResourceHelper.GetResourceString("Titles", "ShippingAddress")); this.ShippingCompanyDropDownListLabelLiteral.Text = HtmlControlHelper.GetLabel(this.ShippingCompanyDropDownList.ClientID, StockTransactionFactoryResourceHelper.GetResourceString("Titles", "ShippingCompany")); this.ShippingChargeTextBoxLabelLiteral.Text = HtmlControlHelper.GetLabel(this.ShippingChargeTextBox.ClientID, StockTransactionFactoryResourceHelper.GetResourceString("Titles", "ShippingCharge")); this.CashRepositoryDropDownListLabelLiteral.Text = HtmlControlHelper.GetLabel(this.CashRepositoryDropDownList.ClientID, StockTransactionFactoryResourceHelper.GetResourceString("Titles", "CashRepository")); this.CashRepositoryBalanceTextBoxLabelLiteral.Text = HtmlControlHelper.GetLabel(this.CashRepositoryBalanceTextBox.ClientID, StockTransactionFactoryResourceHelper.GetResourceString("Titles", "CashRepositoryBalance")); this.CostCenterDropDownListLabelLiteral.Text = HtmlControlHelper.GetLabel(this.CostCenterDropDownList.ClientID, StockTransactionFactoryResourceHelper.GetResourceString("Titles", "CostCenter")); this.SalespersonDropDownListLabelLiteral.Text = HtmlControlHelper.GetLabel(this.SalespersonDropDownList.ClientID, StockTransactionFactoryResourceHelper.GetResourceString("Titles", "Salesperson")); this.StatementReferenceTextBoxLabelLiteral.Text = HtmlControlHelper.GetLabel(this.StatementReferenceTextBox.ClientID, StockTransactionFactoryResourceHelper.GetResourceString("Titles", "StatementReference")); if (this.Book == TranBook.Sales) { this.TransactionTypeLiteral.Text = HtmlControlHelper.GetLabel(StockTransactionFactoryResourceHelper.GetResourceString("Titles", "SalesType")); } else { this.TransactionTypeLiteral.Text = HtmlControlHelper.GetLabel(StockTransactionFactoryResourceHelper.GetResourceString("Titles", "PurchaseType")); } }
private static void AddCostCenterField(HtmlGenericControl container) { using (HtmlGenericControl costCenterDiv = HtmlControlHelper.GetField()) { costCenterDiv.ID = "CostCenterDiv"; using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.CostCenter, "CostCenterSelect")) { costCenterDiv.Controls.Add(label); } using (HtmlSelect costCenterSelect = new HtmlSelect()) { costCenterSelect.ID = "CostCenterSelect"; costCenterDiv.Controls.Add(costCenterSelect); } container.Controls.Add(costCenterDiv); } }
private static void AddTaxTotalField(HtmlGenericControl container) { using (HtmlGenericControl field = HtmlControlHelper.GetField()) { using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.TaxTotal, "TaxTotalInputText")) { field.Controls.Add(label); } using (HtmlInputText taxTotalInputText = new HtmlInputText()) { taxTotalInputText.ID = "TaxTotalInputText"; taxTotalInputText.Attributes.Add("class", "currency"); taxTotalInputText.Attributes.Add("readonly", "readonly"); field.Controls.Add(taxTotalInputText); } container.Controls.Add(field); } }
private static void AddPartySelectField(HtmlGenericControl container) { using (HtmlGenericControl field = HtmlControlHelper.GetField()) { using (HtmlGenericControl label = HtmlControlHelper.GetLabel(" ")) { field.Controls.Add(label); } using (HtmlSelect partySelect = new HtmlSelect()) { partySelect.ID = "PartySelect"; partySelect.Attributes.Add("title", "F2"); field.Controls.Add(partySelect); } container.Controls.Add(field); } }
private void AddBranchField(HtmlGenericControl container) { using (HtmlGenericControl field = new HtmlGenericControl("div")) { field.Attributes.Add("class", "field"); using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.SelectYourBranch, "BranchSelect")) { field.Controls.Add(label); } this.branchSelect = new HtmlSelect(); this.branchSelect.ID = "BranchSelect"; this.branchSelect.DataTextField = "OfficeName"; this.branchSelect.DataValueField = "OfficeId"; field.Controls.Add(this.branchSelect); container.Controls.Add(field); } }
private void LoadLabels() { this.DateLiteral.Text = HtmlControlHelper.GetLabel(this.DateTextBox.ClientID, Titles.ValueDate); this.StoreLiteral.Text = HtmlControlHelper.GetLabel(this.StoreDropDownList.ClientID, Titles.SelectStore); this.PartyLiteral.Text = HtmlControlHelper.GetLabel(this.PartyCodeTextBox.ClientID, Titles.SelectParty); this.PriceTypeLiteral.Text = HtmlControlHelper.GetLabel(this.PriceTypeDropDownList.ClientID, Titles.PriceType); this.ReferenceNumberLiteral.Text = HtmlControlHelper.GetLabel(this.ReferenceNumberTextBox.ClientID, Titles.ReferenceNumberAbbreviated); this.RunningTotalTextBoxLabelLiteral.Text = HtmlControlHelper.GetLabel(this.RunningTotalTextBox.ClientID, Titles.RunningTotal); this.TaxTotalTextBoxLabelLiteral.Text = HtmlControlHelper.GetLabel(this.TaxTotalTextBox.ClientID, Titles.TaxTotal); this.GrandTotalTextBoxLabelLiteral.Text = HtmlControlHelper.GetLabel(this.GrandTotalTextBox.ClientID, Titles.GrandTotal); this.ShippingAddressDropDownListLabelLiteral.Text = HtmlControlHelper.GetLabel(this.ShippingAddressDropDownList.ClientID, Titles.ShippingAddress); this.ShippingCompanyDropDownListLabelLiteral.Text = HtmlControlHelper.GetLabel(this.ShippingCompanyDropDownList.ClientID, Titles.ShippingCompany); this.ShippingChargeTextBoxLabelLiteral.Text = HtmlControlHelper.GetLabel(this.ShippingChargeTextBox.ClientID, Titles.ShippingCharge); this.CashRepositoryDropDownListLabelLiteral.Text = HtmlControlHelper.GetLabel(this.CashRepositoryDropDownList.ClientID, Titles.CashRepository); this.CashRepositoryBalanceTextBoxLabelLiteral.Text = HtmlControlHelper.GetLabel(this.CashRepositoryBalanceTextBox.ClientID, Titles.CashRepositoryBalance); this.CostCenterDropDownListLabelLiteral.Text = HtmlControlHelper.GetLabel(this.CostCenterDropDownList.ClientID, Titles.CostCenter); this.SalespersonDropDownListLabelLiteral.Text = HtmlControlHelper.GetLabel(this.SalespersonDropDownList.ClientID, Titles.Salesperson); this.StatementReferenceTextBoxLabelLiteral.Text = HtmlControlHelper.GetLabel(this.StatementReferenceTextBox.ClientID, Titles.StatementReference); }
private static void AddPasswordField(HtmlGenericControl container) { using (HtmlGenericControl field = new HtmlGenericControl("div")) { field.Attributes.Add("class", "field"); using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.Password, "PasswordInputPassword")) { field.Controls.Add(label); } using (HtmlInputPassword passwordInputPassword = new HtmlInputPassword()) { passwordInputPassword.ID = "PasswordInputPassword"; passwordInputPassword.Attributes.Add("placeholder", Titles.Password); field.Controls.Add(passwordInputPassword); } container.Controls.Add(field); } }
private void AddUserIdField(HtmlGenericControl container) { using (HtmlGenericControl field = new HtmlGenericControl("div")) { field.Attributes.Add("class", "field"); using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.UserId, "UserNameInputText")) { field.Controls.Add(label); } using (HtmlInputText usernameInputText = new HtmlInputText()) { usernameInputText.ID = "UsernameInputText"; usernameInputText.Attributes.Add("placeholder", Titles.UserId); field.Controls.Add(usernameInputText); container.Controls.Add(field); } } }
private static void AddSalespersonField(HtmlGenericControl container) { using (HtmlGenericControl salespersonDiv = HtmlControlHelper.GetField()) { salespersonDiv.ID = "SalespersonDiv"; using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.Salesperson, "SalesPersonSelect")) { salespersonDiv.Controls.Add(label); } using (HtmlSelect salesPersonSelect = new HtmlSelect()) { salesPersonSelect.ID = "SalesPersonSelect"; salespersonDiv.Controls.Add(salesPersonSelect); } container.Controls.Add(salespersonDiv); } }
private void AddDateTextBoxField(HtmlGenericControl container) { using (HtmlGenericControl field = HtmlControlHelper.GetField()) { using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.ValueDate)) { field.Controls.Add(label); } this.dateTextBox = new DateTextBox(); this.dateTextBox.ID = "DateTextBox"; this.dateTextBox.OfficeId = this.OfficeId; this.dateTextBox.Mode = FrequencyType.Today; this.dateTextBox.CssClass = "date"; this.dateTextBox.Catalog = this.Catalog; this.dateTextBox.OfficeId = this.OfficeId; field.Controls.Add(this.dateTextBox); container.Controls.Add(field); } }
private void AddReferenceNumberTextBox(HtmlGenericControl fields) { using (HtmlGenericControl field = HtmlControlHelper.GetField()) { using (HtmlGenericControl label = new HtmlGenericControl()) { label.TagName = "label"; label.Attributes.Add("for", "ReferenceNumberInputText"); label.InnerText = Titles.ReferenceNumber; field.Controls.Add(label); } using (HtmlInputText referenceNumberInputText = new HtmlInputText()) { referenceNumberInputText.ID = "ReferenceNumberInputText"; referenceNumberInputText.MaxLength = 24; field.Controls.Add(referenceNumberInputText); } fields.Controls.Add(field); } }