private void GetRecords() { try { Cursor.Current = Cursors.WaitCursor; bsRecords.DataSource = Data_User.GetUsers(); } catch (Exception ex) { throw ex; } finally { Cursor.Current = Cursors.Default; } }
public PaymentEnquiryCtrl() { InitializeComponent(); try { bsSuppliers.DataSource = Data_Supplier.GetSuppliers(); bsSupplierTypes.DataSource = Data_SupplierType.GetSupplierTypes(); bsUsers.DataSource = Data_User.GetUsers(); bsBankAccounts.DataSource = Data_BankAccount.GetBankAccounts(); luSuppliers.SelectedIndex = -1; luSupplierTypes.SelectedIndex = -1; luUsers.SelectedIndex = -1; luBankAccount.SelectedIndex = -1; dtDateFrom.Value = DateTime.Parse(String.Format("01/01/{0}", DateTime.Now.Year)); dtDateTo.Value = DateTime.Now.Date; } catch (Exception ex) { Utils.ShowException(ex); } }