protected void StationeryRetrievalGrid_SelectedIndexChanged(object sender, EventArgs e) { String itemCode; lblStatus.Text = ""; if (StationeryRetrievalGrid.SelectedRow != null) { itemCode = StationeryRetrievalGrid.SelectedRow.Cells[0].Text; lblDBItemNo.Text = itemCode; lblDBDescription.Text = StationeryRetrievalGrid.SelectedRow.Cells[2].Text; var q = srControl.getDepartmentWiseList(Convert.ToInt32(lblDBRetrievalID.Text), itemCode); DepartmentWiseDetailsGrid.DataSource = q; DepartmentWiseDetailsGrid.DataBind(); } }
/** Get stationery retrieval details **/ public void displayStationeryRetrieval(StationeryRetrieval sr) { lblDBRetrievalID.Text = sr.RetrievalID.ToString(); lblDBDate.Text = sr.DateRetrieved.Value.ToString("dd/MM/yyyy"); /** Get the item wise list **/ StationeryRetrievalGrid.DataSource = srControl.getItemWiseList(sr.RetrievalID); StationeryRetrievalGrid.DataBind(); /** Display first record in Department wise list **/ StationeryRetrievalDetail sd = srControl.getFirstItem(sr.RetrievalID); lblDBItemNo.Text = sd.ItemCode; lblDBDescription.Text = sd.Stock.ItemDescription; DepartmentWiseDetailsGrid.DataSource = srControl.getDepartmentWiseList(sr.RetrievalID, sd.ItemCode); DepartmentWiseDetailsGrid.DataBind(); }