示例#1
0
 //添加用户
 protected void Button1_Click(object sender, EventArgs e)
 {
     Bus.Model.Member m = new Bus.Model.Member();
     m.member_password = "******";
     m.member_nickname = "walker" + DateTime.Now.Millisecond;
     m.member_mail = "mail";
     m.member_join_time = (int)common.ConvertDateTimeInt(DateTime.Now);
     m.member_last_ip = Request.UserHostAddress;
     try
     {
         int n = new Bus.DAL.account().add(m);
         lblmsg.Text = "add user successful<br/>";
         new Bus.DAL.account().Delete(n);
         lblmsg.Text += "new member " + n + " has been deleted";
     }
     catch (Exception ex)
     {
         lblmsg.Text = ex.Message;
     }
 }
示例#2
0
文件: auths.cs 项目: Bvin/bus-fm-api
    public string reg(string usermail, string userpwd, string nickname)
    {
        common.visitorRecord();
        try
        {
            Bus.Model.Member model = new Bus.Model.Member();
            model.member_join_time = (int)common.ConvertDateTimeInt(DateTime.Now);
            model.member_last_ip = Context.Request.UserHostAddress;
            model.member_mail = usermail;
            model.member_nickname = nickname;
            model.member_password = userpwd;

            new Bus.DAL.account().add(model);
            return "1|注册成功";
        }
        catch (Exception ex)
        {
            return "0|" + ex.Message;
        }
    }