Ejemplo n.º 1
0
 public GovInteractContentInfo()
 {
     DepartmentName = string.Empty;
     QueryCode      = GovInteractApplyManager.GetQueryCode();
     State          = EGovInteractState.New;
     IpAddress      = PageUtils.GetIpAddress();
     AddDate        = DateTime.Now;
 }
Ejemplo n.º 2
0
        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);
        }