Ejemplo n.º 1
0
    private void BindData(string begin, string end)
    {
        string    sql = string.Format(_sqlPattern, begin, end);
        DataTable dt  = WholeWebConfig.GetDrvIDataAccessDecode().SelectDataTable(sql, "tmp");

        if (dt != null)
        {
            this.DataGrid1.DataSource = dt;
            this.DataGrid1.DataBind();
        }
    }
Ejemplo n.º 2
0
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        if (string.IsNullOrEmpty(txtCode.Text))
        {
            return;
        }
        string sql = string.Format(sqlPattern, txtCode.Text);

        DataTable dt = WholeWebConfig.GetDrvIDataAccessDecode().SelectDataTable(sql, "tmp");

        if (dt != null)
        {
            this.DataGrid1.DataSource = dt;
            this.DataGrid1.DataBind();
        }
    }
Ejemplo n.º 3
0
    protected void cbLxzsxzqhValue_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (string.IsNullOrEmpty(cbLxzsxzqhValue.SelectedValue))
        {
            txtLxzsxxdz.Text = "广东省";
            return;
        }
        string    sql = string.Format(sqlPattern, cbLxzsxzqhValue.SelectedValue);
        DataTable dt  = WholeWebConfig.GetDrvIDataAccessDecode().SelectDataTable(sql, "tmp");

        if (dt == null)
        {
            return;
        }
        try
        {
            string sf    = dt.Rows[0]["sf"].ToString();
            string cs    = dt.Rows[0]["cs"].ToString();
            string dmsm1 = dt.Rows[0]["dmsm1"].ToString();
            txtLxzsxxdz.Text = string.Format("{0}{1}{2}", sf, cs, dmsm1);
        }
        catch (Exception ex) { }
    }