Beispiel #1
0
        private void RptContents_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType != ListItemType.Item && e.Item.ItemType != ListItemType.AlternatingItem)
            {
                return;
            }

            var userId       = SqlUtils.EvalInt(e.Item.DataItem, nameof(AdministratorInfo.Id));
            var userName     = SqlUtils.EvalString(e.Item.DataItem, nameof(AdministratorInfo.UserName));
            var displayName  = SqlUtils.EvalString(e.Item.DataItem, nameof(AdministratorInfo.DisplayName));
            var mobile       = SqlUtils.EvalString(e.Item.DataItem, nameof(AdministratorInfo.Mobile));
            var avatarUrl    = SqlUtils.EvalString(e.Item.DataItem, nameof(AdministratorInfo.AvatarUrl));
            var departmentId = SqlUtils.EvalInt(e.Item.DataItem, nameof(AdministratorInfo.DepartmentId));
            var areaId       = SqlUtils.EvalInt(e.Item.DataItem, nameof(AdministratorInfo.AreaId));

            if (string.IsNullOrEmpty(displayName))
            {
                displayName = userName;
            }
            var countOfFailedLogin = SqlUtils.EvalInt(e.Item.DataItem, nameof(AdministratorInfo.CountOfFailedLogin));
            var countOfLogin       = SqlUtils.EvalInt(e.Item.DataItem, nameof(AdministratorInfo.CountOfLogin));
            var isLockedOut        = SqlUtils.EvalBool(e.Item.DataItem, nameof(AdministratorInfo.IsLockedOut));
            var lastActivityDate   = SqlUtils.EvalDateTime(e.Item.DataItem, nameof(AdministratorInfo.LastActivityDate));

            var ltlAvatar           = (Literal)e.Item.FindControl("ltlAvatar");
            var ltlUserName         = (Literal)e.Item.FindControl("ltlUserName");
            var ltlDisplayName      = (Literal)e.Item.FindControl("ltlDisplayName");
            var ltlMobile           = (Literal)e.Item.FindControl("ltlMobile");
            var ltlDepartment       = (Literal)e.Item.FindControl("ltlDepartment");
            var ltlArea             = (Literal)e.Item.FindControl("ltlArea");
            var ltlLastActivityDate = (Literal)e.Item.FindControl("ltlLastActivityDate");
            var ltlCountOfLogin     = (Literal)e.Item.FindControl("ltlCountOfLogin");
            var ltlRoles            = (Literal)e.Item.FindControl("ltlRoles");
            var ltlActions          = (Literal)e.Item.FindControl("ltlActions");
            var ltlSelect           = (Literal)e.Item.FindControl("ltlSelect");

            ltlAvatar.Text      = $@"<img src=""{(!string.IsNullOrEmpty(avatarUrl) ? avatarUrl : "../assets/images/default_avatar.png")}"" class=""rounded-circle"" style=""height: 36px; width: 36px;""/>";
            ltlUserName.Text    = GetUserNameHtml(userId, userName, countOfFailedLogin, isLockedOut, lastActivityDate);
            ltlDisplayName.Text = displayName;
            ltlMobile.Text      = mobile;
            ltlDepartment.Text  = DepartmentManager.GetDepartmentName(departmentId);
            ltlArea.Text        = AreaManager.GetAreaName(areaId);

            ltlLastActivityDate.Text = GetDateTime(lastActivityDate);
            ltlCountOfLogin.Text     = countOfLogin.ToString();
            ltlRoles.Text            = AdminManager.GetRolesHtml(userName);

            if (AuthRequest.AdminName != userName)
            {
                ltlActions.Text = ConfigHelper.GetConfigBool("IsSso") ? $@"
<a class=""m-r-5"" href=""javascript:;"" onclick=""{ModalPermissionsSet.GetOpenWindowString(userName)}"">权限设置</a>
" : $@"
<a class=""m-r-5"" href=""adminProfile.cshtml?pageType=admin&userId={userId}"">修改资料</a>
<a class=""m-r-5"" href=""adminPassword.cshtml?pageType=admin&userId={userId}"">更改密码</a>
<a class=""m-r-5"" href=""javascript:;"" onclick=""{ModalPermissionsSet.GetOpenWindowString(userName)}"">权限设置</a>
";

                ltlSelect.Text = $@"<input type=""checkbox"" name=""UserNameCollection"" value=""{userName}"" />";
            }
        }
