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


C# User.save方法代码示例

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


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

示例1: Button1_Click

 protected void Button1_Click(object sender, EventArgs e)
 {
     if (new User().getById(TextBox2.Text) == null)
     {
         if (new User().getByEmailId(TextBox5.Text) != null)
             Label11.Text = "This E-Mail id is already used by some other person";
         else
         {
             User u = new User(TextBox1.Text, TextBox2.Text, TextBox4.Text, TextBox5.Text, TextBox6.Text, DropDownList1.SelectedItem.Text, TextBox7.Text);
             u.save();
             Dummy d = new Dummy(TextBox2.Text, r.Next(10000, int.MaxValue) + "", r.Next(10000, int.MaxValue) + "");
             d.Save();
             if (WebMail.Send("[email protected]", TextBox5.Text, "Activation", "Activation Code:" + d.getEmailActivationCode()))
                 ;  //     Label10.Text = "Mail sent Successfully";
             if (Message.Send(TextBox6.Text, "Activation code:" + d.getMobileActivationCode()))
                 ;
             Response.Redirect("./SignUpStep2.aspx?UserName=" + TextBox2.Text + "&Email=" + TextBox5.Text + "&MobileNumber=" + TextBox6.Text);
         }
     }
 }
开发者ID:sriharshakappala,项目名称:ping,代码行数:20,代码来源:SignUpStep1.aspx.cs

示例2: saveUser

 public void saveUser(User usr)
 {
     usr.save();
 }
开发者ID:jtominga,项目名称:Terviseleht,代码行数:4,代码来源:telBookService.cs

示例3: test

        public void test()
        {
            //Create a new connection and connect
            HbaseConnection connection = new HbaseConnection();

            //Connect to the HBase DB
            if(!connection.connect("localhost", 9090))
            {
                throw new Exception("Could Not Connect to HBase Thrift Server");
            }

            //Create a new user
            User user = new User(connection, "charlie");

            //Get just the auth info
            user.loadAuth();

            //Display the first name
            Console.WriteLine("First Name: " + user.FirstName);

            //Display the output
            displayUser(user);

            //Get all the data from the row
            user.loadAll();

            //Display the output
            displayUser(user);

            //Change some details
            user.FirstName = "Bob";
            user.LastName = "The Tester";
            user.Enabled = false;
            user.Email = "[email protected]";

            //Display the output
            displayUser(user);

            //Save the changes
            user.save();

            User user2;

            Console.WriteLine("Getting by Email");

            if(User.tryGetFromEmail("[email protected]", connection, out user2))
            {
                //Get all user info again
                user2.loadAll();

                //Display the output
                displayUser(user2);

                //Change the details back
                user2.FirstName = "Charlie";
                user2.LastName = "Mason";

                //Save the details back
                user2.save();
            }
            else
            {
                Console.WriteLine("User Not Found");
            }

            connection.closeConnection();
        }
开发者ID:charliem,项目名称:OCM,代码行数:67,代码来源:OHMTest.cs


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