Example #1
0
        //处理景点图片事件
        protected IList <EyouSoft.Model.SupplierStructure.SupplierPic> DisonseImg_sight(string filepath, string fileName)
        {
            IList <EyouSoft.Model.SupplierStructure.SupplierPic> pics = new List <EyouSoft.Model.SupplierStructure.SupplierPic>();

            EyouSoft.Model.SupplierStructure.SupplierPic pic = new EyouSoft.Model.SupplierStructure.SupplierPic();
            //如果页面上的上传控件不为空,则判断为有新的图片上传
            if (filepath != "")
            {
                pic.PicPath    = filepath;
                pic.PicName    = fileName;
                pic.SupplierId = SiteUserInfo.CompanyID;

                pics.Add(pic);
            }
            //如果页面上的上传控件为空,但是本身有图片则进入该条件
            else if (filepath == "" && jd_img_state == true)
            {
                //如果页面上用于记录景点图片信息的隐藏域没有被设为null则代表没有删除该图片,如果为null则代表图片被删除并且未添加新的图片,返回的pics为null.
                if (this.sight_hidden.Value != "null")
                {
                    pic.PicName    = landspace_name.Value;
                    pic.PicPath    = landspace_file.Value;
                    pic.SupplierId = SiteUserInfo.CompanyID;
                    pics.Add(pic);
                }
            }
            return(pics);
        }
Example #2
0
 /// <summary>
 /// 处理多图片上传_添加新景点
 /// </summary>
 /// <param name="filePath">文件路径</param>
 /// <param name="fileName">文件名称</param>
 /// <param name="pics">图片集合</param>
 /// <returns>图片集合</returns>
 protected IList <EyouSoft.Model.SupplierStructure.SupplierPic> DisonseImg_Sight_Add(string filePath, string fileName, IList <EyouSoft.Model.SupplierStructure.SupplierPic> pics)
 {
     EyouSoft.Model.SupplierStructure.SupplierPic pic = new EyouSoft.Model.SupplierStructure.SupplierPic();
     //如果页面上的上传控件不为空,则判断为有新的图片上传
     if (filePath != "")
     {
         pic.PicPath    = filePath;
         pic.PicName    = fileName;
         pic.SupplierId = SiteUserInfo.CompanyID;
         pics.Add(pic);
     }
     return(pics);
 }
Example #3
0
 /// <summary>
 /// 取得页面上的img(没改动的图片)
 /// </summary>
 /// <param name="values">所有没改动图片的值</param>
 /// <param name="pics">更新图片时的集合</param>
 /// <returns>图片集合</returns>
 protected IList <EyouSoft.Model.SupplierStructure.SupplierPic> GetImg_Photo(string values, IList <EyouSoft.Model.SupplierStructure.SupplierPic> pics)
 {
     //分割values
     string[] strs = values.Split('♀');
     //遍历strs
     foreach (string str in strs)
     {
         //再次分割取得路径和文件名
         EyouSoft.Model.SupplierStructure.SupplierPic pic = new EyouSoft.Model.SupplierStructure.SupplierPic();
         string[] picvalue = str.Split('♂');
         if (picvalue.Length == 2)
         {
             pic.PicName = picvalue[1];
             pic.PicPath = picvalue[0];
             pics.Add(pic);
         }
     }
     return(pics);
 }
