当前位置: 首页>>代码示例>>C#>>正文


C# UserItem类代码示例

本文整理汇总了C#中UserItem的典型用法代码示例。如果您正苦于以下问题:C# UserItem类的具体用法?C# UserItem怎么用?C# UserItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


UserItem类属于命名空间,在下文中一共展示了UserItem类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetCurrentUserReadingMessage

 private MessageList GetCurrentUserReadingMessage(UserItem item)
 {
     MessageList mList = new MessageList();
     MessageOperator mo = new MessageOperator();
     mList = mo.GetNoReadMessage4ToUserId(item.Id);
     return mList;
 }
开发者ID:caixiaodou,项目名称:GKing,代码行数:7,代码来源:Frame.aspx.cs

示例2: BindData

 protected void BindData()
 {
     UserItem userObj = new UserItem();
     PagerNavication.RecordsCount = DataBase.HEntityCommon.HEntity(userObj).EntityCount();
     UserItem[] al = UserItem.List("", "", PagerNavication.PageIndex, PagerNavication.PageSize);
     rptItems.DataSource = al;
     rptItems.DataBind();
 }
开发者ID:huyihuan,项目名称:BlueSky,代码行数:8,代码来源:UserList.ascx.cs

示例3: btnSave_ServerClick

        protected void btnSave_ServerClick(object sender, EventArgs e)
        {
            string strUserName = txt_UserName.Value.Trim();
            string strNickName = txt_NickName.Value.Trim();
            string strPassword = txt_Password.Value.Trim();
            string strPasswordSecond = txt_PasswordSecond.Value.Trim();
            if ("" == strUserName || "" == strNickName || "" == strPassword || "" == strPasswordSecond)
                return;
            if(UserItem.ExistUser(strUserName))
            {
                PageUtil.PageAlert(this.Page, "该用户名已存在!");
                return;
            }
            if (!strPassword.Equals(strPasswordSecond))
            {
                PageUtil.PageAlert(this.Page, "密码和确认密码不一致!");
                return;
            }
            if (lb_RoleSelect.Items.Count == 0)
            {
                PageUtil.PageAlert(this.Page, "请选择角色!");
                return;
            }
            UserItem addItem = new UserItem();
            addItem.UserName = strUserName;
            addItem.NickName = strNickName;
            addItem.Password = Util.MD5Encrypt(strPassword);
            addItem.Gender = rb_GenderMale.Checked ? "男" : "女";
            string strTel = txt_Tel.Value.Trim();
            if ("" != strTel)
                addItem.Tel = txt_Tel.Value.Trim();
            string strEmail = txt_Email.Value.Trim();
            if ("" != strEmail)
                addItem.Email = txt_Email.Value.Trim();
            int nNewId = UserItem.Save(addItem);
            if (nNewId <= 0)
                return;

            UserRoleItem[] alUserRoles = UserRoleItem.GetUserRoles(nNewId);
            Hashtable htExistRoles = new Hashtable();
            if (null != alUserRoles)
            {
                foreach (UserRoleItem item in alUserRoles)
                    htExistRoles[item.RoleItemId + ""] = 1;
            }
            foreach (ListItem item in lb_RoleSelect.Items)
            {
                if (htExistRoles.ContainsKey(item.Value))
                    continue;
                UserRoleItem addUserRole = new UserRoleItem();
                addUserRole.RoleItemId = int.Parse(item.Value);
                addUserRole.UserItemId = nNewId;
                UserRoleItem.Save(addUserRole);
            }
            PageUtil.PageAlert(this.Page, "保存成功!");
        }
开发者ID:huyihuan,项目名称:BlueSky,代码行数:56,代码来源:UserAdd.ascx.cs

示例4: ItemObject

        public ItemObject(MapObject dropper, UserItem item, Point manualpoint)
        {
            ExpireTime = Envir.Time + Settings.ItemTimeOut * Settings.Minute;

            Item = item;
            if (Item.IsAdded)
                NameColour = Color.Cyan;

            CurrentMap = dropper.CurrentMap;
            CurrentLocation = manualpoint;
        }
开发者ID:quttap,项目名称:mir2,代码行数:11,代码来源:ItemObject.cs

示例5: ItemCombined

        //TOADD
        //ItemSplit
        //ItemMerge

        public void ItemCombined(string source, UserItem fromItem, UserItem toItem, int slotFrom, int slotTo, MirGridType grid)
        {
            string task = string.Empty;
            if (fromItem != null && toItem != null)
            {
                task = string.Format("Item Combined - {0} with {1} from {2} to {3} in {4} ({5})", fromItem.Info.Name, toItem.Info.Name, slotFrom, slotTo, grid, toItem.UniqueID);
            }

            Action action = new Action { Source = source, Task = task };

            RecordAction(action);
        }
