示例#1
0
        /// <summary>
        /// Date Created: 21/02/2012
        /// Created By: Gabriel Oquialda
        /// (description) Insert validation of country code
        /// </summary>
        private Boolean countrycodeInInsertExist()
        {
            String CountryCode = uoTextBoxCountryCode.Text;

            Boolean bValidation = HotelBLL.countrycodeInInsertExist(CountryCode, GlobalCode.Field2Int(Session["CountryId"].ToString()));

            return(bValidation);
        }
示例#2
0
        protected void uoObjectDataSourceTRException_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
        {
            e.InputParameters["iFilterBy"] = GlobalCode.Field2TinyInt(uoDropDownListFilterBy.SelectedValue);
            e.InputParameters["sFilter"]   = uoTextBoxFilter.Text.Trim();

            e.InputParameters["sRecordLocator"] = uoTextBoxRecordLocator.Text;
            e.InputParameters["iSequenceNo"]    = GlobalCode.Field2Int(uoTextBoxSequenceNo.Text);
        }
示例#3
0
 public int GetTRRestrictedNationalityCount
     (Int16 LoadType, DateTime FromDate, DateTime ToDate,
     string UserID, string Role, string OrderBy, int VesselID, int FilterByName,
     string SeafarerID, int NationalityID, int Gender, int RankID, string Status,
     int RegionID, int CountryID, int CityID, int PortID)
 {
     return(GlobalCode.Field2Int(HttpContext.Current.Session["TravelRequestRestrictedNationalityCount"]));
 }
示例#4
0
        /// <summary>
        /// Author:         Josephine Gad
        /// Date Created:   05/07/2012
        /// Descrption:     Get Travel Request Remarks
        /// -------------------------------------------------------
        /// </summary>
        private List<TravelRequestRemarks> GetRemarksList(Int16 LoadType)
        {          
            List<TravelRequestRemarks> list = new List<TravelRequestRemarks>();

            list = BLL.GetTravelRequestRemarks(LoadType, 0, GlobalCode.Field2Int(Request.QueryString["trID"]),
               GlobalCode.Field2String(Session["UserName"])).ToList();
            return list;
        }
 void GetPortAgentHotelVehicle()
 {
     GetPortAgentHotelVehicle(0, uoHiddenFieldPortCode.Value
                              , GlobalCode.Field2Int(uoDropDownListSeaport.SelectedValue)
                              , GlobalCode.Field2Int(uoDropDownListPortAgent.SelectedValue)
                              , GlobalCode.Field2DateTime(uoHiddenFieldRequestDate.Value)
                              , GlobalCode.Field2Int(uoDropDownListDays.SelectedValue));
 }
示例#6
0
 public int GetForecastManifestCount(string DateFromString,
                                     string DateToString, string strUser, string DateFilter, string ByNameOrID, string filterNameOrID,
                                     string Nationality, string Gender, string Rank, string Status,
                                     string Region, string Country, string City, string Port, string Hotel, string Vessel, string UserRole,
                                     Int16 LoadType)
 {
     return(GlobalCode.Field2Int(HttpContext.Current.Session["ManifestDTO_TentativeManifestCount"]));
 }
        private static List <CityList> GetGenericCityLis(string CountryID)
        {
            List <Country>     country = (List <Country>)HttpContext.Current.Session["Country"];
            List <Country>     City    = country.Where(n => n.CountryID == GlobalCode.Field2Int(CountryID)).OrderBy(a => a.CountryName).ToList();
            ImmigrationCompany t       = new ImmigrationCompany();

            return(City[0].City);
        }
