BKI_DichVuMatDat.US.US_GD_HOP_DONG.FillDatasetBCTangGiamLD C# (CSharp) Method

FillDatasetBCTangGiamLD() public method

public FillDatasetBCTangGiamLD ( System.DateTime ip_tu_ngay, System.DateTime ip_den_ngay ) : DataSet
ip_tu_ngay System.DateTime
ip_den_ngay System.DateTime
return System.Data.DataSet
        public DataSet FillDatasetBCTangGiamLD(DateTime ip_tu_ngay, DateTime ip_den_ngay)
        {
            CStoredProc v_cstore = new CStoredProc("pr_bc_tang_giam_lao_dong");
            v_cstore.addDatetimeInputParam("@ip_tu_ngay", ip_tu_ngay);
            v_cstore.addDatetimeInputParam("@ip_den_ngay", ip_den_ngay);
            DataSet v_ds = new DataSet();
            v_ds.Tables.Add(new DataTable());
            v_cstore.fillDataSetByCommand(this, v_ds);
            return v_ds;
        }

Usage Example

 private void load_data_to_grid()
 {
     US_GD_HOP_DONG v_us = new US_GD_HOP_DONG();
     DataTable v_dt= v_us.FillDatasetBCTangGiamLD( m_dat_tu_ngay.DateTime, m_dat_den_ngay.DateTime).Tables[0];
     m_tree_list.ParentFieldName = DM_DON_VI.ID_DON_VI_CAP_TREN;
     m_tree_list.DataSource = v_dt;
     m_tree_list.ExpandAll();
 }