public void GetBorrowerRequest() { oBorrower = new DataAccess.Borrower(); dgDetails.DataSource = oBorrower.GetBorrowerTransaction(ePublicVariable.eVariable.FIND_BOOK.BOOK_REQUESTED, ""); foreach (DataGridViewColumn col in dgDetails.Columns) { col.Width = 115; //col.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells; if (col.Name == "ADDRESS") { col.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; } } ChangeCellGridColor(); lblTotalRecord.Text = dgDetails.Rows.Count.ToString(); TranType = eVariable.FIND_BOOK.BOOK_REQUESTED; }
private void AutoFillBorrower() { oBorrower = new DataAccess.Borrower(); foreach (DataRow row in oBorrower.GetBorrowerTransaction(eVariable.FIND_BOOK.BOOK_REQUESTED, eVariable.sBorrowerID).Rows) { txtBorrowerID.Text = row[0].ToString(); txtFname.Text = row[1].ToString(); txtMname.Text = row[2].ToString(); txtLname.Text = row[3].ToString(); txtBirthDate.Text = row[4].ToString(); txtAge.Text = row[5].ToString(); txtContactNo.Text = row[6].ToString(); txtAddress.Text = row[7].ToString(); eVariable.sBorrowerID = txtBorrowerID.Text; eVariable.FirstName = txtFname.Text; eVariable.MiddleName = txtMname.Text; eVariable.LastName = txtLname.Text; } AutoFillBook(); }
void LoadBorrowerRequest() { oBorrower = new DataAccess.Borrower(); eVariable.DisableGridColumnSort(dgBorrower); dgBorrower.DataSource = oBorrower.GetBorrowerTransaction(ePublicVariable.eVariable.FIND_BOOK.BOOK_BORROWED, ""); foreach (DataGridViewColumn col in dgBorrower.Columns) { col.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells; if (col.Name == "ADDRESS") { col.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; } if (col.Name == "ADDED_DATE") { col.Visible = false; } } ChangeCellGridColor(); }