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


C# Class1.GetAll方法代码示例

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


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

示例1: Button1_Click

    protected void Button1_Click(object sender, EventArgs e)
    {
        Class1 ad = new Class1();
        DataSet abc = ad.GetAll();

        GridView1.DataSource = abc;
        GridView1.DataBind();
    }
开发者ID:Soniaxia,项目名称:learngit,代码行数:8,代码来源:getall.aspx.cs

示例2: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        Class1 ad = new Class1();
        DataSet abc = ad.GetAll();

        GridView1.DataSource = abc;
        GridView1.DataBind();
    }
开发者ID:Soniaxia,项目名称:learngit,代码行数:8,代码来源:delete.aspx.cs

示例3: Button1_Click

    protected void Button1_Click(object sender, EventArgs e)
    {
        string qq = "Data Source=gz-20150728tajv\\sqlexpress;Initial Catalog=Student1;Integrated Security=True ";
        SqlConnection Conn = new SqlConnection(qq);
        Conn.Open();
        string SQL = "UPDATE dormitory_management SET " + TextBox2.Text + "='"+TextBox3.Text+"' where 寝室编号='" + TextBox1.Text + "'";
        SqlCommand cmd = new SqlCommand(SQL,Conn);
        cmd.ExecuteNonQuery();
        Conn.Close();

        Class1 ad = new Class1();
        DataSet abc = ad.GetAll();

        GridView1.DataSource = abc;
        GridView1.DataBind();
    }
开发者ID:Soniaxia,项目名称:learngit,代码行数:16,代码来源:revise.aspx.cs

示例4: Button3_Click

    protected void Button3_Click(object sender, EventArgs e)
    {
        string qq = "Data Source=gz-20150728tajv\\sqlexpress;Initial Catalog=Student1;Integrated Security=True ";
        SqlConnection Conn = new SqlConnection(qq);
        Conn.Open();
        string SQL1 = "UPDATE student_management SET 寝室号='" + TextBox4.Text + "',是否入住='是' where 学号='" + TextBox3.Text + "'";
        string SQL2 = "UPDATE dormitory_management SET 是否住满='是' where 寝室号='"+TextBox4.Text+"'";
        string SQL3 = "UPDATE dormitory_management SET 是否住满='否' where 寝室号='" + TextBox4.Text + "'";
        string str = "select count(*) from student_management where 寝室号='" + TextBox4.Text + "'";

        SqlCommand cmd1 = new SqlCommand(SQL1, Conn);

        cmd1.ExecuteNonQuery();

        SqlCommand count = new SqlCommand(str, Conn);
        string num1 = (count.ExecuteScalar()).ToString();
        int number = Convert.ToInt16(num1);

        if (number == 4)
        {
            SqlCommand cmd2 = new SqlCommand(SQL2, Conn);
            cmd2.ExecuteNonQuery();
        }
        else
        {
            SqlCommand cmd2 = new SqlCommand(SQL3, Conn);
            cmd2.ExecuteNonQuery();
        }

        Conn.Close();

        Class2 ad1 = new Class2();
        DataSet abc1 = ad1.GetAll();

        GridView1.DataSource = abc1;
        GridView1.DataBind();

        Class1 ad2 = new Class1();
        DataSet abc2 = ad2.GetAll();

        GridView2.DataSource = abc2;
        GridView2.DataBind();

        TextBox3.Text = "";
        TextBox4.Text = "";
    }
开发者ID:Soniaxia,项目名称:learngit,代码行数:46,代码来源:Occupancy_management.aspx.cs


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