Beispiel #2
0
        private void RptContents_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType != ListItemType.Item && e.Item.ItemType != ListItemType.AlternatingItem)
            {
                return;
            }

            var userName     = SqlUtils.EvalString(e.Item.DataItem, nameof(AdministratorInfo.UserName));
            var displayName  = SqlUtils.EvalString(e.Item.DataItem, nameof(AdministratorInfo.DisplayName));
            var mobile       = SqlUtils.EvalString(e.Item.DataItem, nameof(AdministratorInfo.Mobile));
            var departmentId = SqlUtils.EvalInt(e.Item.DataItem, nameof(AdministratorInfo.DepartmentId));
            var areaId       = SqlUtils.EvalInt(e.Item.DataItem, nameof(AdministratorInfo.AreaId));

            if (string.IsNullOrEmpty(displayName))
            {
                displayName = userName;
            }
            var countOfFailedLogin = SqlUtils.EvalInt(e.Item.DataItem, nameof(AdministratorInfo.CountOfFailedLogin));
            var countOfLogin       = SqlUtils.EvalInt(e.Item.DataItem, nameof(AdministratorInfo.CountOfLogin));
            var isLockedOut        = SqlUtils.EvalBool(e.Item.DataItem, nameof(AdministratorInfo.IsLockedOut));
            var lastActivityDate   = SqlUtils.EvalDateTime(e.Item.DataItem, nameof(AdministratorInfo.LastActivityDate));

            var ltlUserName         = (Literal)e.Item.FindControl("ltlUserName");
            var ltlDisplayName      = (Literal)e.Item.FindControl("ltlDisplayName");
            var ltlMobile           = (Literal)e.Item.FindControl("ltlMobile");
            var ltlDepartment       = (Literal)e.Item.FindControl("ltlDepartment");
            var ltlArea             = (Literal)e.Item.FindControl("ltlArea");
            var ltlLastActivityDate = (Literal)e.Item.FindControl("ltlLastActivityDate");
            var ltlCountOfLogin     = (Literal)e.Item.FindControl("ltlCountOfLogin");
            var ltlRoles            = (Literal)e.Item.FindControl("ltlRoles");
            var ltlEdit             = (Literal)e.Item.FindControl("ltlEdit");
            var hlChangePassword    = (HyperLink)e.Item.FindControl("hlChangePassword");
            var ltlRole             = (Literal)e.Item.FindControl("ltlRole");
            var ltlSelect           = (Literal)e.Item.FindControl("ltlSelect");

            ltlUserName.Text    = GetUserNameHtml(userName, countOfFailedLogin, isLockedOut, lastActivityDate);
            ltlDisplayName.Text = displayName;
            ltlMobile.Text      = mobile;
            ltlDepartment.Text  = DepartmentManager.GetDepartmentName(departmentId);
            ltlArea.Text        = AreaManager.GetAreaName(areaId);

            ltlLastActivityDate.Text = GetDateTime(lastActivityDate);
            ltlCountOfLogin.Text     = countOfLogin.ToString();
            ltlRoles.Text            = AdminManager.GetRolesHtml(userName);

            var urlEdit = PageAdministratorAdd.GetRedirectUrlToEdit(departmentId, userName);

            ltlEdit.Text = $@"<a href=""{urlEdit}"">修改属性</a>";
            hlChangePassword.Attributes.Add("onclick", ModalAdminPassword.GetOpenWindowString(userName));

            if (AuthRequest.AdminName != userName)
            {
                var openWindowString = ModalPermissionsSet.GetOpenWindowString(userName);
                ltlRole.Text   = $@"<a href=""javascript:;"" onclick=""{openWindowString}"">权限设置</a>";
                ltlSelect.Text = $@"<input type=""checkbox"" name=""UserNameCollection"" value=""{userName}"" />";
            }
        }