示例#8
0
        /// <summary>
        /// -------------------------------------------------------------------
        /// Author:         Josephine Gad
        /// Date Created:   05/Mar/2014
        /// Descrption:     Get List of Service Provider, Hotel Manifest and Vehicle Manifest
        /// -------------------------------------------------------------------
        /// </summary>
        private void BindList(Int16 iLoadType)
        {
            Int32 iPortID = GlobalCode.Field2Int(Session["Port"]);

            BLL.PortAgentManifestGet(GlobalCode.Field2Int(uoDropDownListPortAgent.SelectedValue),
                                     uoHiddenFieldDate.Value, uoHiddenFieldUser.Value, uoHiddenFieldRole.Value,
                                     uoHiddenFieldOrder.Value, iPortID, iLoadType, GlobalCode.Field2Int(uoDropDownListDays.SelectedValue));
        }
示例#9
0
        /// <summary>
        /// Author:         Josephine Gad
        /// Date Created:   07/Dec/2012
        /// Descrption:     Get Active Exception List (active in PNR but X in Travel Routing) and store in session
        /// </summary>
        public static void GetActiveExceptionList(Int16 iFilterBy, string sFilter,
                                                  string sRecordLocator, int iSequenceNo,
                                                  int StartRow, int MaxRow)
        {
            Database  db   = ConnectionSetting.GetConnection(); //  DatabaseFactory.CreateDatabase();
            DbCommand comm = null;
            DataSet   ds   = null;
            List <ActiveExceptionList> list = new List <ActiveExceptionList>();

            try
            {
                HttpContext.Current.Session["ActiveExceptionList"]  = list;
                HttpContext.Current.Session["ActiveExceptionCount"] = 0;

                comm = db.GetStoredProcCommand("uspSelectExceptionTravelRouting");
                db.AddInParameter(comm, "@pFilterBy", DbType.Int16, iFilterBy);
                db.AddInParameter(comm, "@pFilterVarchar", DbType.String, sFilter);

                db.AddInParameter(comm, "@pRecordLocator", DbType.String, sRecordLocator);
                db.AddInParameter(comm, "@pItinerarySequence", DbType.Int32, iSequenceNo);

                db.AddInParameter(comm, "@pStartRow", DbType.Int32, StartRow);
                db.AddInParameter(comm, "@pMaxRow", DbType.Int32, MaxRow);

                ds = db.ExecuteDataSet(comm);
                int iCount = GlobalCode.Field2Int(ds.Tables[0].Rows[0][0]);

                list = (from a in ds.Tables[1].AsEnumerable()
                        select new ActiveExceptionList
                {
                    RecordLocator = a["colRecordLocatorVarchar"].ToString(),
                    SequenceNo = GlobalCode.Field2Int(a["colItinerarySeqNoSmallint"]),
                    Name = a["Name"].ToString(),
                    E1No = GlobalCode.Field2Int(a["colSeafarerIdInt"]),
                    E1TRNo = GlobalCode.Field2Int(a["colE1TravelReqIdInt"]),
                    Status = a["colStatusVarchar"].ToString(),
                    OnOffDate = GlobalCode.Field2DateTime(a["DateOnOff"])
                }).ToList();

                HttpContext.Current.Session["ActiveExceptionList"]  = list;
                HttpContext.Current.Session["ActiveExceptionCount"] = iCount;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (comm != null)
                {
                    comm.Dispose();
                }
                if (ds != null)
                {
                    ds.Dispose();
                }
            }
        }
