コード例 #1
0
        /// <summary>
        /// Author: Charlene Remotigue
        /// Date Created: 07/12/2011
        /// Description: Load hotel branch with no contracts
        /// </summary>
        protected void LoadHotelBranch()
        {
            DataTable vendorBranchDatatable = null;
            ListItem  item;

            try
            {
                vendorBranchDatatable = PortBLL.getVendorBranchbyVendorBrand(uoDropDownListHotelBrand.SelectedValue, Request.QueryString["vTypeCode"],
                                                                             Request.QueryString["contractBranchId"], Request.QueryString["cId"]);

                item = new ListItem("--Select Hotel Branch--", "0");
                uoDropDownListHotelBranch.Items.Clear();
                uoDropDownListHotelBranch.Items.Add(item);
                uoDropDownListHotelBranch.DataSource     = vendorBranchDatatable;
                uoDropDownListHotelBranch.DataTextField  = "colVendorBranchNameVarchar";
                uoDropDownListHotelBranch.DataValueField = "colBranchIDInt";
                uoDropDownListHotelBranch.DataBind();
                uoHiddenFieldCountryId.Value = vendorBranchDatatable.Rows[0]["colCountryIDInt"].ToString();
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (vendorBranchDatatable != null)
                {
                    vendorBranchDatatable.Dispose();
                }
            }
        }
コード例 #2
0
        /// <summary>
        /// Author: Charlene Remotigue
        /// Date Created: 09/11/2011
        /// Description: load vehicle branch
        /// </summary>
        protected void LoadVehicleBranch()
        {
            DataTable vendorBranchDatatable = null;
            ListItem  item;

            try
            {
                vendorBranchDatatable = PortBLL.getVendorBranchbyVendorBrand(uoDropDownListVehicleBrandName.SelectedValue, Request.QueryString["vType"],
                                                                             Request.QueryString["ServiceId"], Request.QueryString["cId"]);

                item = new ListItem("--Select Vehicle Branch--", "0");
                uoDropDownListVehicleBranch.Items.Clear();
                uoDropDownListVehicleBranch.Items.Add(item);
                uoDropDownListVehicleBranch.DataSource     = vendorBranchDatatable;
                uoDropDownListVehicleBranch.DataTextField  = "colVendorBranchNameVarchar";
                uoDropDownListVehicleBranch.DataValueField = "colBranchIDInt";
                uoDropDownListVehicleBranch.DataBind();
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (vendorBranchDatatable != null)
                {
                    vendorBranchDatatable.Dispose();
                }
            }
        }