Example #4
0
        /// <summary>
        /// 根据SqlXML获取供应商图片
        /// </summary>
        /// <param name="SupplierPicXML">供应商图片XML</param>
        /// <returns></returns>
        private IList <EyouSoft.Model.SupplierStructure.SupplierPic> GetSupplierPic(string SupplierPicXML)
        {
            if (string.IsNullOrEmpty(SupplierPicXML))
            {
                return(null);
            }

            XElement root = XElement.Parse(SupplierPicXML);

            if (root == null)
            {
                return(null);
            }
            var xRow = Utils.GetXElements(root, "row");

            if (xRow == null || xRow.Count() <= 0)
            {
                return(null);
            }

            IList <EyouSoft.Model.SupplierStructure.SupplierPic> list = new List <EyouSoft.Model.SupplierStructure.SupplierPic>();

            EyouSoft.Model.SupplierStructure.SupplierPic model = null;
            foreach (var t in xRow)
            {
                model = new EyouSoft.Model.SupplierStructure.SupplierPic();

                model.Id         = Utils.GetInt(Utils.GetXAttributeValue(t, "Id"));
                model.SupplierId = Utils.GetInt(Utils.GetXAttributeValue(t, "SupplierId"));
                model.PicName    = Utils.GetXAttributeValue(t, "PicName");
                model.PicPath    = Utils.GetXAttributeValue(t, "PicPath");

                list.Add(model);
            }

            return(list);
        }