Beispiel #3
0
        void rptContents_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                var userName     = SqlUtils.EvalString(e.Item.DataItem, "UserName");
                var displayName  = SqlUtils.EvalString(e.Item.DataItem, "DisplayName");
                var mobile       = SqlUtils.EvalString(e.Item.DataItem, "Mobile");
                var departmentId = SqlUtils.EvalInt(e.Item.DataItem, "DepartmentID");
                var areaId       = SqlUtils.EvalInt(e.Item.DataItem, "AreaID");
                if (string.IsNullOrEmpty(displayName))
                {
                    displayName = userName;
                }
                var departmentName = string.Empty;
                if (_departmentInfo != null)
                {
                    departmentName = _departmentInfo.DepartmentName;
                }
                else if (departmentId > 0)
                {
                    departmentName = DepartmentManager.GetDepartmentName(departmentId);
                }
                var countOfFailedLogin = SqlUtils.EvalInt(e.Item.DataItem, "CountOfFailedLogin");
                var isLockedOut        = SqlUtils.EvalBool(e.Item.DataItem, "IsLockedOut");
                var lastActivityDate   = SqlUtils.EvalDateTime(e.Item.DataItem, "LastActivityDate");

                var ltlUserName      = (Literal)e.Item.FindControl("ltlUserName");
                var ltlDisplayName   = (Literal)e.Item.FindControl("ltlDisplayName");
                var ltlMobile        = (Literal)e.Item.FindControl("ltlMobile");
                var ltlDepartment    = (Literal)e.Item.FindControl("ltlDepartment");
                var ltlArea          = (Literal)e.Item.FindControl("ltlArea");
                var ltlEdit          = (Literal)e.Item.FindControl("ltlEdit");
                var hlChangePassword = (HyperLink)e.Item.FindControl("hlChangePassword");
                var ltlRole          = (Literal)e.Item.FindControl("ltlRole");
                var ltlSelect        = (Literal)e.Item.FindControl("ltlSelect");

                ltlUserName.Text    = GetUserNameHtml(userName, countOfFailedLogin, isLockedOut, lastActivityDate);
                ltlDisplayName.Text = displayName;
                ltlMobile.Text      = mobile;
                ltlDepartment.Text  = departmentName;
                ltlArea.Text        = AreaManager.GetAreaName(areaId);

                var urlEdit = PageAdministratorAdd.GetRedirectUrlToEdit(departmentId, userName);
                ltlEdit.Text = $@"<a href=""{urlEdit}"">修改属性</a>";
                hlChangePassword.Attributes.Add("onclick", ModalAdminPassword.GetOpenWindowString(userName));

                if (Body.AdministratorName != userName)
                {
                    var openWindowString = ModalPermissionsSet.GetOpenWindowString(userName);
                    ltlRole.Text   = $@"<a href=""javascript:;"" onclick=""{openWindowString}"">权限设置</a>";
                    ltlSelect.Text = $@"<input type=""checkbox"" name=""UserNameCollection"" value=""{userName}"" />";
                }
            }
        }
Beispiel #4
0
 public CommentInfo(object dataItem)
 {
     Id = SqlUtils.EvalInt(dataItem, "ID");
     PublishmentSystemId = SqlUtils.EvalInt(dataItem, "PublishmentSystemID");
     NodeId    = SqlUtils.EvalInt(dataItem, "NodeID");
     ContentId = SqlUtils.EvalInt(dataItem, "ContentID");
     GoodCount = SqlUtils.EvalInt(dataItem, "GoodCount");
     UserName  = SqlUtils.EvalString(dataItem, "UserName");
     IsChecked = SqlUtils.EvalBool(dataItem, "IsChecked");
     AddDate   = SqlUtils.EvalDateTime(dataItem, "AddDate");
     Content   = SqlUtils.EvalString(dataItem, "Content");
 }
