public void LoadInvoiceList(DateTime?FromDate = null, DateTime?ToDate = null, int?DifficultyLevel = 0, int?invoiceId = 0, int?Status = 0, string UserAssigned = null) { var InvoiceList = new InvoiceBpl().GetInvoiceLisDT(FromDate, ToDate, DifficultyLevel, invoiceId, Status, UserAssigned); dgvInvoiceList.DataSource = InvoiceList; dgvInvoiceList.PageSize = 10; dgvInvoiceList.SetPagedDataSource(InvoiceList, bindingNavigator1); }
// bool entryFound = false; //public void LoadUsers(int? userrole = null, int? difficultyLevel = null, string username = null) //{ // GlobalConstants.lstUsers = new UsersBpl().GetUsers(); // var res = new UsersBpl().GetUsersDT(userrole, difficultyLevel, username); // dgvInvoice.DataSource = res; // dgvInvoice.PageSize = 10; // dgvInvoice.SetPagedDataSource(res, bindingNavigator1); // DataGridViewColumn column = dgvInvoice.Columns[6]; // column.Width = 50; // DataGridViewColumn column1 = dgvInvoice.Columns[7]; // column1.Width = 50; //} public void LoadInvoice(DateTime?receiptdate = null, int?difficultyLevel = null, string invoicename = null, string supplieremail = null, string status = null) { //GlobalConstants.lstUsers = new UsersBpl().GetUsers(); var result = new InvoiceBpl().GetInvoiceDT(receiptdate, difficultyLevel, invoicename, supplieremail, status); dgvInvoice.DataSource = result; dgvInvoice.PageSize = 10; dgvInvoice.SetPagedDataSource(result, bindingNavigator1); DataGridViewColumn column = dgvInvoice.Columns[6]; column.Width = 50; DataGridViewColumn column1 = dgvInvoice.Columns[7]; column1.Width = 50; }