/// <summary> /// Date Created: 13/02/2012 /// Created By: Josephine Gad /// (description) get default values /// </summary> /// <param name="LoadType"></param> protected void LoadDefaults(Int16 LoadType) { string sBranchName; Int32 iBranchID; if (LoadType == 0) { iBranchID = 0; } else { iBranchID = GlobalCode.Field2Int(Session["Hotel"].ToString()); } if (uoHiddenFieldRole.Value == TravelMartVariable.RoleHotelVendor) { sBranchName = ""; } else { sBranchName = uoTextBoxSearch.Text.Trim(); } uoHiddenFieldBranchID.Value = iBranchID.ToString(); HotelDashboardBLL BLL = new HotelDashboardBLL(); //BLL.GetHotelDashboardList(LoadType, GlobalCode.Field2Int( Session["Region"] .ToString()), //GlobalCode.Field2Int( Session["Country"] .ToString()), //GlobalCode.Field2Int( Session["City"] .ToString()), //GlobalCode.Field2Int( Session["Port"] .ToString()), //uoHiddenFieldUser.Value, //uoHiddenFieldRole.Value, //iBranchID, //GlobalCode.Field2DateTime(uoHiddenFieldDate.Value), //GlobalCode.Field2DateTime(uoHiddenFieldDate.Value).AddDays(double.Parse(uoHiddenFieldDateRange.Value)), //sBranchName, 0, 20); //Int32 ExceptionCount = (Int32)HotelDashboardDTO.HotelExceptionCount; //if (ExceptionCount > 0) //{ // uoHyperLinkException.Visible = true; // uoHyperLinkException.Text = "(" + ExceptionCount.ToString() + ") Exception Bookings"; // uoHyperLinkException.NavigateUrl = "Hotel/HotelOverflowBooking2.aspx?ufn=" + Request.QueryString["ufn"] + "&dt=" + Request.QueryString["dt"]; //} //else //{ // uoHyperLinkException.Visible = false; //} uoObjectDataSourceDashboard.TypeName = "TRAVELMART.Common.HotelDashboardDTO"; uoObjectDataSourceDashboard.SelectMethod = "GetHotelDashboardList"; uoObjectDataSourceDashboard.SelectCountMethod = "GetHotelDashboardListCount"; uoListViewDashboard.DataSource = null; uoListViewDashboard.DataSourceID = "uoObjectDataSourceDashboard"; }
/// <summary> /// Date Created: 13/02/2012 /// Created By: Josephine Gad /// (description) get default values /// --------------------------------------- /// Date Modified: 27/03/2012 /// Modified By: Josephine Gad /// (description) Change dt or URLs from QueryString to uoHiddenFieldDate.value /// --------------------------------------- /// Date Modified: 17/10/2012 /// Modified By: Josephine Gad /// (description) Change HotelDashboardDTO.HotelExceptionNoTravelRequestList to Session /// Remove GetHotelDashboardList /// </summary> /// <param name="LoadType"></param> protected void LoadDefaults(Int16 LoadType) { ViewState["InvalidRequest"] = ""; string sBranchName; Int32 iBranchID; if (LoadType == 0) { iBranchID = 0; } else { iBranchID = GlobalCode.Field2Int(Session["Hotel"]); } if (uoHiddenFieldRole.Value == TravelMartVariable.RoleHotelVendor) { sBranchName = ""; } else { sBranchName = uoTextBoxSearch.Text.Trim(); } uoHiddenFieldBranchID.Value = iBranchID.ToString(); HotelDashboardBLL BLL = new HotelDashboardBLL(); BLL.LoadHotelDashboardList(LoadType, GlobalCode.Field2Int(uoDropDownListRegion.SelectedValue), GlobalCode.Field2Int(uoDropDownListCountry.SelectedValue), GlobalCode.Field2Int(uoDropDownListCity.SelectedValue), GlobalCode.Field2Int(uoDropDownListPort.SelectedValue), uoHiddenFieldUser.Value, uoHiddenFieldRole.Value, GlobalCode.Field2Int(uoHiddenFieldBranchID.Value), GlobalCode.Field2DateTime(uoHiddenFieldDate.Value), GlobalCode.Field2DateTime(uoHiddenFieldDate.Value).AddDays(double.Parse(uoHiddenFieldDateRange.Value)), "", 0, 50, 0); uoListViewDashboard.DataSource = null; uoListViewDashboard.DataSourceID = "uoObjectDataSourceDashboard"; //uoListViewDashboard.DataBind(); List <HotelExceptionNoTravelRequestList> NoTRReqList = (List <HotelExceptionNoTravelRequestList>)Session["HotelDashboardDTO_HotelExceptionNoTravelRequestList"]; uoListViewExceptionNoTravelRequest.DataSource = NoTRReqList; //HotelDashboardDTO.HotelExceptionNoTravelRequestList; uoListViewExceptionNoTravelRequest.DataBind(); }
void LoadSeaport(short LoadType, int PortID, string UserID) { try { HotelDashboardBLL bll = new HotelDashboardBLL(); List <HotelDashBoardPAGenericClass> HotelDashBoard = new List <HotelDashBoardPAGenericClass>(); HotelDashBoard = bll.GetNotTurnPort(LoadType, PortID, UserID, GlobalCode.Field2DateTime(uoHiddenFieldDate.Value)); if (LoadType == 0) { uoDropDownListPortPerRegion.DataSource = null; uoDropDownListPortPerRegion.Items.Clear(); ListItem item = new ListItem("--SELECT PORT--", "0"); uoDropDownListPortPerRegion.Items.Add(item); uoDropDownListPortPerRegion.DataSource = HotelDashBoard[0].PortList; uoDropDownListPortPerRegion.DataBind(); } else if (LoadType == 1) { uoDropDownListPortPerRegion.SelectedIndex = GlobalCode.GetselectedIndex(uoDropDownListPortPerRegion, PortID); } Session["PortAgentDTO"] = (from a in HotelDashBoard[0].HotelDashBoardPortAgentClass select new PortAgentDTO { PortAgentID = a.PortAgentID.ToString(), PortAgentName = a.PortAgentName }).ToList(); uoListViewDashboardNonContract.DataSource = HotelDashBoard[0].HotelDashBoardPortAgentClass; uoListViewDashboardNonContract.DataBind(); } catch (Exception ex) { throw ex; } }
/// <summary> /// Date Created: 13/02/2012 /// Created By: Josephine Gad /// (description) get default values /// --------------------------------------- /// Date Modified: 27/03/2012 /// Modified By: Josephine Gad /// (description) Change dt or URLs from QueryString to uoHiddenFieldDate.value /// --------------------------------------- /// Date Modified: 22/05/2012 /// Modified By: Josephine Gad /// (description) Add binding of uoDropDownListRegion on first load /// --------------------------------------- /// Date Modified: 23/05/2012 /// Modified By: Josephine Gad /// (description) Remove iBranchID = GlobalCode.Field2Int(Session["Hotel"]), because there is no filter for branch in this design /// --------------------------------------- /// Modified By: Josephine gad /// Date Modified: 03/10/2012 /// Description: Change HotelDashboardDTO.RegionList to List<RegionList> listRegion /// Change HotelDashboardDTO.HotelExceptionCount to Session["HotelDashboardDTO_HotelExceptionCount"] /// Change HotelDashboardDTO.HotelOverflowCount to Session["HotelDashboardDTO_HotelOverflowCount"] /// Change HotelDashboardDTO.NoTravelRequestCount to Session["HotelDashboardDTO_NoTravelRequestCount"] /// Change HotelDashboardDTO.ArrDeptSameOnOffDateCount to Session["HotelDashboardDTO_ArrDeptSameOnOffDateCount"] /// </summary> /// <param name="LoadType"></param> protected void LoadDefaults(Int16 LoadType) { string sBranchName; Int32 iBranchID = 0; if (LoadType == 0) { iBranchID = 0; } if (uoHiddenFieldRole.Value == TravelMartVariable.RoleHotelVendor) { sBranchName = ""; } else { sBranchName = uoTextBoxSearch.Text.Trim(); } uoHiddenFieldBranchID.Value = iBranchID.ToString(); if (LoadType == 0) { uoHiddenFieldFromDefaultView.Value = "0"; } else { uoHiddenFieldFromDefaultView.Value = "1"; } HotelDashboardBLL bll = new HotelDashboardBLL(); string sBranch; if (uoHiddenFieldRole.Value == TravelMartVariable.RoleHotelVendor) { sBranch = ""; } else { sBranch = uoTextBoxSearch.Text.Trim(); } bll.LoadHotelDashboardList2(GlobalCode.Field2TinyInt(uoHiddenFieldLoadType.Value), GlobalCode.Field2Int(Session["Region"]), GlobalCode.Field2Int(Session["Country"]), GlobalCode.Field2Int(Session["City"]), GlobalCode.Field2Int(Session["Port"]), uoHiddenFieldUser.Value, uoHiddenFieldRole.Value, GlobalCode.Field2Int(uoHiddenFieldBranchID.Value), GlobalCode.Field2DateTime(uoHiddenFieldDate.Value), GlobalCode.Field2DateTime(uoHiddenFieldDate.Value), sBranch, 0, 50); //uoListViewDashboard.DataSource = null; uoListViewDashboard.DataSourceID = "uoObjectDataSourceDashboard"; //uoListViewDashboard.DataBind(); Int32 ExceptionCount = GlobalCode.Field2Int(Session["HotelDashboardDTO_HotelExceptionCount"]);//(Int32)HotelDashboardDTO.HotelExceptionCount; if (ExceptionCount >= 0) { uoHyperLinkException.Visible = true; uoHyperLinkException.Text = "Exception(" + ExceptionCount.ToString() + ")"; uoHyperLinkException.NavigateUrl = "/Hotel/HotelExceptionBookings.aspx?ufn=" + Request.QueryString["ufn"] + "&dt=" + uoHiddenFieldDate.Value; } else { uoHyperLinkException.Visible = false; } Int32 OverflowCount = GlobalCode.Field2Int(Session["HotelDashboardDTO_HotelOverflowCount"]);//(Int32)HotelDashboardDTO.HotelOverflowCount; if (OverflowCount >= 0) { uoHyperLinkOverflow.Visible = true; uoHyperLinkOverflow.Text = "Overflow(" + OverflowCount.ToString() + ")"; uoHyperLinkOverflow.NavigateUrl = "/Hotel/HotelOverflowBooking3.aspx?ufn=" + Request.QueryString["ufn"] + "&dt=" + uoHiddenFieldDate.Value; } else { uoHyperLinkOverflow.Visible = false; } Int32 NoTravelRequestCount = GlobalCode.Field2Int(Session["HotelDashboardDTO_NoTravelRequestCount"]);//GlobalCode.Field2Int(HotelDashboardDTO.NoTravelRequestCount); if (NoTravelRequestCount >= 0) { uoHyperLinkNoHotelRequest.Visible = true; uoHyperLinkNoHotelRequest.Text = "No Travel Request(" + NoTravelRequestCount.ToString() + ")"; uoHyperLinkNoHotelRequest.NavigateUrl = "NoTravelRequest2.aspx?ufn=" + Request.QueryString["ufn"] + "&dt=" + uoHiddenFieldDate.Value; } else { uoHyperLinkNoHotelRequest.Visible = false; } Int32 ArrDeptSameOnOffDateCount = GlobalCode.Field2Int(Session["HotelDashboardDTO_ArrDeptSameOnOffDateCount"]);//GlobalCode.Field2Int(HotelDashboardDTO.ArrDeptSameOnOffDateCount); if (ArrDeptSameOnOffDateCount >= 0) { uoHyperLinkArrDepSameDate.Visible = true; uoHyperLinkArrDepSameDate.Text = "Same Day Arr/Dep(" + ArrDeptSameOnOffDateCount.ToString() + ")"; uoHyperLinkArrDepSameDate.NavigateUrl = "ArrivalDepartureSameDate.aspx?ufn=" + Request.QueryString["ufn"] + "&dt=" + uoHiddenFieldDate.Value; } else { uoHyperLinkArrDepSameDate.Visible = false; } Int32 NoHotelContractCount = GlobalCode.Field2Int(Session["HotelDashboardDTO_NoContractCount"]);//GlobalCode.Field2Int(HotelDashboardDTO.NoContractCount); if (NoHotelContractCount >= 0) { uoHyperLinkNoHotelContract.Visible = true; uoHyperLinkNoHotelContract.Text = "Non Turn Ports(" + NoHotelContractCount.ToString() + ")"; uoHyperLinkNoHotelContract.NavigateUrl = "/Hotel/HotelNonTurnPortsPA.aspx?ufn=" + Request.QueryString["ufn"] + "&dt=" + uoHiddenFieldDate.Value + "&ex=" + "11"; } else { uoHyperLinkNoHotelContract.Visible = false; } Int32 RestrictedNationalityCount = GlobalCode.Field2Int(Session["HotelDashboardDTO_RestrictedNationalityCount"]); if (RestrictedNationalityCount >= 0) { uoHyperLinkRestrictedNationality.Visible = true; uoHyperLinkRestrictedNationality.Text = "Restricted Nationalities(" + RestrictedNationalityCount.ToString() + ")"; uoHyperLinkRestrictedNationality.NavigateUrl = "RestrictedNationality.aspx?ufn=" + Request.QueryString["ufn"] + "&dt=" + uoHiddenFieldDate.Value; } if (LoadType == 0) { List <RegionList> listRegion = new List <RegionList>(); listRegion = (List <RegionList>)Session["HotelDashboardDTO_RegionList"]; uoDropDownListRegion.Items.Clear(); uoDropDownListRegion.DataSource = listRegion; uoDropDownListRegion.DataTextField = "RegionName"; uoDropDownListRegion.DataValueField = "RegionId"; uoDropDownListRegion.DataBind(); uoDropDownListRegion.Items.Insert(0, new ListItem("--Select Region--", "0")); DateTime dtE1CHProcess = TMSettings.E1CHLastProcessedDate; uoLabelE1Processed.Text = "E1 Crew History Last Processed: " + dtE1CHProcess.ToString("MMM/dd/yyyy HH:mm tt"); } string sRegion = GlobalCode.Field2String(Session["Region"]); if (sRegion != "") { if (uoDropDownListRegion.Items.FindByValue(sRegion) != null) { uoDropDownListRegion.SelectedValue = sRegion; } } BindPort(); }
/// <summary> /// Date Modified: 16/08/2012 /// Modified By: Jefferson Bermundo /// (description) Clean Copy of HotelView4 /// ------------------------------------------- /// Modified By: Josephine Gad /// Date Modified: 03/10/2012 /// Description: Change HotelDashboardDTO.RegionList to List<RegionList> listRegion /// Change HotelDashboardDTO.HotelExceptionCount to Session["HotelDashboardDTO_HotelExceptionCount"] /// Change HotelDashboardDTO.HotelOverflowCount to Session["HotelDashboardDTO_HotelOverflowCount"] /// Change HotelDashboardDTO.NoTravelRequestCount to Session["HotelDashboardDTO_NoTravelRequestCount"] /// Change HotelDashboardDTO.ArrDeptSameOnOffDateCount to Session["HotelDashboardDTO_ArrDeptSameOnOffDateCount"] /// ------------------------------------------- /// Modified By: Josephine Gad /// Date Modified: 11/10/2012 /// Description: Remove uoDropDownListRegion /// ------------------------------------------- /// Modified By: Josephine Gad /// Date Modified: 28/Nov/2012 /// Description: Add LoadHotelDashboardList2 for the default value /// Remove unnecessary links /// ------------------------------------------- /// </summary> /// <param name="LoadType"></param> protected void LoadDefaults(Int16 LoadType) { string sBranchName; Int32 iBranchID = 0; if (LoadType == 0) { iBranchID = 0; } if (uoHiddenFieldRole.Value == TravelMartVariable.RoleHotelVendor) { sBranchName = ""; } if (Session["UserBranchId"] != null) { int.TryParse(Session["UserBranchId"].ToString(), out iBranchID); uoHiddenFieldBranchId.Value = Session["UserBranchId"].ToString(); } uoHiddenFieldBranchId.Value = iBranchID.ToString(); HotelDashboardBLL bll = new HotelDashboardBLL(); bll.LoadHotelDashboardList2(GlobalCode.Field2TinyInt(uoHiddenFieldLoadType.Value), GlobalCode.Field2Int(Session["Region"]), GlobalCode.Field2Int(Session["Country"]), GlobalCode.Field2Int(Session["City"]), GlobalCode.Field2Int(Session["Port"]), uoHiddenFieldUser.Value, uoHiddenFieldRole.Value, iBranchID, GlobalCode.Field2DateTime(uoHiddenFieldDate.Value), GlobalCode.Field2DateTime(uoHiddenFieldDate.Value), "", 0, 50); //uoListViewDashboard.DataSource = null; uoListViewDashboard.DataSourceID = "uoObjectDataSourceDashboard"; //uoListViewDashboard.DataBind(); //Int32 ExceptionCount = GlobalCode.Field2Int(Session["HotelDashboardDTO_HotelExceptionCount"]);//(Int32)HotelDashboardDTO.HotelExceptionCount; //if (ExceptionCount >= 0) //{ // uoHyperLinkException.Visible = true; // uoHyperLinkException.Text = "Exception(" + ExceptionCount.ToString() + ")"; // uoHyperLinkException.NavigateUrl = "/Hotel/HotelExceptionBookings.aspx?ufn=" + Request.QueryString["ufn"] + "&dt=" + uoHiddenFieldDate.Value; //} //else //{ // uoHyperLinkException.Visible = false; //} //Int32 OverflowCount = GlobalCode.Field2Int(Session["HotelDashboardDTO_HotelOverflowCount"]);//(Int32)HotelDashboardDTO.HotelOverflowCount; //if (OverflowCount >= 0) //{ // uoHyperLinkOverflow.Visible = true; // uoHyperLinkOverflow.Text = "Overflow(" + OverflowCount.ToString() + ")"; // uoHyperLinkOverflow.NavigateUrl = "/Hotel/HotelOverflowBooking3.aspx?ufn=" + Request.QueryString["ufn"] + "&dt=" + uoHiddenFieldDate.Value; //} //else //{ // uoHyperLinkOverflow.Visible = false; //} //Int32 NoTravelRequestCount = GlobalCode.Field2Int(Session["HotelDashboardDTO_NoTravelRequestCount"]);//GlobalCode.Field2Int(HotelDashboardDTO.NoTravelRequestCount); //if (NoTravelRequestCount >= 0) //{ // uoHyperLinkNoHotelRequest.Visible = true; // uoHyperLinkNoHotelRequest.Text = "No Travel Request(" + NoTravelRequestCount.ToString() + ")"; // uoHyperLinkNoHotelRequest.NavigateUrl = "NoTravelRequest2.aspx?ufn=" + Request.QueryString["ufn"] + "&dt=" + uoHiddenFieldDate.Value; //} //else //{ // uoHyperLinkNoHotelRequest.Visible = false; //} //Int32 ArrDeptSameOnOffDateCount = GlobalCode.Field2Int(Session["HotelDashboardDTO_ArrDeptSameOnOffDateCount"]);//GlobalCode.Field2Int(HotelDashboardDTO.ArrDeptSameOnOffDateCount); //if (ArrDeptSameOnOffDateCount >= 0) //{ // uoHyperLinkArrDepSameDate.Visible = true; // uoHyperLinkArrDepSameDate.Text = "Same Day Arr/Dep(" + ArrDeptSameOnOffDateCount.ToString() + ")"; // uoHyperLinkArrDepSameDate.NavigateUrl = "ArrivalDepartureSameDate.aspx?ufn=" + Request.QueryString["ufn"] + "&dt=" + uoHiddenFieldDate.Value; //} //else //{ // uoHyperLinkArrDepSameDate.Visible = false; //} }