Beispiel #5
0
 public UserInfo(object dataItem)
 {
     if (dataItem == null)
     {
         return;
     }
     UserId                = SqlUtils.EvalInt(dataItem, "UserID");
     UserName              = SqlUtils.EvalString(dataItem, "UserName");
     Password              = SqlUtils.EvalString(dataItem, "Password");
     PasswordFormat        = SqlUtils.EvalString(dataItem, "PasswordFormat");
     PasswordSalt          = SqlUtils.EvalString(dataItem, "PasswordSalt");
     GroupId               = SqlUtils.EvalInt(dataItem, "GroupID");
     CreateDate            = SqlUtils.EvalDateTime(dataItem, "CreateDate");
     LastResetPasswordDate = SqlUtils.EvalDateTime(dataItem, "LastResetPasswordDate");
     LastActivityDate      = SqlUtils.EvalDateTime(dataItem, "LastActivityDate");
     CountOfLogin          = SqlUtils.EvalInt(dataItem, "CountOfLogin");
     CountOfFailedLogin    = SqlUtils.EvalInt(dataItem, "CountOfFailedLogin");
     CountOfWriting        = SqlUtils.EvalInt(dataItem, "CountOfWriting");
     IsChecked             = SqlUtils.EvalBool(dataItem, "IsChecked");
     IsLockedOut           = SqlUtils.EvalBool(dataItem, "IsLockedOut");
     DisplayName           = SqlUtils.EvalString(dataItem, "DisplayName");
     Email        = SqlUtils.EvalString(dataItem, "Email");
     Mobile       = SqlUtils.EvalString(dataItem, "Mobile");
     AvatarUrl    = SqlUtils.EvalString(dataItem, "AvatarUrl");
     Organization = SqlUtils.EvalString(dataItem, "Organization");
     Department   = SqlUtils.EvalString(dataItem, "Department");
     Position     = SqlUtils.EvalString(dataItem, "Position");
     Gender       = SqlUtils.EvalString(dataItem, "Gender");
     Birthday     = SqlUtils.EvalString(dataItem, "Birthday");
     Education    = SqlUtils.EvalString(dataItem, "Education");
     Graduation   = SqlUtils.EvalString(dataItem, "Graduation");
     Address      = SqlUtils.EvalString(dataItem, "Address");
     WeiXin       = SqlUtils.EvalString(dataItem, "WeiXin");
     Qq           = SqlUtils.EvalString(dataItem, "QQ");
     WeiBo        = SqlUtils.EvalString(dataItem, "WeiBo");
     Interests    = SqlUtils.EvalString(dataItem, "Interests");
     Signature    = SqlUtils.EvalString(dataItem, "Signature");
 }
Beispiel #6
0
 public UserInfo(object dataItem)
 {
     if (dataItem == null)
     {
         return;
     }
     Id                    = SqlUtils.EvalInt(dataItem, nameof(Id));
     UserName              = SqlUtils.EvalString(dataItem, nameof(UserName));
     Password              = SqlUtils.EvalString(dataItem, nameof(Password));
     PasswordFormat        = SqlUtils.EvalString(dataItem, nameof(PasswordFormat));
     PasswordSalt          = SqlUtils.EvalString(dataItem, nameof(PasswordSalt));
     CreateDate            = SqlUtils.EvalDateTime(dataItem, nameof(CreateDate));
     LastResetPasswordDate = SqlUtils.EvalDateTime(dataItem, nameof(LastResetPasswordDate));
     LastActivityDate      = SqlUtils.EvalDateTime(dataItem, nameof(LastActivityDate));
     CountOfLogin          = SqlUtils.EvalInt(dataItem, nameof(CountOfLogin));
     CountOfFailedLogin    = SqlUtils.EvalInt(dataItem, nameof(CountOfFailedLogin));
     CountOfWriting        = SqlUtils.EvalInt(dataItem, nameof(CountOfWriting));
     IsChecked             = SqlUtils.EvalBool(dataItem, nameof(IsChecked));
     IsLockedOut           = SqlUtils.EvalBool(dataItem, nameof(IsLockedOut));
     DisplayName           = SqlUtils.EvalString(dataItem, nameof(DisplayName));
     Email                 = SqlUtils.EvalString(dataItem, nameof(Email));
     Mobile                = SqlUtils.EvalString(dataItem, nameof(Mobile));
     AvatarUrl             = SqlUtils.EvalString(dataItem, nameof(AvatarUrl));
     Organization          = SqlUtils.EvalString(dataItem, nameof(Organization));
     Department            = SqlUtils.EvalString(dataItem, nameof(Department));
     Position              = SqlUtils.EvalString(dataItem, nameof(Position));
     Gender                = SqlUtils.EvalString(dataItem, nameof(Gender));
     Birthday              = SqlUtils.EvalString(dataItem, nameof(Birthday));
     Education             = SqlUtils.EvalString(dataItem, nameof(Education));
     Graduation            = SqlUtils.EvalString(dataItem, nameof(Graduation));
     Address               = SqlUtils.EvalString(dataItem, nameof(Address));
     WeiXin                = SqlUtils.EvalString(dataItem, nameof(WeiXin));
     Qq                    = SqlUtils.EvalString(dataItem, nameof(Qq));
     WeiBo                 = SqlUtils.EvalString(dataItem, nameof(WeiBo));
     Interests             = SqlUtils.EvalString(dataItem, nameof(Interests));
     Signature             = SqlUtils.EvalString(dataItem, nameof(Signature));
 }
