/// <summary> /// Shows answer form for selected answer. /// </summary> private void AnswerSelectionChanged(object sender, EventArgs e) { WebControl control = sender as WebControl; if (control != null) { // Find the appropriate bizform BizForm bizItem = (BizForm)pnlAnswer.FindControl("frm" + control.ID.Substring(3)); if (bizItem != null) { bizItem.Visible = true; } } }
public XlsFormDefBuilder(IDataContext dataContext, BizForm form, Guid userId) { DataContext = dataContext; Form = form; UserId = userId; var providerFactory = AppServiceProviderFactoryProvider.GetFactory(); Provider = providerFactory.Create(dataContext, new UserDataProvider(UserId, "")); _formRepo = Provider.Get <IFormRepository>(); _sqlQueryBuilderFactory = Provider.Get <ISqlQueryBuilderFactory>(); _sqlQueryReaderFactory = Provider.Get <ISqlQueryReaderFactory>(); _comboBoxValueProvider = Provider.Get <IComboBoxEnumProvider>(); }
public IList <EnumValue> GetFormComboBoxValues(BizForm form, BizComboBox comboBox) { /*var masters = new List<BizControl>(); * if (comboBox.Masters != null && comboBox.Masters.Count > 0) * { * var finder = new ControlFinder(form); * foreach (var masterId in comboBox.Masters) * { * var master = finder.Find(masterId); * if (master != null) * masters.Add(master); * } * }*/ return(GetFormComboBoxValues(form, comboBox, GetComboBoxAttrDef(form, comboBox))); }
public ModelMessage AddFormMessage(BizForm form, Guid attrId, string message) { if (form != null) { var finder = new ControlFinder(form); var ctrl = finder.FirstOrDefault( c => c is BizDataControl && ((BizDataControl)c).AttributeDefId == attrId); if (ctrl != null) { return(AddMessage(ctrl.Id, message)); } } return(AddMessage(attrId, message)); }
/* * [Trace("Presentation")] * public List<BizControl> GetTableFormRows(BizTableForm form, List<Guid> docIds) * { * return FormRepo.GetTableFormRows(form, docIds); * } */ /// <summary> /// Загружает главную форму /// </summary> /// <returns>Главная форма</returns> public BizForm GetMainForm() { var mainForm = new BizForm { Children = new List <BizControl>() }; /* * var btn = new BizButton * { * Caption = "Test form open", * Id = Guid.Parse("3EECC26D-160D-4471-A886-5289B818798F"), * ActionId = Guid.Parse("B88FE6CA-D327-44C5-BC84-37F47D85FB4A"), * ActionType = BizButtonActionType.Form * }; * * mainForm.Children.Add(btn); * * var em = new cissaEntities(); * * foreach (var table in em.Object_Defs.OfType<Table_Form>().Where(f => f.Deleted == null || f.Deleted == false)) * { * btn = new BizButton * { * Caption = table.Full_Name, * Id = Guid.NewGuid(), * ActionId = table.Id, * ActionType = BizButtonActionType.Form * }; * mainForm.Children.Add(btn); * } * * foreach (var process in em.Object_Defs.OfType<Workflow_Process>().Where(p => p.Deleted == null || p.Deleted == false)) * { * btn = new BizButton * { * Caption = process.Name, * Id = Guid.NewGuid(), * ProcessId = process.Id, * ActionType = BizButtonActionType.BizProcess * }; * mainForm.Children.Add(btn); * } */ return(mainForm); }
/// <summary> /// Формирует Excel документ из формы и списка документов /// </summary> /// <param name="form">Форма, задающая оформление данных в выходном документе</param> /// <param name="docIdList">Список идентификаторов документов, которые необходимо вывести в файл</param> /// <returns>Массив двоичных данных тела Excel файла</returns> public byte[] ExcelFromDocIdList(BizForm form, List <Guid> docIdList) { var defBuilder = new XlsGridDefBuilder(DataContext, form, docIdList, CurrentUserId); using (var def = defBuilder.BuildFromBizForm()) { var builder = new XlsBuilder(def); using (var workbook = builder.Build()) { using (var stream = new MemoryStream()) { workbook.Write(stream); return(stream.ToArray()); } } } }
public ModelMessage AddFormMessage(BizForm form, string name, string message) { if (form != null) { var finder = new ControlFinder(form); var ctrl = finder.FirstOrDefault( c => c is BizDataControl && String.Equals(((BizDataControl)c).AttributeName, name, StringComparison.InvariantCultureIgnoreCase)); if (ctrl != null) { return(AddMessage(ctrl.Id, name, message)); } } return(AddMessage(name, message)); }
public IList <EnumValue> GetFormComboBoxValues(BizForm form, BizComboBox comboBox, AttrDef attrDef) { var list = new List <EnumValue>(); if (attrDef == null) { switch (comboBox.Ident) { case SystemIdent.OrgId: case SystemIdent.OrgCode: case SystemIdent.OrgName: return(GetEnumOrganizationValues(comboBox.DetailAttributeId)); case SystemIdent.UserId: case SystemIdent.UserName: return(GetEnumUserValues()); } return(list); } if (attrDef.Type.Id == (short)CissaDataType.Doc && attrDef.DocDefType != null) { foreach (var pair in _repositories.Where(pair => pair.Key.DataType.HasFlag(DataContextType.Document))) { list.AddRange(pair.Value.GetFormComboBoxValues(form, comboBox, attrDef)); } return(list); } if (attrDef.Type.Id == (short)CissaDataType.Enum && attrDef.EnumDefType != null) { return(new List <EnumValue>(_enumRepo.GetEnumItems(attrDef.EnumDefType.Id))); } if (attrDef.Type.Id == (short)CissaDataType.Organization) { return(GetEnumOrganizationValues(attrDef.OrgTypeId)); } if (attrDef.Type.Id == (short)CissaDataType.User) { return(GetEnumUserValues()); } return(list); }
public ManagedTableFormRow(BizForm form) { Id = form.Id; Form = form; if (form.Children != null) { Columns = new List <ManagedTableForm.Column>(); /*foreach (var control in Form.Children) * { * if (control.Invisible) continue; * if (control is BizTableColumn) AddColumnChildren(null, control); * else if (control is BizDocumentControl && control.Children != null && control.Children.Count > 0) * AddColumnChildren(null, control); * else * Columns.Add(new ManagedTableForm.Column { Control = control, Id = control.Id }); * }*/ AddColumnChildren(null, form); } }
public byte[] ExcelFromDetailForm(BizForm form, Doc doc) { var factory = Provider.Get <IXlsFormDefBuilderFactory>(); var defBuilder = factory.Create(form); using (var def = defBuilder.Build(doc)) { def.Style.Borders = TableCellBorder.All; var builder = new XlsBuilder(def); using (var workbook = builder.Build()) { using (var stream = new MemoryStream()) { workbook.Write(stream); return(stream.ToArray()); } } } }
public static SqlQuery BuildRefList(BizForm form, Guid docId, Guid attrDefId, BizForm filter, IEnumerable <AttributeSort> sortAttrs, Guid userId, IDataContext dataContext) { var factory = AppServiceProviderFactoryProvider.GetFactory(); using (var provider = factory.Create(dataContext)) { var sqb = new SqlQueryBuilderTool(provider, dataContext, userId); return(sqb.BuildRefList(form, docId, attrDefId, filter, sortAttrs)); } /*var query = new SqlQuery(dataContext, form.DocumentDefId ?? Guid.Empty, userId); * try * { * query.AddAttribute("&Id"); * query.AndCondition(attrDefId, ConditionOperation.Equal, docId); * * AddFormAttributes(query, query.Source, form); * if (filter != null) * AddFormConditions(query, query.Source, filter); * * if (sortAttrs != null) * foreach (var attr in sortAttrs) * { * query.AddOrderAttribute(attr.AttributeId, attr.Asc); * } * else * AddFormSortOrders(query, query.Source, form); * * return query; * } * catch * { * query.Dispose(); * throw; * }*/ }
public BizForm FillFormFromQuery(BizForm form, QueryDef queryDef) { var query = new DocQuery(queryDef, DataContext); /*foreach (var condition in query.GetConditions()) * { * var attrDef = condition.AttrDef; * * if (attrDef != null) * { * var ctrl = * form.Children.FirstOrDefault( * c => (c is BizDataControl) && (((BizDataControl) c).AttributeDefId == attrDef.Id)); * * if (ctrl is BizDocumentControl) * { * var docControl = (BizDocumentControl) ctrl; * if (condition.Condition.WhereConditions != null) * docControl. * } * } * }*/ return(form); }
public BizForm SetDoc(BizForm form, Doc document) { return(form); }
public BizForm Save(BizForm formForSave) { return(formForSave); }
//"Данное поле не может быть пустым! Введите значение."; public bool AddFieldValue(out string message, BizForm bizForm, Guid controlId, object value, bool onlyCheck) { //if (value == null) return; message = ""; var ok = true; BizControl control = FindControlById(controlId, bizForm.Children); if (control is BizEditInt) { var edit = (BizEditInt)control; if (value == null || String.IsNullOrEmpty(value.ToString())) { if (!onlyCheck) { edit.Value = null; } if (!onlyCheck && (edit.DocNotNull || edit.FormNotNull)) { message = FieldCannotBeNull; ok = false; } } else { int result; if (Int32.TryParse(value.ToString(), out result)) { if (!onlyCheck) { edit.Value = result; } if (!onlyCheck && (edit.DocNotNull || edit.FormNotNull)) { message = FieldCannotBeNull; ok = false; } } else { message = Resources.Form.InvalidNumberFormat /*"Число передано в неверном формате"*/; ok = false; } } } else if (control is BizEditCurrency) { var edit = (BizEditCurrency)control; //edit.Attribute.Value = decimal.Parse(value.ToString()); if (value == null || String.IsNullOrEmpty(value.ToString())) { if (!onlyCheck) { edit.Value = null; } if (!onlyCheck && (edit.DocNotNull || edit.FormNotNull)) { message = FieldCannotBeNull; ok = false; } } else { decimal result; if (decimal.TryParse(value.ToString(), out result)) { if (!onlyCheck) { edit.Value = result; } } else { message = Resources.Form.InvalidNumberFormat /*"Число передано в неверном формате"*/; ok = false; } } } else if (control is BizEditFloat) { var edit = (BizEditFloat)control; //edit.Attribute.Value = float.Parse(value.ToString()); if (value == null || String.IsNullOrEmpty(value.ToString())) { if (!onlyCheck) { edit.Value = null; } if (!onlyCheck && (edit.DocNotNull || edit.FormNotNull)) { message = FieldCannotBeNull; ok = false; } } else { float result; if (float.TryParse(value.ToString(), out result)) { //TODO: дописить тут различные проверки для аттрибута (ограничения загружены в сам аттрибут) if (!onlyCheck) { edit.Value = result; } } else { message = Resources.Form.InvalidNumberFormat /*"Число передано в неверном формате"*/; ok = false; } } } else if (control is BizEditText) { var edit = (BizEditText)control; //TODO: дописить тут различные проверки для аттрибута (ограничения загружены в сам аттрибут) if (!onlyCheck) { edit.Value = value != null?value.ToString() : null; } if (!onlyCheck && String.IsNullOrEmpty(edit.Value) && (edit.DocNotNull || edit.FormNotNull)) { message = FieldCannotBeNull; ok = false; } } else if (control is BizEditDateTime) { var edit = (BizEditDateTime)control; //edit.Attribute.Value = decimal.Parse(value.ToString()); if (value == null || String.IsNullOrEmpty(value.ToString())) { if (!onlyCheck) { edit.Value = null; } if (!onlyCheck && (edit.DocNotNull || edit.FormNotNull)) { message = FieldCannotBeNull; ok = false; } } else { DateTime result; if (DateTime.TryParse(value.ToString(), out result)) { //TODO: дописить тут различные проверки для аттрибута (ограничения загружены в сам аттрибут) if (!onlyCheck) { edit.Value = result; } } else { message = Resources.Form.InvalidDateTimeFormat /*"Дата передана в неверном формате"*/; ok = false; } } } else if (control is BizEditBool) { var edit = (BizEditBool)control; //edit.Attribute.Value = decimal.Parse(value.ToString()); if (value == null || String.IsNullOrEmpty(value.ToString())) { if (!onlyCheck) { edit.Value = null; } if (!onlyCheck && (edit.DocNotNull || edit.FormNotNull)) { message = FieldCannotBeNull; ok = false; } } else { bool result; if (value.ToString() == "true,false") { string temp = value.ToString(); value = temp.Substring(0, 4); } if (bool.TryParse(value.ToString(), out result)) { //TODO: дописить тут различные проверки для аттрибута (ограничения загружены в сам аттрибут) if (!onlyCheck) { edit.Value = result; } } else { message = Resources.Form.InvalidFormat /*"Значение передано в неверном формате"*/; ok = false; } } } else if (control is BizComboBox) { var combo = (BizComboBox)control; if (value == null || String.IsNullOrEmpty(value.ToString())) { if (!onlyCheck) { combo.Value = null; } if (!onlyCheck && (combo.DocNotNull || combo.FormNotNull)) { message = FieldCannotBeNull; ok = false; } } else { Guid result; if (Guid.TryParse(value.ToString(), out result)) { if (!onlyCheck) { combo.Value = result; } else { message = Resources.Form.InvalidFormat /*"Значение передано в неверном формате"*/; ok = false; } } } } //TODO: Дописать метод обновления для других обновляемых полей return(ok); }
public Doc GetDoc(BizForm form, Doc document) { var pm = Context.GetPresentationProxy(); return(pm.Proxy.GetFormDoc(form, document)); }
/// <summary> /// Возвращает список строк табличной формы с данными, формируемые из списочного атрибута документа /// </summary> /// <param name="count">Количество документов хранящихся в списочном атрибуте</param> /// <param name="form">Таличная форма</param> /// <param name="docId">Идентификатор документа, содержащего списочный атрибут</param> /// <param name="attrDefId">Идентификатор списочного атрибута</param> /// <param name="pageNo">Номер страницы</param> /// <param name="pageSize">Количество отображаемых строк в таблице</param> /// <returns>Список строк - визуальных элментов с данными</returns> public List <BizControl> GetDocListTableFormRows(out int count, BizForm form, Guid docId, Guid attrDefId, int pageNo, int pageSize) { return(FormRepo.GetDocListTableFormRows(out count, form, docId, attrDefId, pageNo, pageSize)); }
/// <summary> /// Creates poll answer section. /// </summary> /// <param name="reload">Indicates postback</param> /// <param name="hasVoted">Indicates if user has voted</param> protected void CreateAnswerSection(bool reload, bool hasVoted) { pnlAnswer.Controls.Clear(); if (pi != null) { // Get poll's answers DataSet ds = Answers; if (!DataHelper.DataSourceIsEmpty(ds)) { int count = 0; int maxCount = 0; long sumCount = 0; bool hideSomeForm = false; foreach (DataRow row in ds.Tables[0].Rows) { // Sum answer counts and get highest if (ValidationHelper.GetBoolean(row["AnswerEnabled"], true)) { count = ValidationHelper.GetInteger(row["AnswerCount"], 0); sumCount += count; if (count > maxCount) { maxCount = count; } } // Check if any open-ended answer form should be hidden if (ValidationHelper.GetBoolean(row["AnswerHideForm"], false)) { hideSomeForm = true; } } CMSCheckBox chkItem = null; CMSRadioButton radItem = null; LocalizedLabel lblItem = null; BizForm viewBiz = null; string formName = null; int index = 0; bool enabled = false; bool bizFormsAvailable = ModuleManager.IsModuleLoaded(ModuleName.BIZFORM) && ResourceSiteInfoProvider.IsResourceOnSite(ModuleName.BIZFORM, SiteContext.CurrentSiteName); pnlAnswer.Controls.Add(new LiteralControl("<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">")); // Create the answers foreach (DataRow row in ds.Tables[0].Rows) { enabled = ValidationHelper.GetBoolean(row["AnswerEnabled"], true); if (enabled) { pnlAnswer.Controls.Add(new LiteralControl("<tr><td class=\"PollAnswer\" colspan=\"2\">")); if (((reload) && (ShowResultsAfterVote)) || (!hasPermission && !HideWhenNotAuthorized) || (!isOpened && !HideWhenNotOpened) || (CheckVoted && PollInfoProvider.HasVoted(pi.PollID))) { // Add label lblItem = new LocalizedLabel(); lblItem.ID = "lbl" + ValidationHelper.GetInteger(row["AnswerID"], 0); lblItem.EnableViewState = false; lblItem.Text = HTMLHelper.HTMLEncode(ValidationHelper.GetString(row["AnswerText"], string.Empty)); lblItem.CssClass = "PollAnswerText"; pnlAnswer.Controls.Add(lblItem); } else { if (pi.PollAllowMultipleAnswers) { // Add checkboxes for multiple answers chkItem = new CMSCheckBox(); chkItem.ID = "chk" + ValidationHelper.GetInteger(row["AnswerID"], 0); chkItem.AutoPostBack = false; chkItem.Text = HTMLHelper.HTMLEncode(ValidationHelper.GetString(row["AnswerText"], string.Empty)); chkItem.Checked = false; chkItem.CssClass = "PollAnswerCheck"; if (hideSomeForm) { chkItem.AutoPostBack = true; chkItem.CheckedChanged += AnswerSelectionChanged; } pnlAnswer.Controls.Add(chkItem); } else { // Add radiobuttons radItem = new CMSRadioButton(); radItem.ID = "rad" + ValidationHelper.GetInteger(row["AnswerID"], 0); radItem.AutoPostBack = false; radItem.GroupName = pi.PollCodeName + "Group"; radItem.Text = HTMLHelper.HTMLEncode(ValidationHelper.GetString(row["AnswerText"], string.Empty)); radItem.Checked = false; radItem.CssClass = "PollAnswerRadio"; if (hideSomeForm) { radItem.AutoPostBack = true; radItem.CheckedChanged += AnswerSelectionChanged; } pnlAnswer.Controls.Add(radItem); } formName = ValidationHelper.GetString(row["AnswerForm"], string.Empty); if (!string.IsNullOrEmpty(formName) && bizFormsAvailable) { // Add forms for open ended answers viewBiz = new BizForm(); viewBiz.FormName = formName; viewBiz.SiteName = SiteContext.CurrentSiteName; viewBiz.AlternativeFormFullName = ValidationHelper.GetString(row["AnswerAlternativeForm"], string.Empty); viewBiz.ID = "frm" + ValidationHelper.GetInteger(row["AnswerID"], 0); viewBiz.IsLiveSite = IsLiveSite; viewBiz.OnAfterDataLoad += Form_AfterDataLoad; viewBiz.CssClass = "PollAnswerForm"; viewBiz.Visible = !ValidationHelper.GetBoolean(row["AnswerHideForm"], false); viewBiz.FormClearAfterSave = true; viewBiz.FormRedirectToUrl = String.Empty; viewBiz.FormDisplayText = String.Empty; pnlAnswer.Controls.Add(viewBiz); } } pnlAnswer.Controls.Add(new LiteralControl("</td></tr>")); if (ShowGraph || (hasVoted || reload) && ShowResultsAfterVote) { // Create graph under the answer CreateGraph(maxCount, ValidationHelper.GetInteger(row["AnswerCount"], 0), sumCount, index); } index++; } } pnlAnswer.Controls.Add(new LiteralControl("</table>")); } } }
public IList <EnumValue> GetFormComboBoxValues(BizForm form, BizComboBox comboBox) { // return FormRepo.GetFormComboBoxValueList(form, comboBox); return(_comboBoxValueProvider.GetFormComboBoxValues(form, comboBox)); }
public IList <ModelMessage> GetFormErrors(BizForm form, IList <ModelMessage> errors) { return(FormRepo.GetFormErrors(form, errors)); }
public int GetRefListTableFormRowCount(BizForm form, Guid docId, Guid attrDefId) { return(FormRepo.GetRefListTableFormRowCount(form, docId, attrDefId)); }
public List <BizControl> GetRefListTableFormRowData(BizForm form, Guid docId, Guid attrDefId, int pageNo, int pageSize) { return(FormRepo.GetRefListTableFormRows(form, docId, attrDefId, pageNo, pageSize)); }
public Doc GetDoc(BizForm form, Doc document) { return(document); }
public bool AddFieldValue(out string message, BizForm bizForm, Guid controlId, object value, bool onlyCheck) { message = ""; return(true); }
public int GetTableFormRowCountFromFilterQuery(BizForm form, QueryDef def, BizForm filter) { return(FormRepo.GetTableFormRowCount(form, def, filter)); }
/*public XlsGridDefBuilder(BizForm form, IEnumerable<Guid> docs, Guid userId) * { * Form = form; * UserId = userId; * DataSet = new DocFormDataSet(docs, form, userId); * }*/ public XlsGridDefBuilder(IDataContext dataContext, BizForm form, IEnumerable <Guid> docs, Guid userId) { Form = form; UserId = userId; DataSet = new DocFormDataSet(dataContext, docs, form, userId); }
/// <summary> /// Записывает значения атрибутов документа в форму /// </summary> /// <param name="form">Форма</param> /// <param name="document">Документ</param> /// <returns>Форма с данными</returns> public BizForm SetFormDoc(BizForm form, Doc document) { return((BizForm)FormRepo.SetFormDoc(form, document)); }
/// <summary> /// Возвращает список строк табличной формы с данными, формируемые из списка документов /// </summary> /// <param name="form">Табличная форма</param> /// <param name="docIds">Список идентификаторов документов, которые необходимо высветить в таблице</param> /// <param name="sortAttrs">Список атрибутов сортировки строк</param> /// <param name="pageNo">Номер страницы</param> /// <param name="pageSize">Количество строк в странице</param> /// <returns>Список строк - визуальных элментов с данными</returns> public List <BizControl> GetTableFormRowsFromList(BizForm form, IEnumerable <Guid> docIds, IEnumerable <AttributeSort> sortAttrs, int pageNo, int pageSize) { return(FormRepo.GetTableFormRows(form, docIds, sortAttrs, pageNo, pageSize)); }
/// <summary> /// On btnVote click event handler. /// </summary> protected void btnVote_OnClick(object sender, EventArgs e) { // Check banned ip if (!BannedIPInfoProvider.IsAllowed(SiteContext.CurrentSiteName, BanControlEnum.AllNonComplete)) { lblInfo.CssClass = "ErrorMessage"; lblInfo.Text = GetString("General.BannedIP"); return; } if (pi != null) { // Indicates whether user voted or not bool voted = false; // Indicates wheter all forms of all open-ended answers can be saved bool formsAreValid = true; List <int> selectedAnswers = new List <int>(); // Check if user has already voted if ((CheckVoted) && (PollInfoProvider.HasVoted(pi.PollID))) { errMessage = GetString("Polls.UserHasVoted"); voted = true; } else if (isOpened) { // Get poll answers DataSet ds = Answers; if (!DataHelper.DataSourceIsEmpty(ds)) { DataRowCollection rows = ds.Tables[0].Rows; CMSCheckBox chkItem = null; CMSRadioButton radItem = null; bool selected = false; PollAnswerInfo pai = null; BizForm bizItem = null; foreach (DataRow row in rows) { pai = new PollAnswerInfo(row); if ((pai != null) && (pai.AnswerEnabled)) { selected = false; // Find specific controls and update pollanswerinfo if controls are checked if (pi.PollAllowMultipleAnswers) { // Find checkbox chkItem = (CMSCheckBox)pnlAnswer.FindControl("chk" + pai.AnswerID); if (chkItem != null) { selected = chkItem.Checked; } } else { // Find radiobutton radItem = (CMSRadioButton)pnlAnswer.FindControl("rad" + pai.AnswerID); if (radItem != null) { selected = radItem.Checked; } } if ((selected) && (pai.AnswerCount < Int32.MaxValue)) { bool canBeSaved = false; bizItem = (BizForm)pnlAnswer.FindControl("frm" + pai.AnswerID); if (bizItem == null) { canBeSaved = true; } else if (bizItem != null) { // Validate form data canBeSaved = bizItem.ValidateData(); } if (canBeSaved) { selectedAnswers.Add(pai.AnswerID); } else { formsAreValid = false; } } } } if (formsAreValid) { if (selectedAnswers.Count > 0) { foreach (int aid in selectedAnswers) { // Set the vote PollAnswerInfoProvider.Vote(aid); // Save the bizform data bizItem = (BizForm)pnlAnswer.FindControl("frm" + aid); if (bizItem != null) { if (bizItem != null) { bizItem.SaveData(null, false); } } } voted = true; } else { // Set error message if no answer selected lblInfo.CssClass = "ErrorMessage"; lblInfo.Text = GetString("Polls.DidNotVoted"); } } if (voted) { LogActivity(pi, selectedAnswers); } if ((CheckVoted) && (voted)) { // Create cookie about user's voting PollInfoProvider.SetVoted(pi.PollID); } } } if (voted) { // Clear cache if it's used Answers = null; // Reload poll control ReloadData(true); if (OnAfterVoted != null) { OnAfterVoted(this, EventArgs.Empty); } } } }
/// <summary> /// Записывает значения из формы в документ /// </summary> /// <param name="form">Форма</param> /// <param name="document">Документ</param> /// <returns>Измененный документ</returns> public Doc GetFormDoc(BizForm form, Doc document) { return(FormRepo.GetFormDoc(form, document)); }