开发者ID:Pete107,项目名称:Mir2,代码行数:16,代码来源:Reporting.cs

示例6: AddNewItemButtonClick

        private async void AddNewItemButtonClick(object sender, RoutedEventArgs e)
        {
            var price = 0;
            int.TryParse(this.PriceTextBox.Text, out price);
            var item = new UserItem
            {
                Name = this.NameTextBox.Text,
                Price = price
            };

            await this.InsertUserAsync(item);
        }
开发者ID:TelerikAcademy,项目名称:Windows-Applications,代码行数:12,代码来源:MainPage.xaml.cs

示例7: AuctionInfo

        public AuctionInfo(BinaryReader reader)
        {
            AuctionID = reader.ReadUInt64();

            Item = new UserItem(reader);
            ConsignmentDate = DateTime.FromBinary(reader.ReadInt64());
            Price = reader.ReadUInt32();

            CharacterIndex = reader.ReadInt32();

            Expired = reader.ReadBoolean();
            Sold = reader.ReadBoolean();
        }
开发者ID:ufaith,项目名称:cmir2,代码行数:13,代码来源:AuctionInfo.cs

示例8: ItemMoved

        public void ItemMoved(string source, UserItem item, MirGridType from, MirGridType to, int slotFrom, int slotTo)
        {
            string task = string.Empty;

            if (item != null)
            {
                task = string.Format("Item Moved - {0} from {1}:{2} to {3}:{4} ({5})", item.Info.Name, from, slotFrom, to, slotTo, item.UniqueID);
            }

            Action action = new Action { Source = source, Task = task };

            RecordAction(action);
        }
开发者ID:Pete107,项目名称:Mir2,代码行数:13,代码来源:Reporting.cs

示例9: ItemObject

        public ItemObject(MapObject dropper, UserItem item, bool DeathDrop = false)
        {
            if (DeathDrop)//player dropped it when he died: allow for time to run back and pickup his drops
                ExpireTime = Envir.Time + Settings.PlayerDiedItemTimeOut * Settings.Minute;
            else
                ExpireTime = Envir.Time + Settings.ItemTimeOut * Settings.Minute;

            Item = item;
            if (Item.IsAdded)
                NameColour = Color.Cyan;

            CurrentMap = dropper.CurrentMap;
            CurrentLocation = dropper.CurrentLocation;
        }
开发者ID:Pete107,项目名称:Mir2,代码行数:14,代码来源:ItemObject.cs

