Exemple #1
0
    private DataTable GetTable()
    {
        string text = " and 1=1 ";

        if (!string.IsNullOrEmpty(this.mindate.Text.Trim()))
        {
            text = text + " and dtm_dlsj >= '" + this.mindate.Text.Trim() + "' ";
        }
        if (!string.IsNullOrEmpty(this.maxdate.Text.Trim()))
        {
            text = text + " and dtm_dlsj <= '" + Convert.ToDateTime(this.maxdate.Text.Trim()).AddDays(1.0).ToString("yyyy-MM-dd") + "' ";
        }
        if (!string.IsNullOrEmpty(this.txtPeople.Value))
        {
            text = text + " and v_xm like '%" + this.txtPeople.Value + "%'";
        }
        DataTable dataTable = PrintLogin.PintLoginDT(text);

        this.dgLogList.DataSource = dataTable;
        this.dgLogList.DataBind();
        return(dataTable);
    }