protected void InsertAppData() { StringBuilder appDataSb = new StringBuilder(); appDataSb.Append("window.appData = {"); appDataSb.Append("dictionaries: {"); appDataSb.Append("inputDocTypes: [" + FormatDictionaryList(InputDocType.GetAll(), "InputDocTypeID") + "], "); appDataSb.Append("inputMethods: [" + FormatDictionaryList(InputMethod.GetAll(), "InputMethodID") + "], "); appDataSb.Append("inputSigns: [" + FormatDictionaryList(InputSign.GetAll(), "InputSignID") + "], "); appDataSb.Append("inputSubjectTypes: [" + FormatDictionaryList(InputSubjectType.GetAll(), "InputSubjectTypeID") + "], "); appDataSb.Append("deliveryTypes: [" + FormatDictionaryList(DeliveryType.GetAll(), "DeliveryTypeID") + "] ,"); appDataSb.Append("socialStatuses: [" + FormatDictionaryList(SocialStatus.GetAll(), "SocialStatusID") + "], "); appDataSb.Append("branchTypes: [" + FormatDictionaryList(BranchType.GetAll(), "BranchTypeID") + "], "); appDataSb.Append("socialCategories: [" + FormatDictionaryList(SocialCategory.GetAll(), "SocialCategoryID") + "], "); appDataSb.Append("cardStatuses: [" + FormatDictionaryList(CardStatus.GetAll(), "CardStatusID") + "], "); appDataSb.Append("labels: [" + FormatDictionaryList(Label.GetList(), "LabelID") + "], "); appDataSb.Append("docStatuses: [" + FormatDictionaryList(DocStatus.GetAll(), "DocStatusID") + "]"); appDataSb.Append("}"); appDataSb.Append("}"); HtmlGenericControl scriptControl = new HtmlGenericControl("script"); scriptControl.Attributes["type"] = "text/javascript"; scriptControl.InnerHtml = appDataSb.ToString(); Page.Header.Controls.AddAt(0, scriptControl); }
private static IBooleanFunction GetInputSignFunction(InputSign inputSign) { IBooleanFunction inputFunction = new InputFunction(inputSign.Index); if (inputSign.IsInversed) { inputFunction = new NotFunction(inputFunction); } return(inputFunction); }