Beispiel #7
0
        private void rptContents_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType != ListItemType.Item && e.Item.ItemType != ListItemType.AlternatingItem)
            {
                return;
            }

            if (e.Item.DataItem == null)
            {
                return;
            }

            var id                 = SqlUtils.EvalInt(e.Item.DataItem, nameof(UserInfo.Id));
            var userName           = SqlUtils.EvalString(e.Item.DataItem, nameof(UserInfo.UserName));
            var createDate         = SqlUtils.EvalDateTime(e.Item.DataItem, nameof(UserInfo.CreateDate));
            var lastActivityDate   = SqlUtils.EvalDateTime(e.Item.DataItem, nameof(UserInfo.LastActivityDate));
            var countOfLogin       = SqlUtils.EvalInt(e.Item.DataItem, nameof(UserInfo.CountOfLogin));
            var countOfFailedLogin = SqlUtils.EvalInt(e.Item.DataItem, nameof(UserInfo.CountOfFailedLogin));
            var groupId            = SqlUtils.EvalInt(e.Item.DataItem, nameof(UserInfo.GroupId));
            var isChecked          = SqlUtils.EvalBool(e.Item.DataItem, nameof(UserInfo.IsChecked));
            var isLockedOut        = SqlUtils.EvalBool(e.Item.DataItem, nameof(UserInfo.IsLockedOut));
            var displayName        = SqlUtils.EvalString(e.Item.DataItem, nameof(UserInfo.DisplayName));
            var email              = SqlUtils.EvalString(e.Item.DataItem, nameof(UserInfo.Email));
            var mobile             = SqlUtils.EvalString(e.Item.DataItem, nameof(UserInfo.Mobile));

            var ltlUserName      = (Literal)e.Item.FindControl("ltlUserName");
            var ltlEmail         = (Literal)e.Item.FindControl("ltlEmail");
            var ltlMobile        = (Literal)e.Item.FindControl("ltlMobile");
            var ltlGroupName     = (Literal)e.Item.FindControl("ltlGroupName");
            var ltlLoginCount    = (Literal)e.Item.FindControl("ltlLoginCount");
            var ltlCreationDate  = (Literal)e.Item.FindControl("ltlCreationDate");
            var ltlSelect        = (Literal)e.Item.FindControl("ltlSelect");
            var hlChangePassword = (HyperLink)e.Item.FindControl("hlChangePassword");
            var hlEditLink       = (HyperLink)e.Item.FindControl("hlEditLink");

            var showPopWinString = ModalUserView.GetOpenWindowString(userName);
            var state            = isChecked ? string.Empty : @"<span style=""color:red;"">[待审核]</span>";

            if (isLockedOut)
            {
                state += @"<span style=""color:red;"">[已锁定]</span>";
            }
            else if (ConfigManager.SystemConfigInfo.IsUserLockLogin &&
                     ConfigManager.SystemConfigInfo.UserLockLoginCount <= countOfFailedLogin)
            {
                if (_lockType == EUserLockType.Forever)
                {
                    state += @"<span style=""color:red;"">[已锁定]</span>";
                }
                else
                {
                    var ts    = new TimeSpan(DateTime.Now.Ticks - lastActivityDate.Ticks);
                    var hours = Convert.ToInt32(ConfigManager.SystemConfigInfo.UserLockLoginHours - ts.TotalHours);
                    if (hours > 0)
                    {
                        state += $@"<span style=""color:red;"">[已锁定{hours}小时]</span>";
                    }
                }
            }

            ltlUserName.Text = $@"<a href=""javascript:;"" onclick=""{showPopWinString}"">{userName}</a> {state}";

            if (!string.IsNullOrEmpty(displayName))
            {
                ltlUserName.Text += $"({displayName})";
            }
            ltlEmail.Text        = email;
            ltlMobile.Text       = mobile;
            ltlGroupName.Text    = UserGroupManager.GetUserGroupInfo(groupId).GroupName;
            ltlLoginCount.Text   = countOfLogin.ToString();
            ltlCreationDate.Text = DateUtils.GetDateAndTimeString(createDate);

            hlEditLink.NavigateUrl = PageUserAdd.GetRedirectUrlToEdit(id, GetRedirectUrl());
            hlChangePassword.Attributes.Add("onclick", ModalUserPassword.GetOpenWindowString(userName));
            ltlSelect.Text = $@"<input type=""checkbox"" name=""UserIDCollection"" value=""{id}"" />";
        }
