コード例 #1
0
    private void BindGrid()
    {
        LStblBranchDAL _dalLSTblBranch = null;
        Hashtable      _htParameters   = null;

        try
        {
            _dalLSTblBranch = new LStblBranchDAL();
            _htParameters   = new Hashtable();

            _htParameters["p_keywords"] = txtSearch.Text;

            gvwList.DataSource = _dalLSTblBranch.GetRows(_htParameters);
            gvwList.DataBind();
        }
        catch (Exception ex)
        {
            Utility.ShowMessageBox(this, Utility.LOAD_DATA_FAIL_MESSAGE, ex, null, null);
        }
    }
コード例 #2
0
    //OJK

    public static void BindDDLHRMSBranch(DropDownList ddl)
    {
        LStblBranchDAL _dalLStblBranchDAL = null;
        Hashtable      _htParameters      = null;

        try
        {
            _dalLStblBranchDAL          = new LStblBranchDAL();
            _htParameters               = new Hashtable();
            _htParameters["p_keywords"] = "";

            ddl.DataSource     = _dalLStblBranchDAL.GetRows(_htParameters);
            ddl.DataValueField = "BranchCode";
            ddl.DataTextField  = "BranchName";
            ddl.DataBind();
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }