public void initializeTransData(int transID) { if (gridTrans.Rows.Count > 0) { DataTable ds = new DataTable(); btnMemWish.Enabled = false; if (transID == 0) { ds = CommonUIMethods.ConvertGridToTable(gridTrans); } else { ds = transRep.GetTransIDDetails(transID); } lblMemberNotes.Text = memRep.GetMemberNotes(ds.Rows[0]["MemberID"].ToString()).Rows[0]["Notes"].ToString(); lblAlreadyRead.Text = ""; txtTransBookid.Text = ds.Rows[0]["BookID"].ToString(); txtTransMemId.Text = ds.Rows[0]["MemberID"].ToString(); setTransMemName(); lblTransId.Text = ds.Rows[0]["TransID"].ToString(); dateTransLoan.Text = ds.Rows[0]["LendDate"].ToString(); dateTransDue.Text = ds.Rows[0]["DueDate"].ToString(); if (String.Compare(DateTime.MinValue.ToString(), ds.Rows[0]["ReturnDate"].ToString()) == 0) { dateTransReturn.Text = ""; } else { dateTransReturn.Text = ds.Rows[0]["ReturnDate"].ToString(); } txtTransLendRate.Text = ds.Rows[0]["LendRate"].ToString(); txtTransFine.Text = ds.Rows[0]["Fine"].ToString(); txtLibBal.Text = ds.Rows[0]["LibBal"].ToString(); txtMemBal.Text = ds.Rows[0]["MemBal"].ToString(); txtRenewal.Text = ds.Rows[0]["RenewalDays"].ToString(); CommonUIMethods.setBookLabel(lblBookLabel, txtTransBookid.Text); if (wishRep.SearchWishList(txtTransMemId.Text).Rows.Count > 0) { btnMemWish.Enabled = true; } } }
private void leaveBookID(object sender, EventArgs e) { CommonUIMethods.setBookLabel(lblBookLabel, txtTransBookid.Text); CommonUIMethods.setLendRate(txtTransLendRate, txtTransBookid.Text); }