public GovInteractContentInfo() { DepartmentName = string.Empty; QueryCode = GovInteractApplyManager.GetQueryCode(); State = EGovInteractState.New; IpAddress = PageUtils.GetIpAddress(); AddDate = DateTime.Now; }
public GovInteractContentInfo GetContentInfo(PublishmentSystemInfo publishmentSystemInfo, int nodeId, NameValueCollection form) { var queryCode = GovInteractApplyManager.GetQueryCode(); var departmentId = TranslateUtils.ToInt(form[GovInteractContentAttribute.DepartmentId]); var departmentName = string.Empty; if (departmentId > 0) { departmentName = DepartmentManager.GetDepartmentName(departmentId); } var ipAddress = PageUtils.GetIpAddress(); var contentInfo = new GovInteractContentInfo(); contentInfo.PublishmentSystemId = publishmentSystemInfo.PublishmentSystemId; contentInfo.NodeId = nodeId; contentInfo.DepartmentName = departmentName; contentInfo.QueryCode = queryCode; contentInfo.State = EGovInteractState.New; contentInfo.AddUserName = string.Empty; contentInfo.IpAddress = ipAddress; contentInfo.AddDate = DateTime.Now; var relatedIdentities = RelatedIdentities.GetChannelRelatedIdentities(publishmentSystemInfo.PublishmentSystemId, nodeId); InputTypeParser.AddValuesToAttributes(ETableStyle.GovInteractContent, publishmentSystemInfo.AuxiliaryTableForGovInteract, publishmentSystemInfo, relatedIdentities, form, contentInfo.Attributes); //foreach (string name in form.AllKeys) //{ // if (!GovInteractContentAttribute.HiddenAttributes.Contains(name.ToLower())) // { // string value = form[name]; // if (!string.IsNullOrEmpty(value)) // { // applyInfo.SetExtendedAttribute(name, value); // } // } //} return(contentInfo); }