Beispiel #8
0
        private void DgContents_ItemDataBound(object sender, DataGridItemEventArgs e)
        {
            if (e.Item.ItemType != ListItemType.Item && e.Item.ItemType != ListItemType.AlternatingItem)
            {
                return;
            }

            var inputId   = SqlUtils.EvalInt(e.Item.DataItem, "InputID");
            var inputName = SqlUtils.EvalString(e.Item.DataItem, "InputName");
            var isChecked = SqlUtils.EvalBool(e.Item.DataItem, "IsChecked");
            var isIsReply = SqlUtils.EvalBool(e.Item.DataItem, "IsReply");

            var ltlTitle      = (Literal)e.Item.FindControl("ltlTitle");
            var ltlIsCheck    = (Literal)e.Item.FindControl("ltlIsCheck");
            var ltlIsReply    = (Literal)e.Item.FindControl("ltlIsReply");
            var ltlUpLink     = (Literal)e.Item.FindControl("ltlUpLink");
            var ltlDownLink   = (Literal)e.Item.FindControl("ltlDownLink");
            var ltlStyleUrl   = (Literal)e.Item.FindControl("ltlStyleUrl");
            var ltlPreviewUrl = (Literal)e.Item.FindControl("ltlPreviewUrl");
            var ltlEditUrl    = (Literal)e.Item.FindControl("ltlEditUrl");
            var ltlExportUrl  = (Literal)e.Item.FindControl("ltlExportUrl");
            var ltlDeleteUrl  = (Literal)e.Item.FindControl("ltlDeleteUrl");

            ltlTitle.Text   = $@"<a href=""{PageInputContent.GetRedirectUrl(PublishmentSystemId, inputName)}"">{inputName}</a>";
            ltlIsCheck.Text = StringUtils.GetTrueImageHtml(!isChecked);
            ltlIsReply.Text = StringUtils.GetTrueImageHtml(isIsReply);

            var urlUp = PageUtils.GetCmsUrl(nameof(PageInput), new NameValueCollection
            {
                { "PublishmentSystemID", PublishmentSystemId.ToString() },
                { "InputID", inputId.ToString() },
                { "Up", true.ToString() }
            });

            ltlUpLink.Text = $@"<a href=""{urlUp}""><img src=""../Pic/icon/up.gif"" border=""0"" alt=""上升"" /></a>";

            var urlDown = PageUtils.GetCmsUrl(nameof(PageInput), new NameValueCollection
            {
                { "PublishmentSystemID", PublishmentSystemId.ToString() },
                { "InputID", inputId.ToString() },
                { "Down", true.ToString() }
            });

            ltlDownLink.Text =
                $@"<a href=""{urlDown}""><img src=""../Pic/icon/down.gif"" border=""0"" alt=""下降"" /></a>";

            ltlStyleUrl.Text =
                $@"<a href=""{PageTableStyle.GetRedirectUrl(PublishmentSystemId, ETableStyle.InputContent,
                    DataProvider.InputContentDao.TableName, inputId)}"">表单字段</a>";

            ltlPreviewUrl.Text = $@"<a href=""{PageInputPreview.GetRedirectUrl(PublishmentSystemId, inputId, string.Empty)}"">预览</a>";

            ltlEditUrl.Text =
                $@"<a href=""javascript:;"" onclick=""{ModalInputAdd.GetOpenWindowStringToEdit(
                    PublishmentSystemId, inputId, false)}"">编辑</a>";

            ltlExportUrl.Text =
                $@"<a href=""javascript:;"" onclick=""{ModalExportMessage.GetOpenWindowStringToInput(
                    PublishmentSystemId, inputId)}"">导出</a>";

            var urlDelete = PageUtils.GetCmsUrl(nameof(PageInput), new NameValueCollection
            {
                { "PublishmentSystemID", PublishmentSystemId.ToString() },
                { "InputID", inputId.ToString() },
                { "Delete", true.ToString() }
            });

            ltlDeleteUrl.Text = $@"<a href=""{urlDelete}"" onClick=""javascript:return confirm('此操作将删除提交表单“{inputName}”及相关数据,确认吗?');"">删除</a> </ItemTemplate>";
        }