Example #5
0
        protected void LinkButton1_Click(object sender, EventArgs e)
        {
            //接受参数
            tid = Utils.GetInt(Utils.GetQueryStringValue("tid"));
            if (tid > 0)
            {
                Hotelinfo    = HotelBll.GetHotelInfo(tid);
                Hotelinfo.Id = tid;
            }
            else
            {
                Hotelinfo.SupplierType = EyouSoft.Model.EnumType.CompanyStructure.SupplierType.酒店;
            }
            //省份编号
            Hotelinfo.ProvinceId = this.ucProvince1.ProvinceId;
            EyouSoft.Model.CompanyStructure.Province Provincemodel = new EyouSoft.BLL.CompanyStructure.Province().GetModel(this.ucProvince1.ProvinceId);
            if (Provincemodel != null)
            {
                Hotelinfo.ProvinceName = Provincemodel.ProvinceName;
            }
            //城市编号
            Hotelinfo.CityId = this.ucCity1.CityId;
            EyouSoft.Model.CompanyStructure.City citymodel = new EyouSoft.BLL.CompanyStructure.City().GetModel(this.ucCity1.CityId);
            if (citymodel != null)
            {
                Hotelinfo.CityName = citymodel.CityName;
            }

            //单位名称
            string unionname = Utils.GetFormValue("unionname");
            //酒店星级
            int HotelStart = Utils.GetInt(Utils.GetFormValue(this.HotelStart.UniqueID));
            //酒店地址
            string TxtHotelAddress = Utils.GetFormValue("TxtHotelAddress");
            //酒店简介
            string HotelIntroduction = Utils.GetFormValue("HotelIntroduction");

            #region 酒店图片
            if (Request.Files.Count > 0)
            {
                string msg = "";
                if (!EyouSoft.Common.Function.UploadFile.CheckFileType(Request.Files, "file_landspace", new[] { ".gif", ".jpg", ".jpeg", ".png" }, null, out msg))
                {
                    MessageBox.ResponseScript(this, ";alert('" + msg + "');");
                    BindHotelStart();
                    return;
                }
                Hotelinfo.SupplierPic = new List <EyouSoft.Model.SupplierStructure.SupplierPic>();
                EyouSoft.Model.SupplierStructure.SupplierPic SupplierPic = new EyouSoft.Model.SupplierStructure.SupplierPic();
                string filepath    = string.Empty;
                string oldfilename = string.Empty;
                //if (EyouSoft.Common.Function.UploadFile.FileUpLoad(Request.Files["HotelImage"], "SupplierControlFile", out filepath, out oldfilename))
                //{
                //    if (filepath.Trim() != "" && oldfilename.Trim() != "")
                //    {
                //        SupplierPic.PicPath = filepath;
                //        SupplierPic.PicName = oldfilename;
                //        Hotelinfo.SupplierPic.Add(SupplierPic);
                //    }
                //}
                //遍历files取出file.
                for (int i = 0; i < Request.Files.Count; i++)
                {
                    bool result_landspace = EyouSoft.Common.Function.UploadFile.FileUpLoad(Request.Files[i], "SightImg", out filepath, out oldfilename);
                    if (result_landspace)
                    {
                        Hotelinfo.SupplierPic = DisonseImg_Sight_Add(filepath, oldfilename, Hotelinfo.SupplierPic);
                    }
                }
            }
            //判断是新增还是修改,修改调用下马的方法
            if (tid > 0)
            {
                //取出页面上未修改的图片
                Hotelinfo.SupplierPic = GetImg_Photo(this.hidImgPhoto.Value, Hotelinfo.SupplierPic);
            }
            #endregion

            //导游词
            string TourGuids = Utils.GetFormValue("TourGuids");

            //当前公司编号
            Hotelinfo.CompanyId = this.SiteUserInfo.CompanyID;
            //当前操作人编号
            Hotelinfo.OperatorId = this.SiteUserInfo.ID;

            #region 联系人信息
            Hotelinfo.SupplierContact = new List <EyouSoft.Model.CompanyStructure.SupplierContact>();
            string[] UserName   = Utils.GetFormValues("inname");
            string[] Userdate   = Utils.GetFormValues("indate");
            string[] Userphone  = Utils.GetFormValues("inphone");
            string[] Usermobile = Utils.GetFormValues("inmobile");
            string[] Userqq     = Utils.GetFormValues("inqq");
            string[] Usermail   = Utils.GetFormValues("inemail");
            string[] Userfax    = Utils.GetFormValues("inefax");
            for (int i = 0; i < UserName.Length; i++)
            {
                EyouSoft.Model.CompanyStructure.SupplierContact scmodel = new EyouSoft.Model.CompanyStructure.SupplierContact();
                scmodel.CompanyId     = SiteUserInfo.CompanyID;
                scmodel.ContactName   = UserName[i];
                scmodel.JobTitle      = Userdate[i];
                scmodel.ContactTel    = Userphone[i];
                scmodel.ContactMobile = Usermobile[i];
                scmodel.QQ            = Userqq[i];
                scmodel.Email         = Usermail[i];
                scmodel.ContactFax    = Userfax[i];
                scmodel.SupplierType  = EyouSoft.Model.EnumType.CompanyStructure.SupplierType.酒店;
                Hotelinfo.SupplierContact.Add(scmodel);
            }
            #endregion

            #region 价格信息
            Hotelinfo.RoomTypes = new List <EyouSoft.Model.SupplierStructure.SupplierHotelRoomTypeInfo>();
            string[] Chamber         = Utils.GetFormValues("Chamber");
            string[] SalaesPrices    = Utils.GetFormValues("SalaesPrices");
            string[] SettlementPrice = Utils.GetFormValues("SettlementPrice");
            string[] radiobtnValue   = Utils.GetFormValues("hd_rbtn");
            for (int j = 0; j < Chamber.Length; j++)
            {
                EyouSoft.Model.SupplierStructure.SupplierHotelRoomTypeInfo roomtype = new EyouSoft.Model.SupplierStructure.SupplierHotelRoomTypeInfo();
                roomtype.AccountingPrice = Utils.GetDecimal(SettlementPrice[j]);
                if (radiobtnValue[j] == "1")
                {
                    roomtype.IsBreakfast = true;
                }
                else
                {
                    roomtype.IsBreakfast = false;
                }
                roomtype.Name         = Chamber[j];
                roomtype.SellingPrice = Utils.GetDecimal(SalaesPrices[j]);
                Hotelinfo.RoomTypes.Add(roomtype);
            }
            #endregion

            //备注
            string HotelRemarks = Utils.GetFormValue("HotelRemarks");

            Hotelinfo.UnitName    = unionname;
            Hotelinfo.UnitAddress = TxtHotelAddress;
            Hotelinfo.Star        = (EyouSoft.Model.EnumType.SupplierStructure.HotelStar)Enum.Parse(typeof(EyouSoft.Model.EnumType.SupplierStructure.HotelStar), HotelStart.ToString());
            Hotelinfo.Introduce   = HotelIntroduction;
            Hotelinfo.TourGuide   = TourGuids;
            Hotelinfo.Remark      = HotelRemarks;
            Hotelinfo.IssueTime   = System.DateTime.Now;

            int res = 0;
            if (tid > 0)
            {
                //修改酒店信息
                res = HotelBll.UpdateHotelInfo(Hotelinfo);
            }
            else
            {
                //添加酒店信息
                res = HotelBll.InsertHotelInfo(Hotelinfo);
            }

            if (res > 0)
            {
                MessageBox.ResponseScript(this, string.Format(";alert('{0}');window.parent.Boxy.getIframeDialog('{1}').hide(); {2}", "保存成功!", Utils.GetQueryStringValue("iframeId"), tid > 0 ? "window.parent.location.reload();" : "window.parent.location.href='/SupplierControl/Hotels/HotelList.aspx';"));
            }
            else
            {
                MessageBox.ResponseScript(this, ";alert('保存失败!');");
            }
        }
Example #6
0
        /// <summary>
        /// 获取酒店供应商信息集合(供应商基本信息,图片信息,房型信息。同行登录口适用)
        /// </summary>
        /// <param name="companyId">公司(专线)编号</param>
        /// <param name="pageSize">每页记录数</param>
        /// <param name="pageIndex">页索引</param>
        /// <param name="recordCount">总记录数</param>
        /// <param name="info">查询信息</param>
        /// <returns></returns>
        public IList <EyouSoft.Model.SupplierStructure.SupplierHotelInfo> GetSiteHotels(int companyId, int pageSize, int pageIndex, ref int recordCount, EyouSoft.Model.SupplierStructure.SupplierHotelSearchInfo info)
        {
            IList <EyouSoft.Model.SupplierStructure.SupplierHotelInfo> items = new List <EyouSoft.Model.SupplierStructure.SupplierHotelInfo>();

            EyouSoft.Model.SupplierStructure.SupplierHotelInfo tmpModel = null;
            IEnumerable <XElement> xRows = null;
            XElement      xRoot          = null;
            StringBuilder cmdQuery       = new StringBuilder();
            string        tableName      = "tbl_CompanySupplier";
            string        primaryKey     = "Id";
            string        orderByString  = "Id DESC";
            StringBuilder fields         = new StringBuilder();

            #region fields

            fields.Append(" Id,ProvinceId,ProvinceName,CityId,CityName,UnitName,TradeNum,UnitAddress ");
            fields.Append(" ,(select Id,SupplierId,PicName,PicPath from tbl_SupplierAccessory where tbl_SupplierAccessory.SupplierId = tbl_CompanySupplier.Id for xml raw,root('root')) as HotelPics ");
            fields.Append(" ,(select RoomTypeId,SupplierId,Name,SellingPrice,AccountingPrice,IsBreakfast from tbl_SupplierHotelRoomType where tbl_SupplierHotelRoomType.SupplierId = tbl_CompanySupplier.Id for xml raw,root('root')) as HotelRoomTypes ");
            fields.Append(",(SELECT Star,Introduce FROM tbl_SupplierHotel AS B WHERE B.SupplierId=tbl_CompanySupplier.Id for xml raw,root('root')) AS Star");
            #endregion

            #region 拼接查询条件

            cmdQuery.AppendFormat(" CompanyId={0} AND IsDelete='0' AND SupplierType={1} ", companyId, (int)EyouSoft.Model.EnumType.CompanyStructure.SupplierType.酒店);
            info = info ?? new EyouSoft.Model.SupplierStructure.SupplierHotelSearchInfo();
            if (info.CityId.HasValue)
            {
                cmdQuery.AppendFormat(" AND CityId={0} ", info.CityId.Value);
            }
            if (!string.IsNullOrEmpty(info.Name))
            {
                cmdQuery.AppendFormat(" AND UnitName LIKE '%{0}%' ", info.Name);
            }
            if (info.ProvinceId.HasValue)
            {
                cmdQuery.AppendFormat(" AND ProvinceId={0} ", info.ProvinceId.Value);
            }
            if (info.Star.HasValue)
            {
                cmdQuery.AppendFormat(" AND EXISTS(SELECT 1 FROM tbl_SupplierHotel AS A WHERE A.SupplierId=tbl_CompanySupplier.Id AND Star={0}) ", (int)info.Star.Value);
            }

            #endregion

            using (IDataReader rdr = DbHelper.ExecuteReader(this._db, pageSize, pageIndex, ref recordCount, tableName, primaryKey, fields.ToString(), cmdQuery.ToString(), orderByString))
            {
                while (rdr.Read())
                {
                    tmpModel = new EyouSoft.Model.SupplierStructure.SupplierHotelInfo();

                    if (!rdr.IsDBNull(0))
                    {
                        tmpModel.Id = rdr.GetInt32(0);
                    }
                    if (!rdr.IsDBNull(1))
                    {
                        tmpModel.ProvinceId = rdr.GetInt32(1);
                    }
                    if (!rdr.IsDBNull(2))
                    {
                        tmpModel.ProvinceName = rdr.GetString(2);
                    }
                    if (!rdr.IsDBNull(3))
                    {
                        tmpModel.CityId = rdr.GetInt32(3);
                    }
                    if (!rdr.IsDBNull(4))
                    {
                        tmpModel.CityName = rdr.GetString(4);
                    }
                    if (!rdr.IsDBNull(5))
                    {
                        tmpModel.UnitName = rdr.GetString(5);
                    }
                    if (!rdr.IsDBNull(6))
                    {
                        tmpModel.TradeNum = rdr.GetInt32(6);
                    }
                    if (!rdr.IsDBNull(7))
                    {
                        tmpModel.UnitAddress = rdr.GetString(7);
                    }

                    if (!rdr.IsDBNull(8))
                    {
                        tmpModel.SupplierPic = new List <EyouSoft.Model.SupplierStructure.SupplierPic>();
                        EyouSoft.Model.SupplierStructure.SupplierPic spModel = null;
                        xRoot = XElement.Parse(rdr.GetString(8));
                        if (xRoot != null)
                        {
                            xRows = Utils.GetXElements(xRoot, "row");
                            if (xRows != null && xRows.Count() > 0)
                            {
                                foreach (var t in xRows)
                                {
                                    spModel = new EyouSoft.Model.SupplierStructure.SupplierPic();
                                    //Id,SupplierId,PicName,PicPath
                                    spModel.Id         = Utils.GetInt(Utils.GetXAttributeValue(t, "Id"));
                                    spModel.SupplierId = Utils.GetInt(Utils.GetXAttributeValue(t, "SupplierId"));
                                    spModel.PicName    = Utils.GetXAttributeValue(t, "PicName");
                                    spModel.PicPath    = Utils.GetXAttributeValue(t, "PicPath");

                                    tmpModel.SupplierPic.Add(spModel);
                                }
                            }
                        }
                    }
                    if (!rdr.IsDBNull(9))
                    {
                        tmpModel.RoomTypes = new List <Model.SupplierStructure.SupplierHotelRoomTypeInfo>();
                        Model.SupplierStructure.SupplierHotelRoomTypeInfo shrtModel = null;
                        xRoot = XElement.Parse(rdr.GetString(9));
                        if (xRoot != null)
                        {
                            xRows = Utils.GetXElements(xRoot, "row");
                            if (xRows != null && xRows.Count() > 0)
                            {
                                foreach (var t in xRows)
                                {
                                    shrtModel = new EyouSoft.Model.SupplierStructure.SupplierHotelRoomTypeInfo();
                                    //RoomTypeId,SupplierId,Name,SellingPrice,AccountingPrice,IsBreakfast
                                    shrtModel.RoomTypeId      = Utils.GetInt(Utils.GetXAttributeValue(t, "RoomTypeId"));
                                    shrtModel.Name            = Utils.GetXAttributeValue(t, "Name");
                                    shrtModel.SellingPrice    = Utils.GetDecimal(Utils.GetXAttributeValue(t, "SellingPrice"));
                                    shrtModel.AccountingPrice = Utils.GetDecimal(Utils.GetXAttributeValue(t, "AccountingPrice"));
                                    shrtModel.IsBreakfast     = (Utils.GetXAttributeValue(t, "IsBreakfast") == "1" || Utils.GetXAttributeValue(t, "IsBreakfast").ToLower() == "true") ? true : false;

                                    tmpModel.RoomTypes.Add(shrtModel);
                                }
                            }
                        }
                    }
                    if (!rdr.IsDBNull(10))
                    {
                        xRoot = XElement.Parse(rdr.GetString(10));
                        if (xRoot != null)
                        {
                            xRows = Utils.GetXElements(xRoot, "row");
                            if (xRows != null && xRows.Count() > 0)
                            {
                                foreach (var t in xRows)
                                {
                                    tmpModel.Star      = (EyouSoft.Model.EnumType.SupplierStructure.HotelStar)Utils.GetInt(Utils.GetXAttributeValue(t, "Star"));
                                    tmpModel.Introduce = Utils.GetXAttributeValue(t, "Introduce");

                                    break;
                                }
                            }
                        }
                    }


                    items.Add(tmpModel);
                }
            }

            return(items);
        }
