protected void BindLogGrid() { int id = int.Parse(hid.Value); gvLog.DataSource = TripBLL.GetTripListByID(id).Where(t => t.Status == (int)Utility.FleetRequestStatus.Completed).ToList(); gvLog.DataBind(); }
protected void btnSearch_Click(object sender, EventArgs e) { try { if (!string.IsNullOrWhiteSpace(txtSea.Value)) { int RequestID = Convert.ToInt32(txtSea.Value); gvRequestAppr.DataSource = TripBLL.GetTripListByID(RequestID).Where(p => p.Status > (int)Utility.FleetRequestStatus.Pending_Supervisor_Approval).ToList(); gvRequestAppr.DataBind(); } } catch (Exception ex) { error.Visible = true; error.InnerHtml = "<button type='button' class='close' data-dismiss='alert'>×</button> An error occurred. kindly try again!!!"; Utility.WriteError("Error: " + ex.InnerException); } }
private void BindGrid(int id) { gvheader.DataSource = TripBLL.GetTripListByID(id); gvheader.DataBind(); }