Beispiel #9
0
 public UserInfo(object dataItem)
 {
     if (dataItem == null)
     {
         return;
     }
     UserId                = SqlUtils.EvalInt(dataItem, "UserID");
     UserName              = SqlUtils.EvalString(dataItem, "UserName");
     Password              = SqlUtils.EvalString(dataItem, "Password");
     PasswordFormat        = SqlUtils.EvalString(dataItem, "PasswordFormat");
     PasswordSalt          = SqlUtils.EvalString(dataItem, "PasswordSalt");
     GroupId               = SqlUtils.EvalInt(dataItem, "GroupID");
     CreateDate            = SqlUtils.EvalDateTime(dataItem, "CreateDate");
     LastResetPasswordDate = SqlUtils.EvalDateTime(dataItem, "LastResetPasswordDate");
     LastActivityDate      = SqlUtils.EvalDateTime(dataItem, "LastActivityDate");
     CountOfLogin          = SqlUtils.EvalInt(dataItem, "CountOfLogin");
     CountOfFailedLogin    = SqlUtils.EvalInt(dataItem, "CountOfFailedLogin");
     CountOfWriting        = SqlUtils.EvalInt(dataItem, "CountOfWriting");
     IsChecked             = SqlUtils.EvalBool(dataItem, "IsChecked");
     IsLockedOut           = SqlUtils.EvalBool(dataItem, "IsLockedOut");
     DisplayName           = SqlUtils.EvalString(dataItem, "DisplayName");
     Email               = SqlUtils.EvalString(dataItem, "Email");
     Mobile              = SqlUtils.EvalString(dataItem, "Mobile");
     AvatarUrl           = SqlUtils.EvalString(dataItem, "AvatarUrl");
     Organization        = SqlUtils.EvalString(dataItem, "Organization");
     Department          = SqlUtils.EvalString(dataItem, "Department");
     Position            = SqlUtils.EvalString(dataItem, "Position");
     Gender              = SqlUtils.EvalString(dataItem, "Gender");
     Birthday            = SqlUtils.EvalString(dataItem, "Birthday");
     Education           = SqlUtils.EvalString(dataItem, "Education");
     Graduation          = SqlUtils.EvalString(dataItem, "Graduation");
     Address             = SqlUtils.EvalString(dataItem, "Address");
     WeiXin              = SqlUtils.EvalString(dataItem, "WeiXin");
     Qq                  = SqlUtils.EvalString(dataItem, "QQ");
     WeiBo               = SqlUtils.EvalString(dataItem, "WeiBo");
     Interests           = SqlUtils.EvalString(dataItem, "Interests");
     Signature           = SqlUtils.EvalString(dataItem, "Signature");
     PositiveEnergyValue = SqlUtils.EvalInt(dataItem, "PositiveEnergyValue");
     FlowPartyMember     = SqlUtils.EvalInt(dataItem, "FlowPartyMember");
     PublishmentSystemId = SqlUtils.EvalInt(dataItem, "PublishmentSystemId");
     //public int UserId { get; set; }
     //public string TelePhone { get; set; }
     //public string EmergencyName { get; set; }
     //public string EmergencyMobile { get; set; }
     //public string EmergencyRalationShip { get; set; }
     //public string PostalAddress { get; set; }
     //public string ExtraContactWay { get; set; }
     //public string PersonalSatus { get; set; }
     //public string Education { get; set; }
     //public string Degree { get; set; }
     //public string WorkTime { get; set; }
     //public string FirstSituation { get; set; }
     //public string NewStratum { get; set; }
     //public string TechnicalPost { get; set; }
     //public string WorkPlace { get; set; }
     //public string WorkAttribute { get; set; }
     //public string EnterPriseType { get; set; }
     //public string EnterPriseScale { get; set; }
     //public string MediumOrganizationType { get; set; }
     //public DateTime JoinPartyTime { get; set; }
     //public DateTime JoinTime { get; set; }
     //public DateTime ApplyJoinPartyTime { get; set; }
     //public DateTime ConfirmActiveTime { get; set; }
     //public DateTime ConversionTime { get; set; }
     //public DateTime GoOutTime { get; set; }
     //public DateTime GoOutIssuingTime { get; set; }
     //public string GoOutPlace { get; set; }
     //public string GoOutReason { get; set; }
     //public string PartyMemberAdd { get; set; }
     //public DateTime PartyMemberAddTime { get; set; }
     //public string HomeAddress { get; set; }
     //public string Resume { get; set; }
     //public string Remarks { get; set; }
     Additional.UserId                 = SqlUtils.EvalInt(dataItem, "UserID");
     Additional.TelePhone              = SqlUtils.EvalString(dataItem, "TelePhone");
     Additional.EmergencyName          = SqlUtils.EvalString(dataItem, "EmergencyName");
     Additional.EmergencyMobile        = SqlUtils.EvalString(dataItem, "EmergencyMobile");
     Additional.EmergencyRalationShip  = SqlUtils.EvalString(dataItem, "EmergencyRalationShip");
     Additional.PostalAddress          = SqlUtils.EvalString(dataItem, "PostalAddress");
     Additional.ExtraContactWay        = SqlUtils.EvalString(dataItem, "ExtraContactWay");
     Additional.PersonalSatus          = SqlUtils.EvalString(dataItem, "PersonalSatus");
     Additional.Education              = SqlUtils.EvalString(dataItem, "Education");
     Additional.Degree                 = SqlUtils.EvalString(dataItem, "Degree");
     Additional.WorkTime               = SqlUtils.EvalString(dataItem, "WorkTime");
     Additional.NewStratum             = SqlUtils.EvalString(dataItem, "NewStratum");
     Additional.TechnicalPost          = SqlUtils.EvalString(dataItem, "TechnicalPost");
     Additional.WorkPlace              = SqlUtils.EvalString(dataItem, "WorkPlace");
     Additional.WorkAttribute          = SqlUtils.EvalString(dataItem, "WorkAttribute");
     Additional.EnterPriseType         = SqlUtils.EvalString(dataItem, "EnterPriseType");
     Additional.EnterPriseScale        = SqlUtils.EvalString(dataItem, "EnterPriseScale");
     Additional.MediumOrganizationType = SqlUtils.EvalString(dataItem, "MediumOrganizationType");
     Additional.JoinPartyTime          = SqlUtils.EvalString(dataItem, "JoinPartyTime");
     Additional.JoinTime               = SqlUtils.EvalString(dataItem, "JoinTime");
     Additional.ApplyJoinPartyTime     = SqlUtils.EvalString(dataItem, "ApplyJoinPartyTime");
     Additional.ConfirmActiveTime      = SqlUtils.EvalString(dataItem, "ConfirmActiveTime");
     Additional.ConversionTime         = SqlUtils.EvalString(dataItem, "ConversionTime");
     Additional.GoOutTime              = SqlUtils.EvalString(dataItem, "GoOutTime");
     Additional.GoOutIssuingTime       = SqlUtils.EvalString(dataItem, "GoOutIssuingTime");
     Additional.GoOutPlace             = SqlUtils.EvalString(dataItem, "GoOutPlace");
     Additional.GoOutReason            = SqlUtils.EvalString(dataItem, "GoOutReason");
     Additional.PartyMemberAdd         = SqlUtils.EvalString(dataItem, "PartyMemberAdd");
     Additional.PartyMemberAddTime     = SqlUtils.EvalString(dataItem, "PartyMemberAddTime");
     Additional.HomeAddress            = SqlUtils.EvalString(dataItem, "HomeAddress");
     Additional.Resume                 = SqlUtils.EvalString(dataItem, "Resume");
     Additional.Remarks                = SqlUtils.EvalString(dataItem, "Remarks");
 }