protected void gvItem_PageIndexChanging(object sender, GridViewPageEventArgs e) { log4net.ILog logger = log4net.LogManager.GetLogger("File"); try { if (e.NewPageIndex >= 0) { gvItemTable.PageIndex = e.NewPageIndex; AdminBLL ws = new AdminBLL(); GetIncidentData _req = new GetIncidentData(); GetIncidentDataResponse _resp = ws.GetIncidentData(_req); int pageSize = ContextKeys.GRID_PAGE_SIZE; gvItemTable.PageSize = pageSize; gvItemTable.DataSource = _resp.Incident; gvItemTable.DataBind(); } } catch (Exception ex) { logger.Info(ex.Message); } }
private void BindGrid() { log4net.ILog logger = log4net.LogManager.GetLogger("File"); try { AdminBLL ws = new AdminBLL(); GetIncidentData _req = new GetIncidentData(); GetIncidentDataResponse _resp = ws.GetIncidentData(_req); int pageSize = ContextKeys.GRID_PAGE_SIZE; gvItemTable.PageSize = pageSize; gvItemTable.DataSource = _resp.Incident; if (_resp.Incident.Count == 0) { //incident1.Visible = false; //incident2.Visible = false; } gvItemTable.DataBind(); } catch (Exception ex) { logger.Info(ex.Message); } }
private void PopulatePageCntrls(String argsBGID) { Int32 iCount = 0; GetIncidentDataResponse ret = null; log4net.ILog logger = log4net.LogManager.GetLogger("File"); try { DateTime dt; AdminBLL objAdminBLL = new AdminBLL(); GetIncidentData objGetBillingTableRequest = new GetIncidentData(); objGetBillingTableRequest.Report_No = argsBGID.ToString(); objGetBillingTableRequest.WhereClause = " where Report_No='" + argsBGID.ToString() + "'"; ret = objAdminBLL.GetIncidentData(objGetBillingTableRequest); dt = Convert.ToDateTime(ret.Incident[iCount].Date_of_Incident); txtdate.Text = dt.ToShortDateString().ToString(); txttime.Text = ret.Incident[iCount].Time_of_Incident.ToString(); txtReportno.Text = ret.Incident[iCount].Report_No.ToString(); txtreportedby.Text = ret.Incident[iCount].Received_By.ToString(); txtsite.Text = ret.Incident[iCount].Place_of_Incident.ToString(); txtstatement.Text = ret.Incident[iCount].ReportDetail.ToString(); txtfollownric.Text = ret.Incident[iCount].follownric.ToString(); txtfollowinvestigate.Text = ret.Incident[iCount].followinvesti.ToString(); txtfollowverify.Text = ret.Incident[iCount].followverify.ToString(); txtfollowreport.Text = ret.Incident[iCount].followsremark.ToString(); txtfollowstatus.Text = ret.Incident[iCount].followstatus.ToString(); } catch (Exception ex) { logger.Info(ex.Message); } }
public GetIncidentDataResponse GetIncidentData(GetIncidentData objGetIncidentDataRequest) { try { AdminDAL objAdminDAL = new AdminDAL(); GetIncidentDataResponse ret = new GetIncidentDataResponse(); List <UserIncident> lst = objAdminDAL.GetIncidentData(objGetIncidentDataRequest); ret.Incident = lst; return(ret); } catch (Exception ex) { throw ex; } }
private void PopulatePageCntrls(String argsBGID) { Int32 iCount = 0; GetIncidentDataResponse ret = null; log4net.ILog logger = log4net.LogManager.GetLogger("File"); try { DateTime dt; AdminBLL objAdminBLL = new AdminBLL(); GetIncidentData objGetBillingTableRequest = new GetIncidentData(); objGetBillingTableRequest.Report_No = argsBGID.ToString(); objGetBillingTableRequest.WhereClause = " where Report_No='" + argsBGID.ToString() + "'"; ret = objAdminBLL.GetIncidentData(objGetBillingTableRequest); hdnBTID.Value = ret.Incident[iCount].Report_No.ToString(); dt = Convert.ToDateTime(ret.Incident[iCount].Date_of_Incident); calDateOfIncident.Text = Convert.ToString(dt); dt = Convert.ToDateTime(ret.Incident[iCount].Time_of_Incident); TimeSelector1.Date = dt; txtReportNumber.Text = ret.Incident[iCount].Report_No.ToString(); txtEnterReportstatement.Text = ret.Incident[iCount].ReportDetail.ToString(); txtEnterAssignments.Text = ret.Incident[iCount].Assignment.ToString(); txtEnterPlaceOfIncident.Text = ret.Incident[iCount].Place_of_Incident.ToString(); DropDownList2.Text = ret.Incident[iCount].Type_of_Incident.ToString(); txtReportedBy.Text = ret.Incident[iCount].Reported_By.ToString(); txtReportedByName.Text = ret.Incident[iCount].Name.ToString(); txtVerifiedBy.Text = ret.Incident[iCount].Verified_By.ToString(); } catch (Exception ex) { logger.Info(ex.Message); } }
private void BindGridWithFilter() { log4net.ILog logger = log4net.LogManager.GetLogger("File"); try { AdminBLL ws = new AdminBLL(); GetIncidentData objReq = new GetIncidentData(); getLocationIDByName(ddllocation.Text.Trim()); string WhereClause = ReturnWhere(); if (!string.IsNullOrEmpty(txtdateto.Text)) { if (!string.IsNullOrEmpty(txtdatefrom.Text)) { objReq.Date_of_Incident = txtdatefrom.Text; objReq.Date_of_Incident = txtdatefrom.Text; } } if (!string.IsNullOrEmpty(txtdatefrom.Text)) { if (string.IsNullOrEmpty(txtdateto.Text)) { objReq.Date_of_Incident = txtdatefrom.Text; } } if (!string.IsNullOrEmpty(txtplaceofincident.Text)) { objReq.Place_of_Incident = txtplaceofincident.Text; } if (!string.IsNullOrEmpty(txtreport.Text)) { objReq.Reported_By = txtreport.Text; } if (!string.IsNullOrEmpty(txtverifiedby.Text)) { objReq.Verified_By = txtverifiedby.Text; } if (!string.IsNullOrEmpty(txtincidentno.Text)) { objReq.Report_No = txtincidentno.Text; } if (!string.IsNullOrEmpty(WhereClause)) { objReq.WhereClause = WhereClause; } GetIncidentDataResponse ret = ws.GetIncidentData(objReq); int pageSize = ContextKeys.GRID_PAGE_SIZE; gvItemTable.PageSize = pageSize; gvItemTable.DataSource = ret.Incident; if (ret.Incident.Count == 0) { // incident2.Visible = false; } gvItemTable.DataBind(); //incident2.Text = ret.Incident.Count.ToString(); } catch (Exception ex) { logger.Info(ex.Message); } }