示例#10
0
        /// <summary>
        /// Author:         Josephine Gad
        /// Date Created:   04/Dec/2012
        /// Descrption:     Get XML Exception and store in session
        /// </summary>
        /// <param name="sUserName"></param>
        /// <param name="sRole"></param>
        /// <param name="DateFrom"></param>
        /// <param name="DateTo"></param>
        /// <param name="sRecordLocator"></param>
        /// <param name="iSequenceNo"></param>
        /// <param name="StartRow"></param>
        /// <param name="MaxRow"></param>
        public static void GetXMLExceptionList(string sUserName, string sRole,
                                               string DateFrom, string DateTo, string sRecordLocator, int iSequenceNo,
                                               int StartRow, int MaxRow)
        {
            Database  db   = ConnectionSetting.GetConnection(); //  DatabaseFactory.CreateDatabase();
            DbCommand comm = null;
            DataSet   ds   = null;
            List <XMLExceptionList> list = new List <XMLExceptionList>();

            try
            {
                HttpContext.Current.Session["XMLExceptionList"]  = list;
                HttpContext.Current.Session["XMLExceptionCount"] = 0;

                comm = db.GetStoredProcCommand("uspSelectExceptionXML");
                db.AddInParameter(comm, "@pUserIDVarchar", DbType.String, sUserName);
                db.AddInParameter(comm, "@pUserRoleVarchar", DbType.String, sRole);
                db.AddInParameter(comm, "@pDateFrom", DbType.DateTime, GlobalCode.Field2DateTime(DateFrom));
                if (DateTo.Trim() != "")
                {
                    db.AddInParameter(comm, "@pDateTo", DbType.DateTime, GlobalCode.Field2DateTime(DateTo));
                }
                db.AddInParameter(comm, "@pRecordLocator", DbType.String, sRecordLocator);
                db.AddInParameter(comm, "@pItinerarySequence", DbType.Int32, iSequenceNo);
                db.AddInParameter(comm, "@pStartRow", DbType.Int32, StartRow);
                db.AddInParameter(comm, "@pMaxRow", DbType.Int32, MaxRow);

                ds = db.ExecuteDataSet(comm);
                int iCount = GlobalCode.Field2Int(ds.Tables[0].Rows[0][0]);

                list = (from a in ds.Tables[1].AsEnumerable()
                        select new XMLExceptionList {
                    ExceptionID = GlobalCode.Field2Int(a["ExceptionIDBigint"]),
                    RecordLocator = a["FK_ItineraryRefID"].ToString(),
                    SequenceNo = GlobalCode.Field2Int(a["FK_ItinerarySeqNmbr"]),
                    Description = a["Description"].ToString(),
                    DateCreated = GlobalCode.Field2DateTime(a["DateCreatedDatetime"])
                }).ToList();

                HttpContext.Current.Session["XMLExceptionList"]  = list;
                HttpContext.Current.Session["XMLExceptionCount"] = iCount;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (comm != null)
                {
                    comm.Dispose();
                }
                if (ds != null)
                {
                    ds.Dispose();
                }
            }
        }
        /// <summary>
        /// Date Created: 27/07/2011
        /// Created By: Gabriel Oquialda
        /// (description) Save new vendor
        /// -------------------------------------------
        /// Date Modified:  05/Aug/2013
        /// Created By:     Josephine Gad
        /// (description)   Change endorMaintenanceBLL.vendorMaintenanceInsert to endorMaintenanceBLL.VehicleVendorsSave
        ///                 Add Audit Trail in the same script
        ///                 Remove the separate Audit Trail
        /// </summary>
        protected void uoButtonSave_Click(object sender, EventArgs e)
        {
            DataTable dt = null;

            try
            {
                string   strLogDescription;
                string   strFunction = "uoButtonSave_Click";
                DateTime currentDate = CommonFunctions.GetCurrentDateTime();

                if (GlobalCode.Field2Int(uoHiddenFieldVehicleVendorIdInt.Value) == 0)
                {
                    strLogDescription = "Meet and Greet vendor added.";
                }
                else
                {
                    strLogDescription = "Meet and Greet vendor updated.";
                }

                string vendorPrimaryId = GlobalCode.Field2Int(uoHiddenFieldVehicleVendorIdInt.Value).ToString();//(Session["vendorPrimaryId"].ToString() == null) ? "0" : Session["vendorPrimaryId"].ToString();

                dt = new DataTable();
                dt.Columns.Add("VehicleTypeID", typeof(int));

                DataRow     r;
                HiddenField hiddenFieldVehicleTypeID;

                foreach (ListViewItem item in uoListViewVehicleType.Items)
                {
                    r = dt.NewRow();
                    hiddenFieldVehicleTypeID = (HiddenField)item.FindControl("uoHiddenFieldVehicleTypeID");
                    r[0] = GlobalCode.Field2Int(hiddenFieldVehicleTypeID.Value);
                    dt.Rows.Add(r);
                }

                //Commment for now BY JHO
                //MeetAndGreetBLL.MeetAndGreetSave(GlobalCode.Field2Int(vendorPrimaryId),
                //    uoTextBoxVendorName.Text, //GlobalCode.Field2Int(uoDropDownListCountry.SelectedValue),
                //    GlobalCode.Field2Int(uoDropDownListCity.SelectedValue), uoTextBoxContactNo.Text,
                //    uoTextBoxFaxNo.Text, uoTextBoxContactPerson.Text, uoTextBoxVendorAddress.Text,
                //    uoTextBoxEmailCc.Text, uoTextBoxEmailTo.Text, uoTextBoxWebsite.Text,
                //    GlobalCode.Field2String(Session["UserName"]), strLogDescription, strFunction,
                //    Path.GetFileName(Request.Path), CommonFunctions.GetDateTimeGMT(currentDate), DateTime.Now, dt,dt);

                OpenParentPage();
            }
            catch (Exception ex)
            {
                AlertMessage(ex.Message);
            }
            finally
            {
                if (dt != null)
                {
                    dt.Dispose();
                }
            }
        }
示例#12
0
        /// <summary>
        /// Date Created:   01/08/2011
        /// Created By:     Gabriel Oquialda
        /// (description)   Loads vendor information
        /// -----------------------------------------
        /// Date Modified:  28/11/2011
        /// Modified By:    Charlene Remotigue
        /// (description)   optimization (use datareader instead of datatable
        /// -----------------------------------------
        /// Date Modified:  24/01/2012
        /// Modified By:    Josephine Gad
        /// (description)   Close IDataReader and add cityname in textbox
        ///                 Disable uoTextBoxVendorCode if there is value
        /// </summary>
        private void vendorInfoLoad()
        {
            IDataReader drVendorInfo = null;

            try
            {
                if (Request.QueryString["vmId"].ToString() != "0")
                {
                    drVendorInfo = VendorMaintenanceBLL.vendorMaintenanceInformation(GlobalCode.Field2Int(uoHiddenFieldVendorIdInt.Value));
                    if (drVendorInfo.Read())
                    {
                        uoTextBoxVendorCode.Text = drVendorInfo["colVendorCodeVarchar"].ToString();
                        if (uoTextBoxVendorCode.Text.Trim() != "")
                        {
                            uoTextBoxVendorCode.CssClass = "ReadOnly";
                            uoTextBoxVendorCode.ReadOnly = true;
                        }
                        uoTextBoxVendorName.Text = drVendorInfo["colVendorNameVarchar"].ToString();

                        string strVendorType = drVendorInfo["colVendorTypeVarchar"].ToString();
                        uoHiddenFieldVendorType.Value = strVendorType;

                        //string strHotelCategory = drVendorInfo.Rows[0]["colVendorHotelCategoryVarchar"].ToString();
                        //uoDropDownListHotelCategory.SelectedValue = strHotelCategory;

                        uoTextBoxVendorAddress.Text = drVendorInfo["colAddressVarchar"].ToString();

                        uoDropDownListCountry.SelectedValue = drVendorInfo["colCountryIDInt"].ToString();
                        uoTextBoxCityName.Text = drVendorInfo["colCityNameVarchar"].ToString();
                        if (uoDropDownListCountry.SelectedIndex > 1)
                        {
                            vendorCityLoad(Convert.ToInt32(uoDropDownListCountry.SelectedValue));
                        }
                        uoDropDownListCity.SelectedValue = drVendorInfo["colCityIDInt"].ToString();

                        uoTextBoxPerson.Text    = drVendorInfo["colContactPersonVarchar"].ToString();
                        uoTextBoxContactNo.Text = drVendorInfo["colContactNoVarchar"].ToString();
                        //uoCheckBoxVendorAccredited.Checked = Convert.ToBoolean(drVendorInfo["colIsAccreditedBit"].ToString());

                        ChangeToUpperCase(uoDropDownListCountry);
                        ChangeToUpperCase(uoDropDownListCity);
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (drVendorInfo != null)
                {
                    drVendorInfo.Close();
                    drVendorInfo.Dispose();
                }
            }
        }
 /// <summary>
 /// Author:         Josephine Monteza
 /// Date Created:   8/May/2015
 /// Description:    Bind Days
 /// </summary>
 private void BindDayTo()
 {
     if (Session["NoOfDays_Forecast"] != null)
     {
         int i = GlobalCode.Field2Int(Session["NoOfDays_Forecast"]);
         uoHiddenFieldTo.Value = GlobalCode.Field2DateTime(
             uoHiddenFieldFrom.Value).AddDays(i).ToString();
     }
 }
示例#14
0
        protected void uoListViewSeaport_ItemDeleting(object sender, ListViewDeleteEventArgs e)
        {
            Label       uoLabelSeaport         = (Label)uoListViewSeaport.Items[e.ItemIndex].FindControl("uoLabelSeaport");
            HiddenField uoHiddenFieldSeaportID = (HiddenField)uoListViewSeaport.Items[e.ItemIndex].FindControl("uoHiddenFieldSeaportID");

            int i = GlobalCode.Field2Int(uoHiddenFieldSeaportID.Value);

            SeaportListViewRemove(i, uoLabelSeaport.Text);
        }
示例#15
0
        /// <summary>
        /// Date Created:   17/Oct/2017
        /// Created By:     Josephine Monteza
        /// (description)   Get Vendor list of user
        /// </summary>
        /// <param name="sLoginName"></param>
        /// <param name="sUsername"></param>
        /// <returns></returns>
        public static List <UserVendorList> UserVendorGet(string sLoginName, string sUsername, string sRoleToCheck)
        {
            Database  db          = ConnectionSetting.GetConnection(); //  DatabaseFactory.CreateDatabase()
            DbCommand comm        = null;
            DbCommand commSummary = null;

            DataTable             dt   = null;
            List <UserVendorList> list = new List <UserVendorList>();

            try
            {
                comm = db.GetStoredProcCommand("uspUserVendorGet");
                db.AddInParameter(comm, "@pLoginName", DbType.String, sLoginName);
                db.AddInParameter(comm, "@pUserName", DbType.String, sUsername);
                db.AddInParameter(comm, "@pRoleToCheck", DbType.String, sRoleToCheck);

                db.ExecuteNonQuery(comm);

                commSummary = db.GetStoredProcCommand("uspUserVendorGetSummary");
                db.AddInParameter(commSummary, "@pLoginName", DbType.String, sLoginName);
                db.AddInParameter(commSummary, "@pUserName", DbType.String, sUsername);
                dt = db.ExecuteDataSet(commSummary).Tables[0];
                if (dt.Rows.Count > 0)
                {
                    list = (from a in dt.AsEnumerable()
                            select new UserVendorList
                    {
                        UserName = a.Field <string>("UserName"),
                        UserRole = a.Field <string>("UserRole"),
                        VendorID = GlobalCode.Field2Int(a["VendorID"]),
                        VendorName = a.Field <string>("VendorName"),
                        VendorType = a.Field <string>("VendorType")
                    }).ToList();
                }

                return(list);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (comm != null)
                {
                    comm.Dispose();
                }
                if (commSummary != null)
                {
                    commSummary.Dispose();
                }
                if (dt != null)
                {
                    dt.Dispose();
                }
            }
        }
示例#16
0
        /// <summary>
        /// Author:         Josephine Gad
        /// Date Created:   21/Dec/2012
        /// Description:    Load locked Manifest Summary
        /// -----------------------------------
        /// </summary>
        public static int LoadLockedManifestSummaryCount(string UserID, Int16 iLoadType,
                                                         string sDateFrom, string sDateTo, Int16 iManifestTypeID,
                                                         int iRegion, int iPort, int iBranch, Int16 FromDefaultView)
        {
            int iCount = 0;

            iCount = GlobalCode.Field2Int(HttpContext.Current.Session["LockedManifestSummaryCount"]);
            return(iCount);
        }
 public void OnEndExceptions(IAsyncResult ar)
 {
     _PortAgentDeligate.EndInvoke(ar);
     GetPortAgentHotelVehicle(0, uoHiddenFieldPortCode.Value
                              , GlobalCode.Field2Int(uoDropDownListSeaport.SelectedValue)
                              , GlobalCode.Field2Int(uoDropDownListPortAgent.SelectedValue)
                              , GlobalCode.Field2DateTime(uoHiddenFieldRequestDate.Value)
                              , GlobalCode.Field2Int(uoDropDownListDays.SelectedValue));
 }
        protected void uoListViewServiceTypeDuration_ItemDeleting(object sender, ListViewDeleteEventArgs e)
        {
            Label       uoLabelServiceTypeName     = (Label)uoListViewServiceTypeDuration.Items[e.ItemIndex].FindControl("uoLabelServiceTypeName");
            HiddenField uoHiddenFieldServiceTypeID = (HiddenField)uoListViewServiceTypeDuration.Items[e.ItemIndex].FindControl("uoHiddenFieldServiceTypeID");

            int i = GlobalCode.Field2Int(uoHiddenFieldServiceTypeID.Value);

            ServiceTypeDurationRemove(i, uoLabelServiceTypeName.Text);
        }
示例#19
0
        public int GetCrewAssistRemarksCount(Int32 iYear,
                                             Int32 iMonth, string sCreatedBy, string sUserID, Int16 iLoadType,
                                             Int16 iFilterBy, string sFilterValue,
                                             string sOrderBy, short sIRBy)
        {
            int i = GlobalCode.Field2Int(HttpContext.Current.Session["CrewAssistRemarks_Count"]);

            return(i);
        }
        protected void btnSave_click(object sender, EventArgs e)
        {
            MaintenanceViewBLL        BLL            = new MaintenanceViewBLL();
            List <ImmigrationCompany> ImmigrationCom = new List <ImmigrationCompany>();
            var list = BLL.SaveImmigationCompany(GlobalCode.Field2Int(uoHiddenFieldImmigrationCompanyID.Value), GlobalCode.Field2Int(cboCountry.SelectedValue), GlobalCode.Field2Int(cboCity.SelectedValue), txtCompany.Text.ToString(), txtAddress.Text.ToString(), txtEmailAdd.Text.ToString(), txtPhoneNo.Text.ToString(), (Request.QueryString["uID"] != null) ? Request.QueryString["uID"] : "");

            uoListviewImmigrationCompany.DataSource = list;
            uoListviewImmigrationCompany.DataBind();
        }
        /// <summary>
        /// Date Created:   02/Jul/2014
        /// Created By:     Josephine Gad
        /// (description)   Get count of hotels
        /// </summary>
        public int GetBranchCount(int iRegionID, int iAirportID, string sAirportName,
                                  Int16 iRoomTypeID, int iBrandID, string sBranchFilter, string sOrderBy,
                                  Int16 iLoadType, string sUserID)
        {
            int iCount = 0;

            iCount = GlobalCode.Field2Int(Session["HotelAirportBrand_HotelCount"]);
            return(iCount);
        }
示例#22
0
 protected void uoObjectDataSourceDashboard_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
 {
     e.InputParameters["iYear"]         = GlobalCode.Field2Int(uoDropDownListYear.SelectedValue);
     e.InputParameters["iMonth"]        = GlobalCode.Field2TinyInt(uoDropDownListMonth.SelectedValue);
     e.InputParameters["iRegion"]       = GlobalCode.Field2Int(uoDropDownListRegion.SelectedValue);
     e.InputParameters["iPort"]         = GlobalCode.Field2Int(uoDropDownListPortPerRegion.SelectedValue);
     e.InputParameters["sUser"]         = uoHiddenFieldUser.Value;
     e.InputParameters["IsPageChanged"] = GlobalCode.Field2Bool(uoHiddenFieldIsPageChanged.Value);
 }
示例#23
0
        public Int32 GetImmigrationCount(Int16 LoadType, DateTime FromDate, DateTime ToDate,
                                         string UserID, string Role, string OrderBy, int SeaportID, string FilterByName,
                                         string SeafarerID, string NationalityID, string Gender, string RankID, string Status,
                                         Int16 iAirLeg, Int16 iRouteFrom, Int16 iRouteTo)
        {
            Int32 iCount = 0;

            iCount = GlobalCode.Field2Int(HttpContext.Current.Session["Immigration_ManifestCount"]);
            return(iCount);
        }
示例#24
0
        /// <summary>
        /// Date Created:   5/Dec/2012
        /// Created By:     Josephine Gad
        /// (description)   Refresh parameters of datasource
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void uoObjectDataSourceTRException_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
        {
            e.InputParameters["sUserName"] = uoHiddenFieldUser.Value;
            e.InputParameters["sRole"]     = uoHiddenFieldUserRole.Value;

            e.InputParameters["DateFrom"]       = uoHiddenFieldDate.Value;
            e.InputParameters["DateTo"]         = uoTextBoxTo.Text.Trim();
            e.InputParameters["sRecordLocator"] = uoTextBoxRecordLocator.Text;
            e.InputParameters["iSequenceNo"]    = GlobalCode.Field2Int(uoTextBoxSequenceNo.Text);
        }
        protected void uoCheckBoxShowAll_CheckedChanged(object sender, EventArgs e)
        {
            Session["NoOfDays_Forecast_Vendor"] = uoDropDownListDays.SelectedValue;
            uoHiddenFieldNoOfDays.Value         = uoDropDownListDays.SelectedValue;

            uoHiddenFieldTo.Value = GlobalCode.Field2DateTime(
                uoHiddenFieldFrom.Value).AddDays(GlobalCode.Field2Int(uoDropDownListDays.SelectedValue)).ToString();
            uoHiddenFieldLoadType.Value = "1";
            GetSFHotelTravelDetails();
        }
示例#26
0
        /// <summary>
        /// Date Created:   27/Nov/2012
        /// Created By:     Josephine Gad
        /// (description)   Get Menu of users using list
        /// </summary>
        /// <param name="UserName"></param>
        /// <returns></returns>
        public static List <UserMenuList> GetMenuListByUser(string UserName)
        {
            Database  db   = ConnectionSetting.GetConnection(); //  DatabaseFactory.CreateDatabase()
            DbCommand comm = null;
            DataSet   ds   = null;

            List <UserMenuList> list = new List <UserMenuList>();

            try
            {
                comm = db.GetStoredProcCommand("uspGetMenuByUser");
                db.AddInParameter(comm, "@pUserName", DbType.String, UserName);
                ds = db.ExecuteDataSet(comm);
                if (ds.Tables.Count > 0)
                {
                    list.Add(new UserMenuList()
                    {
                        UserMenu = (from a in ds.Tables[0].AsEnumerable()
                                    select new UserMenus
                        {
                            PageIDInt = GlobalCode.Field2Int(a["colPageIDInt"]),
                            ModuleName = a["colModuleNameVarchar"].ToString(),
                            PageName = a["colPageNameVarchar"].ToString(),
                            DisplayName = a["colDisplayNameVarchar"].ToString()
                        }).ToList(),
                        UserSubMenu = (from a in ds.Tables[1].AsEnumerable()
                                       select new UserSubMenus
                        {
                            ParentIDInt = GlobalCode.Field2Int(a["colParentPageIDInt"]),
                            PageIDInt = GlobalCode.Field2Int(a["colPageIDInt"]),
                            ModuleName = a["colModuleNameVarchar"].ToString(),
                            PageName = a["colPageNameVarchar"].ToString(),
                            DisplayName = a["colDisplayNameVarchar"].ToString(),
                            Sequence = GlobalCode.Field2Int(a["colSequenceInt"]),
                        }).ToList(),
                    });
                }
                return(list);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (comm != null)
                {
                    comm.Dispose();
                }
                if (ds != null)
                {
                    ds.Dispose();
                }
            }
        }
        /// <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";
        }
示例#28
0
        /// <summary>
        /// Date Created:   11/Jan/2013
        /// Created By:     Josephine Gad
        /// (description)   Get user's region and regions to be added
        /// </summary>
        public static void GetUserRegion(string UserString, string LoginName)
        {
            DbCommand comm = null;
            DataSet   ds   = null;

            try
            {
                HttpContext.Current.Session.Remove("UserRegionList");
                HttpContext.Current.Session.Remove("UserRegionToAdd");

                List <UserRegionList>  RegionList      = new List <UserRegionList>();
                List <UserRegionToAdd> RegionListToAdd = new List <UserRegionToAdd>();


                Database db = ConnectionSetting.GetConnection(); //  DatabaseFactory.CreateDatabase()
                comm = db.GetStoredProcCommand("uspGetUserRegion");
                db.AddInParameter(comm, "@pUserIDVarchar", DbType.String, UserString);
                db.AddInParameter(comm, "@pLoginName", DbType.String, LoginName);
                ds = db.ExecuteDataSet(comm);

                RegionList = (from a in ds.Tables[0].AsEnumerable()
                              select new UserRegionList {
                    UserRegionID = GlobalCode.Field2Int(a["colUserRegionIDInt"]),
                    RegionID = GlobalCode.Field2Int(a["colRegionIDInt"]),
                    RegionName = GlobalCode.Field2String(a["colRegionNameVarchar"]),
                    IsExist = GlobalCode.Field2Bool(a["IsExist"])
                }).ToList();

                RegionListToAdd = (from a in ds.Tables[1].AsEnumerable()
                                   select new UserRegionToAdd
                {
                    RegionID = GlobalCode.Field2Int(a["colRegionIDInt"]),
                    RegionName = GlobalCode.Field2String(a["colRegionNameVarchar"])
                }).ToList();

                HttpContext.Current.Session["UserRegionList"]  = RegionList;
                HttpContext.Current.Session["UserRegionToAdd"] = RegionListToAdd;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (comm != null)
                {
                    comm.Dispose();
                }
                if (ds != null)
                {
                    ds.Dispose();
                }
            }
        }
示例#29
0
        public Int32 GetForecastManifestCount(string sBranchName,
                                              string sDateFrom, string sDateTo,
                                              string sVesselCode, int sPortID,
                                              string sUser, string sRole, bool bIsHotelVendorView,
                                              Int16 LoadType, bool bShowAll)
        {
            Int32 i;

            i = GlobalCode.Field2Int(HttpContext.Current.Session["HotelForecastMicroApproval_Count"]);
            return(i);
        }
        protected void uoGridViewAirport_SelectedIndexChanged(object sender, EventArgs e)
        {
            int i = uoGridViewAirport.SelectedIndex;

            Int32  AirportSeaportID = GlobalCode.Field2Int(uoGridViewAirport.Rows[i].Cells[0].Text);
            string AirportID        = uoGridViewAirport.Rows[i].Cells[1].Text;
            string AirportCode      = uoGridViewAirport.Rows[i].Cells[2].Text;
            string AirportName      = uoGridViewAirport.Rows[i].Cells[3].Text;

            DeleteAirport(AirportSeaportID, AirportID, AirportCode, AirportName);
        }