示例10: SetData

 private void SetData(ConsoleNode console, SearchMode mode)
 {
     try
     {
         lvMembers.Items.Clear();
         if (mode == SearchMode.User)
         {
             lbMembers.Text = "&Users:";
             this.Text = "Users";
             UserStorageView[] users = console.Manager.Admon_GetUserList(console.Credentials);
             foreach (UserStorageView user in users)
             {
                 UserItem ui = new UserItem(user.Username);
                 ui.ImageIndex = 3;
                 ui.User = user;
                 lvMembers.Items.Add(ui);
             }
         }
         else if (mode == SearchMode.Group)
         {
             lbMembers.Text = "&Groups:";
             this.Text = "Groups";
             GroupStorageView[] groups = console.Manager.Admon_GetGroups(console.Credentials);
             foreach (GroupStorageView group in groups)
             {
                 GroupItem gi = new GroupItem(group.GroupName);
                 gi.ImageIndex = 2;
                 gi.GroupView = group;
                 lvMembers.Items.Add(gi);
             }
         }
         else if (mode == SearchMode.Permission)
         {
             lbMembers.Text = "&Permissions:";
             this.Text = "Permissions";
             PermissionStorageView[] permissions = console.Manager.Admon_GetPermissions(console.Credentials);
             foreach (PermissionStorageView permission in permissions)
             {
                 PermissionItem prm = new PermissionItem(permission.PermissionName);
                 prm.ImageIndex = 12;
                 prm.Permission = new PermissionStorageView(permission.PermissionId, permission.PermissionName);
                 lvMembers.Items.Add(prm);
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Error filling search list:" + ex.Message, "Search Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
开发者ID:JamesTryand,项目名称:alchemi,代码行数:50,代码来源:SearchForm.cs

示例11: btnUpdate_Click

    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        UserItem u = new UserItem();
        u = (UserItem)HttpContext.Current.Session["User"];
        u.UserID = u.UserID;
        u.Email = txtEmail.Text;
        u.FirstName = txtFirstName.Text;
        u.LastName = txtLastName.Text;
        u.Address = txtAddress.Text;
        u.ZipCode = txtZipCode.Text;
        u.City = txtCity.Text;
        if (txtPhone.Text.Length > 1)
        {
            u.Phone = Convert.ToInt64(txtPhone.Text);
        }
        else
            u.Phone = 0;
        if (txtMobilePhone.Text.Length > 1)
        {
            u.MobilePhone = Convert.ToInt64(txtMobilePhone.Text);
        }
        else
            u.MobilePhone = 0;

        u.PassWord = txtPassword.Text;
        if (UserItem.CheckPassword(u.UserID, u.PassWord))
        {
            if (UserItem.UpdateUser(u))
            {
                litFeedback.Text = "<div style='border: 1px solid #ccc;background-color: Green;color:White;'>Dina ändringar är sparade.</div>";
            }
            else
            {
                litFeedback.Text = "<div style='border: 1px solid #ccc;background-color: Red;color:White;'>Dina ändringar är inte sparade.</div>";
            }
        }
        else
        {
            lblPassword.Text = "Fel lösenord.";
        }
    }
开发者ID:Trixxer,项目名称:ShopEr,代码行数:41,代码来源:EditAccountDetails.aspx.cs

示例12: btnRegister_Click

    protected void btnRegister_Click(object sender, ImageClickEventArgs e)
    {
        UserItem item = new UserItem();
        item.LoginPwd = this.txtPwd.Text;
        item.NickName = this.txtNickName.Text;
        item.Sex=this.rdbMan.Checked ? "男" : "女";
        item.Name = this.txtName.Text;
        item.StarId = Convert.ToInt32(this.ddlConstellation.SelectedItem.Value);
        item.BloodTypeId = Convert.ToInt32(this.ddlBloodType.SelectedItem.Value);
        item.FaceId = Convert.ToInt32(this.hidFaceId.Value);

        UsersOperator uo = new UsersOperator();
        if (uo.InsertUser(item) == 1)
        {
            this.divLoginInfo.InnerText = "你的MyQQ ID为" + uo.LastUserId.ToString();
        }
        else
        {
            this.divLoginInfo.InnerText = "服务器错误";
        }
    }
开发者ID:caixiaodou,项目名称:GKing,代码行数:21,代码来源:Register.aspx.cs

示例13: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        if (this.Request["msgId"] != "0" && this.Request["msgId"]!=null)
        {
            this.MakeMsgShow(Convert.ToInt32(this.Request["msgId"]));
        }

        this.hidHostName.Value = ((UserItem)this.Session["User"]).NickName;
        this.hidHostId.Value = ((UserItem)this.Session["User"]).Id.ToString();

        if(this.Request["hostId"]!=null && this.Request["otherId"]!=null)
        {
            this.hidOtherId.Value = this.Request["otherId"].ToString();
            UserItem other = new UserItem();
            other = (new UsersOperator()).LoadUser(Convert.ToInt32(this.Request["otherId"]));
            this.hidOtherName.Value = other.NickName;

            this.txtChatPrivateList.InnerText += "";
            this.txtChatPrivateList.InnerHtml += "";
        }
    }
开发者ID:caixiaodou,项目名称:GKing,代码行数:21,代码来源:ChatForPrivate.aspx.cs

示例14: MailInfo

        public MailInfo(BinaryReader reader, int version, int customversion)
        {
            MailID = reader.ReadUInt64();
            Sender = reader.ReadString();
            RecipientIndex = reader.ReadInt32();
            Message = reader.ReadString();
            Gold = reader.ReadUInt32();

            int count = reader.ReadInt32();

            for (int i = 0; i < count; i++)
            {
                UserItem item = new UserItem(reader, version, customversion);
                if (SMain.Envir.BindItem(item))
                    Items.Add(item);
            }

            DateSent = DateTime.FromBinary(reader.ReadInt64());
            DateOpened = DateTime.FromBinary(reader.ReadInt64());

            Locked = reader.ReadBoolean();
            Collected = reader.ReadBoolean();
            CanReply = reader.ReadBoolean();
        }
开发者ID:Pete107,项目名称:Mir2,代码行数:24,代码来源:MailInfo.cs

示例15: DropItem

        protected virtual bool DropItem(UserItem item)
        {
            if (CurrentMap.Info.NoDropMonster) return false;

            ItemObject ob = new ItemObject(this, item)
            {
                Owner = EXPOwner,
                OwnerTime = Envir.Time + Settings.Minute,
            };

            return ob.Drop(Settings.DropRange);
        }
开发者ID:GenysisGaming,项目名称:mir2,代码行数:12,代码来源:MonsterObject.cs


注:本文中的UserItem类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。