Пример #1
0
    private void BindGrid()
    {
        LStblCostTypeDAL _dalLStblCostTypeDAL = null;
        Hashtable        _htParameters        = null;

        try
        {
            _dalLStblCostTypeDAL = new LStblCostTypeDAL();
            _htParameters        = new Hashtable();

            _htParameters["p_keywords"] = txtSearch.Text;

            gvwList.DataSource = _dalLStblCostTypeDAL.GetRows(_htParameters);
            gvwList.DataBind();
        }
        catch (Exception ex)
        {
            Utility.ShowMessageBox(this, Utility.LOAD_DATA_FAIL_MESSAGE, ex, null, null);
        }
    }
Пример #2
0
    public static void BindDDLHRMSTypeCost(DropDownList ddl, string parameters)
    {
        LStblCostTypeDAL _dalLStblCostTypeDAL = null;
        Hashtable        _htParameters        = null;

        try
        {
            _dalLStblCostTypeDAL        = new LStblCostTypeDAL();
            _htParameters               = new Hashtable();
            _htParameters["p_keywords"] = "";
            _htParameters["p_ID"]       = parameters;

            ddl.DataSource     = _dalLStblCostTypeDAL.GetRows(_htParameters);
            ddl.DataValueField = "Code";
            ddl.DataTextField  = "Description";
            ddl.DataBind();
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }