protected void uoBtnSaveToExcel_Click(object sender, EventArgs e) { DataTable dt = null; try { TravelRequestBLL TRBLL = new TravelRequestBLL(); dt = TRBLL.GetTRRestrictedNationalityExport(uoHiddenFieldUser.Value); if (dt.Rows.Count > 0) { CreateFile(dt); } else { AlertMessage("There is no record to export."); } } catch (Exception ex) { throw ex; } finally { if (dt != null) { dt.Dispose(); } } }
protected void uoButtonExport_Click(object sender, EventArgs e) { DataTable dt = null; try { dt = TravelRequestBLL.GetPortAgentRequestExport(0, uoHiddenFieldUser.Value, uoHiddenFieldSortBy.Value); if (dt.Rows.Count > 0) { CreateFile(dt); } else { AlertMessage("No Record to Export!"); } } catch (Exception ex) { throw ex; } finally { if (dt != null) { dt.Dispose(); } } }
/// <summary> /// Author: Josephine Gad /// Created Date: 17/08/2012 /// (description): Refresh listview /// </summary> private void BindSeaportManifest() { uoDivAirport.Visible = false; uoDivSeaport.Visible = true; uoListViewTRAir.DataSource = null; uoListViewTRSea.DataSource = null; List <MeetGreetTravelRequestGenericClass> list = new List <MeetGreetTravelRequestGenericClass>(); if (uoHiddenFieldLoadType.Value == "0" || uoHiddenFieldLoadType.Value == "2") { TravelRequestBLL bll = new TravelRequestBLL(); list = bll.GetMeetGreetTravelRequestPage(GlobalCode.Field2TinyInt(uoHiddenFieldLoadType.Value), uoHiddenFieldUser.Value, uoHiddenFieldRole.Value, uoHiddenFieldSeaportID.Value, "0", GlobalCode.Field2DateTime(uoHiddenFieldDate.Value), 0, DataPager1.PageSize, "0", "1", "", "0", "0", "0", "", GlobalCode.Field2TinyInt(uoRadioButtonListView.SelectedValue) , uoHiddenFieldSortBy.Value); } if (uoHiddenFieldLoadType.Value == "0") { BindControls(list); } else if (uoHiddenFieldLoadType.Value == "2") { BindCount(list); } uoListViewTRSea.DataSourceID = "uoObjectDataSourceTR"; ListViewHeaderSea.DataSource = null; ListViewHeaderSea.DataBind(); }
protected DataTable GetList() { TravelRequestBLL TRBLL = new TravelRequestBLL(); return(TRBLL.GetTravelRequestArrivalDepartureSameDateListExport(0, GlobalCode.Field2DateTime(uoHiddenFieldDate.Value), GlobalCode.Field2DateTime(uoHiddenFieldDate.Value), uoHiddenFieldUser.Value, uoHiddenFieldUserRole.Value, uoHiddenFieldOrderBy.Value, 0, 0, GlobalCode.Field2Int(uoDropDownListVessel.SelectedValue), GlobalCode.Field2Int(uoDropDownListFilterBy.SelectedValue), uoTextBoxFilter.Text, GlobalCode.Field2Int(uoDropDownListNationality.SelectedValue), GlobalCode.Field2Int(uoDropDownListGender.SelectedValue), GlobalCode.Field2Int(uoDropDownListRank.SelectedValue), uoDropDownListStatus.SelectedValue, GlobalCode.Field2Int(uoHiddenFieldRegion.Value), GlobalCode.Field2Int(uoHiddenFieldCountry.Value), GlobalCode.Field2Int(uoHiddenFieldCity.Value), GlobalCode.Field2Int(uoHiddenFieldPort.Value))); }
protected DataTable GetList() { TravelRequestBLL TRBLL = new TravelRequestBLL(); int RegionID = GlobalCode.Field2Int(uoHiddenFieldRegion.Value); return TRBLL.GetNoTravelList(GlobalCode.Field2DateTime(Session["DateFrom"]), GlobalCode.Field2String(Session["UserName"]), RegionID); }