Пример #1
0
        static Button UpdateButton(ZButton zButton, GameObject gameObject)
        {
            Button button = GetOrAddComponent <Button>(gameObject);

            if (zButton.Interactable.HasValue)
            {
                button.interactable = zButton.Interactable.Value;
            }

            return(button);
        }
Пример #2
0
 protected void rplist_OnItemDataBound(object sender, RepeaterItemEventArgs e)
 {
     if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
     {
         HiddenField userid  = e.Item.FindControl("hfuserid") as HiddenField;
         ZButton     zbsbmit = e.Item.FindControl("zbsbmit") as ZButton;
         SysUser     su      = bu.GetUserByUserID(userid.Value);
         if (su.UserStatus == UserStatus.审核通过.ToString())
         {
             zbsbmit.Visible = false;
         }
     }
 }
Пример #3
0
        protected void rplist_OnItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            HiddenField hftoolid = e.Item.FindControl("hftoolid") as HiddenField;
            ZLinkButton zb1      = e.Item.FindControl("zlxz") as ZLinkButton;
            ZButton     zb2      = e.Item.FindControl("zbsub") as ZButton;
            Tool        t        = bn.GetToolsByID(Utils.StrToInt(hftoolid.Value, 0));

            if (t.ToolSuffix == "mp4" || t.ToolSuffix == "webm" || t.ToolSuffix == "ogg")
            {
                zb1.Visible = false;
                zb2.Visible = true;
            }
            else
            {
                zb1.Visible = true;
                zb2.Visible = false;
            }
        }
Пример #4
0
        protected void zbsbmit_OnClick(object sender, EventArgs e)
        {
            // 获取当前点击的发送按钮
            ZButton zb = (ZButton)sender;

            // 获取该按钮
            string  userID = zb.CommandArgument;
            int     ret;
            SysUser su        = bu.GetUserByUserID(userID);
            string  oldstatus = su.UserStatus;

            if (su != null)
            {
                ret = bu.Update(new SysUser()
                {
                    UserID = su.UserID, UserStatus = UserStatus.审核通过.ToString()
                });

                if (ret == 1)
                {
                    SysOperateLog log = new SysOperateLog();
                    log.LogID           = StringHelper.getKey();
                    log.LogType         = LogType.帐户信息.ToString();
                    log.LogObjectID     = su.UserID;
                    log.LogObjectName   = "[" + su.UserLoginName + "]" + su.UserName;
                    log.OperateUser     = GetLogUserName();
                    log.OperateDate     = DateTime.Now;
                    log.LogOperateType  = "审核";
                    log.LogBeforeObject = JsonHelper.Obj2Json <string>("[原状态:]" + oldstatus);
                    log.LogAfterObject  = JsonHelper.Obj2Json <string>("[新状态:]" + su.UserStatus);

                    bsol.Insert(log);
                    Message.ShowOKAndReflash(this, "已经审核通过", "zbquery");
                }
                else
                {
                    Message.ShowWrong(this, "系统错误");
                }
            }
        }