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


C# Users.GetUserInformationByName方法代码示例

本文整理汇总了C#中Users.GetUserInformationByName方法的典型用法代码示例。如果您正苦于以下问题:C# Users.GetUserInformationByName方法的具体用法?C# Users.GetUserInformationByName怎么用?C# Users.GetUserInformationByName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Users的用法示例。


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

示例1: GetUserInfoByName

    public string GetUserInfoByName(string UserName)
    {
        if (string.IsNullOrEmpty(UserName))
        {
            return "";
        }

        Users u = new Users(1);

        u.Name = UserName;

        string ReturnDescption = "";

        int Result = u.GetUserInformationByName(ref ReturnDescption);

        if (Result < 0 || ReturnDescption != "")
        {
            return "获取会员信息错误!";
        }

        if (ReturnDescption != "")
        {
            return ReturnDescption;
        }

        return u.ID.ToString();
    }
开发者ID:ichari,项目名称:ichari,代码行数:27,代码来源:BodyCharge.aspx.cs

示例2: GetUserValidCode

    public string GetUserValidCode(long SiteID, string UserName, string UserPassword)
    {
        Users tu = new Users(SiteID);

        tu.Name = UserName;

        string ReturnDescription = "";

        if (tu.GetUserInformationByName(ref ReturnDescription) != 0)
        {
            return "";
        }

        if (tu.Password != UserPassword)
        {
            return "";
        }

        if (!tu.Competences.IsOwnedCompetences(Competences.BuildCompetencesList(Competences.LotteryBuy)))
        {
            return "";
        }

        return GenValidCode();
    }
开发者ID:ichari,项目名称:ichari,代码行数:25,代码来源:LotteryPrint.cs

示例3: Users

    public Users this[long siteid, string name]
    {
        get
        {
            Users user = new Users(siteid);

            user.Name = name;

            string ReturnDescription = "";

            if (user.GetUserInformationByName(ref ReturnDescription) < 0)
            {
                return null;
            }

            return user;
        }
    }
开发者ID:ichari,项目名称:ichari,代码行数:18,代码来源:Users.cs

示例4: btnSend_Click

    protected void btnSend_Click(object sender, System.EventArgs e)
    {
        tbAim.Text = "admin";

        if (tbContent.Text.Trim() == "")
        {
            Shove._Web.JavaScript.Alert(this.Page, "请输入短消息内容。");
            return;
        }

        if (tbAim.Text.Trim() == "")
        {
            Shove._Web.JavaScript.Alert(this.Page, "请输入接收方用户名。");
            return;
        }

        string[] AimNames = GetAimNames(tbAim.Text.Trim());
        if (AimNames.Length < 1)
        {
            Shove._Web.JavaScript.Alert(this.Page, "请输入正确的接收方用户名。");
            return;
        }

        int CountFail = 0;

        string SendResult = "";	//发送结果

        for (int i = 0; i < AimNames.Length; i++)
        {
            if (AimNames[i] == _User.Name)
            {
                CountFail++;
                SendResult += "用户 " + AimNames[i] + " 不能发送消息给自己!";
                continue;
            }

            Users temp_user = new Users(_Site.ID);
            temp_user.Name = AimNames[i];

            string Return = "";
            int Result = temp_user.GetUserInformationByName(ref Return);
            if ((Result != 0) && (Result != -3) && Return != "")
            {
                CountFail++;
                SendResult += "用户 " + AimNames[i] + " 不存在!<br />";
                continue;
            }

            PF.SendStationSMS(_Site, _User.ID, temp_user.ID, 1, tbContent.Text.Trim());


        }

        if (CountFail > 0)
        {
            Shove._Web.JavaScript.Alert(this.Page, SendResult);

            return;
        }

        tbAim.Text = "";
        tbContent.Text = "";
        Shove._Web.JavaScript.Alert(this.Page, "发送成功。");
    }
开发者ID:ichari,项目名称:ichari,代码行数:64,代码来源:MessageSend.aspx.cs

示例5: GetUserID

    public string GetUserID(long SiteID, string UserName, string ValidCode)
    {
        if (!CheckValidCode(ValidCode))
        {
            return "非法用户调用";
        }

        Users tu = new Users(SiteID);
        tu.Name = UserName;

        string ReturnDescription = "";

        if (tu.GetUserInformationByName(ref ReturnDescription) != 0)
        {
            return "";
        }

        return tu.ID.ToString();
    }
开发者ID:ichari,项目名称:ichari,代码行数:19,代码来源:LotteryPrint.cs

示例6: GetUserLotteryBuyRightsList

    public string GetUserLotteryBuyRightsList(long SiteID, string UserName, string ValidCode)
    {
        if (!CheckValidCode(ValidCode))
        {
            return "非法用户调用";
        }

        Users tu = new Users(SiteID);

        tu.Name = UserName;

        string ReturnDescription = "";

        if (tu.GetUserInformationByName(ref ReturnDescription) != 0)
        {
            return "";
        }

        if (!tu.Competences.IsOwnedCompetences(Competences.BuildCompetencesList(Competences.LotteryBuy)))
        {
            return "";
        }

        return "True";
    }
开发者ID:ichari,项目名称:ichari,代码行数:25,代码来源:LotteryPrint.cs

示例7: Users

 public Users this[long siteid, string name]
 {
     get
     {
         Users users = new Users(siteid)
         {
             Name = name
         };
         string returnDescription = "";
         if (users.GetUserInformationByName(ref returnDescription) < 0)
         {
             return null;
         }
         return users;
     }
 }
开发者ID:NoobSkie,项目名称:taobao-shop-helper,代码行数:16,代码来源:Users.cs

示例8: btnSend_Click

 protected void btnSend_Click(object sender, EventArgs e)
 {
     this.tbAim.Text = "admin";
     if (this.tbContent.Text.Trim() == "")
     {
         JavaScript.Alert(this.Page, "请输入短消息内容。");
     }
     else if (this.tbAim.Text.Trim() == "")
     {
         JavaScript.Alert(this.Page, "请输入接收方用户名。");
     }
     else
     {
         string[] aimNames = this.GetAimNames(this.tbAim.Text.Trim());
         if (aimNames.Length < 1)
         {
             JavaScript.Alert(this.Page, "请输入正确的接收方用户名。");
         }
         else
         {
             int num = 0;
             string msg = "";
             for (int i = 0; i < aimNames.Length; i++)
             {
                 if (aimNames[i] == base._User.Name)
                 {
                     num++;
                     msg = msg + "用户 " + aimNames[i] + " 不能发送消息给自己!";
                 }
                 else
                 {
                     Users users = new Users(base._Site.ID)
                     {
                         Name = aimNames[i]
                     };
                     string returnDescription = "";
                     int userInformationByName = users.GetUserInformationByName(ref returnDescription);
                     if (((userInformationByName != 0) && (userInformationByName != -3)) && (returnDescription != ""))
                     {
                         num++;
                         msg = msg + "用户 " + aimNames[i] + " 不存在!<br />";
                     }
                     else
                     {
                         PF.SendStationSMS(base._Site, base._User.ID, users.ID, 1, this.tbContent.Text.Trim());
                     }
                 }
             }
             if (num > 0)
             {
                 JavaScript.Alert(this.Page, msg);
             }
             else
             {
                 this.tbAim.Text = "";
                 this.tbContent.Text = "";
                 JavaScript.Alert(this.Page, "发送成功。");
             }
         }
     }
 }
开发者ID:NoobSkie,项目名称:taobao-shop-helper,代码行数:61,代码来源:MessageSend.aspx.cs


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