Exemple #1
0
    public void bindapply()
    {
        conn    obj = new conn();
        String  sql = "SELECT * FROM apply";
        DataSet ds  = obj.GetDataSet(sql);

        Repeater2.DataSource = ds;
        Repeater2.DataBind();
        String  sql3 = "select * from applyadvise ORDER BY Score DESC";
        DataSet ds3  = obj.GetDataSet(sql3);

        Repeater3.DataSource = ds3;
        Repeater3.DataBind();
    }
Exemple #2
0
    public void bindall()
    {
        conn    obj = new conn();
        String  sql = "SELECT Name,salary.WID,salary.SalaID, salary.Month,salary.Money,salary.SendWay,state.StateName,salary.SendTime,salary.GetTime,salary.Remark FROM salary ,staffinfo ,state WHERE  salary.WID = staffinfo.WID AND salary.StateID=state.StateID order by WID";
        DataSet ds  = obj.GetDataSet(sql);

        GridView2.DataSource = ds;
        GridView2.DataBind();
    }
Exemple #3
0
    public void bindadvise()
    {
        conn    obj = new conn();
        String  sql = "select * from applyadvise ORDER BY Score DESC";
        DataSet ds  = obj.GetDataSet(sql);

        Repeater1.DataSource = ds;
        Repeater1.DataBind();
    }
Exemple #4
0
    public void bind()
    {
        conn    obj = new conn();
        String  sql = "SELECT * FROM staffinfo,power,state where staffinfo.Power=power.Power AND staffinfo.StateID=state.StateID and staffinfo.power>0";
        DataSet ds  = obj.GetDataSet(sql);

        Repeater.DataSource = ds;
        Repeater.DataBind();
    }
Exemple #5
0
    }//签到绑定

    public void bindonduty()
    {
        conn    onduty = new conn();
        String  sql    = "select staffinfo.WID,Name,Tel,Email,QQ,PowerName from onduty,staffinfo,power where WorkState=21 and staffinfo.WID=onduty.WID and power.Power=staffinfo.Power";
        DataSet ds     = onduty.GetDataSet(sql);

        Repeater1.DataSource = ds;
        Repeater1.DataBind();
    }//工作人员绑定
Exemple #6
0
    public void bind()
    {
        conn    obj = new conn();
        String  sql = "SELECT salary.SalaID, salary.Month,salary.Year,salary.Money,salary.SendWay,state.StateName,salary.SendTime,salary.GetTime,salary.Remark,SalaryTypeName FROM salary ,staffinfo ,state,salarytype WHERE staffinfo.SID =" + Session["userid"] + " AND salary.WID = staffinfo.WID AND salary.StateID=state.StateID AND salary.SalaryTypeID=salarytype.SalaryTypeID order by Month";
        DataSet ds  = obj.GetDataSet(sql);

        Repeater2.DataSource = ds;
        Repeater2.DataBind();
    }
Exemple #7
0
    protected void bind()
    {
        conn   userinfo = new conn();
        String sql      = "SELECT * from staffinfo,power,state WHERE state.StateID=staffinfo.StateID and staffinfo.Power=power.Power and staffinfo.SID =" + Session["userid"];//顺序比较重要 如果把参数放到中间 这句话将不能够执行
        //MySqlParameter[] mysp ={ new MySqlParameter ("?username",MySqlDbType.VarChar)
        //mysp[0].Value = Session["username"];
        DataSet ds = userinfo.GetDataSet(sql);

        Repeater1.DataSource = ds;
        //int num = ds.Tables["staffinfo"].Rows.Count; 可以试着判断是否只有一条满足要求的记录
        //GridView1.DataKeyNames = new string[] { "id" };//主键
        Repeater1.DataBind();
    }
Exemple #8
0
    public void bind()
    {
        conn   obj = new conn();
        String sql = "SELECT salary.SalaID, salary.Month,salary.Money,salary.SendWay,state.StateName,salary.SendTime,salary.GetTime,salary.Remark FROM salary ,staffinfo ,state WHERE staffinfo.SID =" + Session["userid"] + " AND salary.WID = staffinfo.WID AND salary.StateID=state.StateID order by Month";
        //MySqlParameter[] mysp ={ new MySqlParameter ("?username",MySqlDbType.VarChar)
        //                         };
        //mysp[0].Value = Session["username"];
        DataSet ds = obj.GetDataSet(sql);

        GridView1.DataSource = ds;
        //GridView1.DataKeyNames = new string[] { "id" };//主键
        GridView1.DataBind();
        //sqlcon.Close();
    }
Exemple #9
0
    public void bind()
    {
        //this.DropDownList1.DataTextField = "";
        conn    time = new conn();
        String  sql  = "select * from time where TIMEDIFF(CURRENT_TIME(),Time)>0 ORDER BY TimeID DESC LIMIT 0,2";
        DataSet ds   = time.GetDataSet(sql);

        DropDownList1.DataSource          = ds;
        this.DropDownList1.SelectedIndex  = 0;
        this.DropDownList1.DataTextField  = "Time";   //dropdownlist的Text的字段
        this.DropDownList1.DataValueField = "TimeID"; //dropdownlist的Value的字段
        //DropDownList1.Items.Add(new ListItem("-=请选择=-", "0"));
        this.DropDownList1.DataBind();
    }//签到绑定