public void LoadRevenues(DateTime date) { float total = orderModel.LoadTotal(date); List <RevenuesDTO> listDetail = orderModel.LoadOrderDetail(date); if (listDetail.Count > 0) { DataTable dtOrderDetail = ConvertCustom.ListToDataTable <RevenuesDTO>(listDetail); bsOrderdetail = new BindingSource() { DataSource = dtOrderDetail }; //binding data to data grid view form.getBnOrderDetail().BindingSource = bsOrderdetail; form.getDgvOrderDetail().DataSource = bsOrderdetail; form.gettotal().Text = total.ToString(); //hide unnecessary column form.getDgvOrderDetail().Columns["Customer"].Visible = false; form.getDgvOrderDetail().Columns["Salesman"].Visible = false; form.getDgvOrderDetail().Columns["total"].Visible = false; //clear and add new data binding clearDataBindingTextOrderdetail(); bindingDataTextOrderdetail(); } }