Example #7
0
        protected void GetLinkMnasAndSubmit()
        {
            sight = new EyouSoft.Model.SupplierStructure.SupplierSpot();
            if (Request.Files.Count > 0)
            {
                string filepath    = string.Empty;
                string oldfilename = string.Empty;
                IList <EyouSoft.Model.SupplierStructure.SupplierPic> suPics = new List <EyouSoft.Model.SupplierStructure.SupplierPic>();
                EyouSoft.Model.SupplierStructure.SupplierPic         suPic  = new EyouSoft.Model.SupplierStructure.SupplierPic();
                //景点图片
                if (Request.Files != null && Request.Files.Count > 0)
                {
                    for (int i = 0; i < Request.Files.Count; i++)
                    {
                        //排除掉合作协议的file控件
                        if (Request.Files.GetKey(i).ToString() != "file_green")
                        {
                            bool result_landspace = EyouSoft.Common.Function.UploadFile.FileUpLoad(Request.Files[i], "SightImg", out filepath, out oldfilename);
                            if (result_landspace)
                            {
                                suPics = DisonseImg_Sight_Add(filepath, oldfilename, suPics);
                            }
                        }
                    }
                    //如果是修改操作,调用下面的方法
                    if (type == "modify")
                    {
                        suPics = GetImg_Photo(hidImgPhoto.Value, suPics);
                    }
                    if (suPics != null && suPics.Count > 0)
                    {
                        sight.SupplierPic = suPics;
                    }
                }
                //合作协议
                bool result_AgreementFile = EyouSoft.Common.Function.UploadFile.FileUpLoad(Request.Files["file_green"], "SightAgreementFile", out filepath, out oldfilename);
                if (result_AgreementFile)
                {
                    if (filepath != "")
                    {
                        sight.AgreementFile = filepath;
                    }
                    else
                    {
                        if (this.greend_hidden.Value != "null")
                        {
                            sight.AgreementFile = this.green_file.Value;
                        }
                        else
                        {
                            sight.AgreementFile = "";
                        }
                    }
                }
            }
            //获取页面上所有联系人的信息
            IList <EyouSoft.Model.CompanyStructure.SupplierContact> contacts = new List <EyouSoft.Model.CompanyStructure.SupplierContact>();

            string[] linkman_names     = Utils.GetFormValues("linkman_name");
            string[] linkman_bussiness = Utils.GetFormValues("linkman_bussiness");
            string[] linkman_phone     = Utils.GetFormValues("linkman_phone");
            string[] linkman_tel       = Utils.GetFormValues("linkman_tel");
            string[] linkman_qq        = Utils.GetFormValues("linkman_qq");
            string[] linkman_email     = Utils.GetFormValues("linkman_email");
            string[] linkman_fax       = Utils.GetFormValues("linkman_fax");
            if (linkman_names.Length >= 1)
            {
                for (int i = 0; i < linkman_names.Length; i++)
                {
                    //创建供应商联系人类
                    EyouSoft.Model.CompanyStructure.SupplierContact contact = new EyouSoft.Model.CompanyStructure.SupplierContact();
                    contact.QQ            = linkman_qq[i];
                    contact.Email         = linkman_email[i];
                    contact.ContactName   = linkman_names[i];
                    contact.ContactMobile = linkman_phone[i];
                    contact.ContactTel    = linkman_tel[i];
                    contact.JobTitle      = linkman_bussiness[i];
                    contact.ContactFax    = linkman_fax[i];
                    contacts.Add(contact);
                }
            }
            sight.CompanyId = SiteUserInfo.CompanyID;
            //设置景点的省份名字
            sight.CityId     = Utils.GetInt(this.city_id.Value);
            sight.ProvinceId = Utils.GetInt(this.pro_id.Value);
            EyouSoft.Model.CompanyStructure.Province Provincemodel = new EyouSoft.BLL.CompanyStructure.Province().GetModel(this.ucProvince1.ProvinceId);
            if (Provincemodel != null)
            {
                sight.ProvinceName = Provincemodel.ProvinceName;
            }
            //设置景点的城市名字
            EyouSoft.Model.CompanyStructure.City citymodel = new EyouSoft.BLL.CompanyStructure.City().GetModel(this.ucCity1.CityId);
            if (citymodel != null)
            {
                sight.CityName = citymodel.CityName;
            }
            //为要更新的景点赋值
            sight.Id              = sid;
            sight.Remark          = Utils.GetFormValue("txt_remark");
            sight.SupplierContact = contacts;
            sight.Start           = (EyouSoft.Model.EnumType.SupplierStructure.ScenicSpotStar)Utils.GetInt(Utils.GetFormValue(this.sel_star.UniqueID));
            sight.TeamPrice       = Utils.GetDecimal(Utils.GetFormValue("rl_price"));
            sight.TourGuide       = Utils.GetFormValue("guideworld");
            sight.TravelerPrice   = Utils.GetDecimal(Utils.GetFormValue("single_price"));
            sight.UnitAddress     = Utils.GetFormValue("companyAddress");
            sight.UnitName        = Utils.GetFormValue("companyName");
            sight.UnitPolicy      = Utils.GetFormValue("txt_zc");
            sight.SupplierType    = EyouSoft.Model.EnumType.CompanyStructure.SupplierType.景点;
            bool result = false;

            //操作类型判断
            if (type == "add")
            {
                //添加
                result = sightBll.Add(sight);
            }
            else if (type == "modify")
            {
                //更新
                result = sightBll.Update(sight);
            }
            //返回true操作成功,返回false操作失败
            if (result == true)
            {
                MessageBox.ResponseScript(this, string.Format(";alert('{0}');window.parent.location='/SupplierControl/SightManager/SightList.aspx';window.parent.Boxy.getIframeDialog('{1}').hide()", "保存成功", Utils.GetQueryStringValue("iframeId")));
            }
            else
            {
                MessageBox.ResponseScript(this, ";alert('保存失败!');");
            }
        }