예제 #1
0
    private void BindGrid()
    {
        LStblDeptDAL _dalLSTblDept = null;
        Hashtable    _htParameters = null;

        try
        {
            _dalLSTblDept = new LStblDeptDAL();
            _htParameters = new Hashtable();

            _htParameters["p_keywords"] = txtSearch.Text;

            gvwList.DataSource = _dalLSTblDept.GetRows(_htParameters);
            gvwList.DataBind();
        }
        catch (Exception ex)
        {
            Utility.ShowMessageBox(this, Utility.LOAD_DATA_FAIL_MESSAGE, ex, null, null);
        }
    }
예제 #2
0
    public static void BindDDLHRMSDept(DropDownList ddl)
    {
        LStblDeptDAL _dalLStblDeptDAL = null;
        Hashtable    _htParameters    = null;

        try
        {
            _dalLStblDeptDAL            = new LStblDeptDAL();
            _htParameters               = new Hashtable();
            _htParameters["p_keywords"] = "";

            ddl.DataSource     = _dalLStblDeptDAL.GetRows(_htParameters);
            ddl.DataValueField = "DeptCode";
            ddl.DataTextField  = "DeptName";
            ddl.DataBind();
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }