Esempio n. 1
0
        /// <summary>
        /// 显示专线区域控制的checkbox
        /// </summary>
        /// <param name="AreaId">专线区域id</param>
        /// <returns></returns>
        protected string ShowTourAreaCheckBox(string AreaId, string AreaName, string RouteType)
        {
            bool   isSelected = false; //判断是否被选择过
            string returnVal  = "";

            //判断该专线是否已经被该城市选择过
            if (AreaIdList != null)
            {
                foreach (string id in AreaIdList)
                {
                    if (!string.IsNullOrEmpty(id) && StringValidate.IsInteger(id) && int.Parse(AreaId) == int.Parse(id))
                    {
                        isSelected = true;
                        break;
                    }
                }
            }

            if (!isSelected)
            {
                returnVal = string.Format("<input type=\"checkbox\" id=\"TourAreaID_{0}\" name=\"cbkName_{2}\"  value=\"{0}|{1}\">", AreaId, AreaName, RouteType);
            }
            else
            {
                returnVal = string.Format("<input type=\"checkbox\" id=\"TourAreaID_{0}\" name=\"cbkName_{2}\"  value=\"{0}|{1}\"  checked=true >", AreaId, AreaName, RouteType);
            }
            return(returnVal);
        }
Esempio n. 2
0
        /// <summary>
        /// 获取MQ链接
        /// </summary>
        /// <param name="OperatorMQ">MQ编号</param>
        /// <returns></returns>
        protected string GetMQUrl(string OperatorMQ)
        {
            if (string.IsNullOrEmpty(OperatorMQ) || StringValidate.IsInteger(OperatorMQ.Trim()) == false || Convert.ToInt32(OperatorMQ.Trim()) <= 0)
            {
                return(string.Empty);
            }

            return(Utils.GetMQ(OperatorMQ));
        }
Esempio n. 3
0
        /// <summary>
        /// 命令行事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void RepeaterList_ItemCommand(object sender, RepeaterCommandEventArgs e)
        {
            if (string.IsNullOrEmpty(e.CommandName) || string.IsNullOrEmpty(e.CommandArgument.ToString()))
            {
                return;
            }
            if (!CheckMasterGrant(YuYingPermission.宾访谈_管理该栏目, YuYingPermission.宾访谈_顾问团队审核))
            {
                MessageBox.Show(this.Page, "对不起,你没有该权限");
                return;
            }
            switch (e.CommandName.ToLower())
            {
            case "show":
                string[] strTmp = e.CommandArgument.ToString().Trim().Split(',');
                bool     IsShow = false;
                if (strTmp == null || strTmp.Length != 2 || string.IsNullOrEmpty(strTmp[0]) || StringValidate.IsInteger(strTmp[0]) == false)
                {
                    break;
                }
                if (strTmp[1].ToLower() == "true" || strTmp[1].ToLower() == "1")
                {
                    IsShow = true;
                }
                if (EyouSoft.BLL.CommunityStructure.CommunityAdvisor.CreateInstance().SetIsShow(IsShow ? false : true, MasterUserInfo.ID, int.Parse(strTmp[0])))
                {
                    MessageBox.ShowAndRedirect(this, "操作成功!", Request.RawUrl);
                }
                else
                {
                    MessageBox.ShowAndRedirect(this, "操作失败!", Request.RawUrl);
                }
                break;

            case "del":
                if (StringValidate.IsInteger(e.CommandArgument.ToString()) == false)
                {
                    break;
                }
                if (EyouSoft.BLL.CommunityStructure.CommunityAdvisor.CreateInstance().DeleteCommunityAdvisor(int.Parse(e.CommandArgument.ToString())))
                {
                    MessageBox.ShowAndRedirect(this, "删除成功!", Request.RawUrl);
                }
                else
                {
                    MessageBox.ShowAndRedirect(this, "删除失败!", Request.RawUrl);
                }
                break;
            }
        }
Esempio n. 4
0
        /// <summary>
        /// 删除事件
        /// </summary>
        private void DelProcess(string DelID)
        {
            string strErr = "";

            if (StringValidate.IsInteger(DelID) == false)
            {
                strErr += "未找到您要删除的线路区域";
            }
            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            deletFlag = EyouSoft.BLL.SystemStructure.SysArea.CreateInstance().DeleteSysArea(int.Parse(DelID));
            return;
        }
Esempio n. 5
0
        /// <summary>
        /// 删除事件
        /// </summary>
        private void DelProcess(string DelID)
        {
            string strErr = "";

            if (StringValidate.IsInteger(DelID) == false)
            {
                strErr += "未找到您要删除的客户等级";
            }
            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            int[] SetId = { int.Parse(DelID) };
            EyouSoft.BLL.SystemStructure.SysField.CreateInstance().Delete(SetId, EyouSoft.Model.SystemStructure.SysFieldType.客户等级);
            return;
        }
Esempio n. 6
0
        /// <summary>
        /// 根据省份ID获取省份名称
        /// </summary>
        /// <param name="ProvinceId">省份ID</param>
        /// <returns></returns>
        protected string GetProvinceNameById(string ProvinceId)
        {
            if (string.IsNullOrEmpty(ProvinceId) || StringValidate.IsInteger(ProvinceId.Trim()) == false || Convert.ToInt32(ProvinceId.Trim()) <= 0)
            {
                return(string.Empty);
            }

            ProvinceModel = EyouSoft.BLL.SystemStructure.SysProvince.CreateInstance().GetProvinceModel(int.Parse(ProvinceId));
            if (ProvinceModel != null)
            {
                return(string.Format("【{0}】", ProvinceModel.ProvinceName));
            }
            else
            {
                return(string.Empty);
            }
        }
Esempio n. 7
0
        protected void BindInfo()
        {
            int intRecordCount = 0;
            //查询关键字
            string keyWord = Utils.InputText(Request.QueryString["k"]);

            if (Request.QueryString["Page"] == "" || StringValidate.IsInteger(Request.QueryString["Page"]) == false || Int32.Parse(Request.QueryString["Page"]) == 0)
            {
                CurrencyPage = 1;
            }
            else
            {
                CurrencyPage = Convert.ToInt32(Request.QueryString["Page"]);
            }

            EyouSoft.Model.NewsStructure.MQueryPeerNews querySearch = new EyouSoft.Model.NewsStructure.MQueryPeerNews();
            querySearch.CompanyId = this.Master.CompanyId;
            querySearch.KeyWord   = keyWord;
            IList <EyouSoft.Model.NewsStructure.MPeerNews> listNews = EyouSoft.BLL.NewsStructure.BPeerNews.CreateInstance().GetGetPeerNewsList(intPageSize, CurrencyPage, ref intRecordCount, querySearch);

            if (listNews != null && listNews.Count > 0)
            {
                //绑定数据源
                this.rptNewsList.DataSource = listNews;
                this.rptNewsList.DataBind();
                //绑定分页控件
                this.ExporPageInfoSelect1.intPageSize          = intPageSize;
                this.ExporPageInfoSelect1.intRecordCount       = intRecordCount;
                this.ExporPageInfoSelect1.CurrencyPage         = CurrencyPage;
                this.ExporPageInfoSelect1.CurrencyPageCssClass = "RedFnt";
                this.ExporPageInfoSelect1.UrlParams            = Request.QueryString;
                this.ExporPageInfoSelect1.PageLinkURL          = Request.ServerVariables["SCRIPT_NAME"].ToString() + "?";
                this.ExporPageInfoSelect1.LinkType             = 3;
            }
            else
            {
                this.ExporPageInfoSelect1.Visible = false;
            }
            listNews = null;
        }
Esempio n. 8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(Utils.InputText(Request.QueryString["RouteAreaId"])) && !StringValidate.IsInteger(Utils.InputText(Request.QueryString["RouteAreaId"])))
     {
         MessageBox.ShowAndClose(this, "没有找到此线路区域信息!");
     }
     else
     {
         AreaId = Utils.GetInt(Request.QueryString["RouteAreaId"]);
     }
     if (!string.IsNullOrEmpty(Request.QueryString["CityID"]) && StringValidate.IsInteger(Request.QueryString["CityID"]))
     {
         cityID = Utils.GetInt(Request.QueryString["CityID"]);
     }
     //根据城市编号和线路区域编号获取已选择过的批发商列表
     SiteCompanyId      = EyouSoft.BLL.SystemStructure.CompanyCityAd.CreateInstance().GetCompanyIdsByCityAndArea(cityID, AreaId);
     selectCompanyCount = SiteCompanyId.Count;
     if (!IsPostBack)
     {
         BindList();
     }
 }
Esempio n. 9
0
        protected void BindInfo()
        {
            int intRecordCount = 0;
            //查询关键字
            string keyWord = Utils.InputText(Request.QueryString["k"]);

            if (Request.QueryString["Page"] == "" || StringValidate.IsInteger(Request.QueryString["Page"]) == false || Int32.Parse(Request.QueryString["Page"]) == 0)
            {
                CurrencyPage = 1;
            }
            else
            {
                CurrencyPage = Convert.ToInt32(Request.QueryString["Page"]);
            }
            IList <EyouSoft.Model.ShopStructure.HighShopNews> modelList = EyouSoft.BLL.ShopStructure.HighShopNews.CreateInstance().GetWebList(intPageSize, CurrencyPage, ref intRecordCount, CompanyID, keyWord);

            if (modelList != null && modelList.Count > 0)
            {
                //绑定数据源
                this.rptNewsList.DataSource = modelList;
                this.rptNewsList.DataBind();
                //绑定分页控件
                this.ExporPageInfoSelect1.intPageSize          = intPageSize;
                this.ExporPageInfoSelect1.intRecordCount       = intRecordCount;
                this.ExporPageInfoSelect1.CurrencyPage         = CurrencyPage;
                this.ExporPageInfoSelect1.CurrencyPageCssClass = "RedFnt";
                this.ExporPageInfoSelect1.UrlParams            = Request.QueryString;
                this.ExporPageInfoSelect1.PageLinkURL          = Request.ServerVariables["SCRIPT_NAME"].ToString() + "?";
                this.ExporPageInfoSelect1.LinkType             = 3;
            }
            else
            {
                this.ExporPageInfoSelect1.Visible = false;
            }
            modelList = null;
        }
Esempio n. 10
0
        protected bool EditFlag                = false; //修改权限
        #endregion

        #region 页面加载
        protected void Page_Load(object sender, EventArgs e)
        {
            //权限验证
            YuYingPermission[] parms = { YuYingPermission.平台管理_管理该栏目, YuYingPermission.平台管理_城市管理 };
            EditFlag = CheckMasterGrant(parms);
            if (!EditFlag)
            {
                Utils.ResponseNoPermit(YuYingPermission.平台管理_城市管理, true);
                return;
                //this.btnSave.Visible = false;
            }
            if (string.IsNullOrEmpty(Utils.InputText(Request.QueryString["RouteAreaId"])) && !StringValidate.IsInteger(Utils.InputText(Request.QueryString["RouteAreaId"])))
            {
                MessageBox.ShowAndClose(this, "没有找到此线路区域信息!");
            }
            else
            {
                AreaId = Utils.GetInt(Request.QueryString["RouteAreaId"]);
            }
            if (!string.IsNullOrEmpty(Request.QueryString["CityID"]) && StringValidate.IsInteger(Request.QueryString["CityID"]))
            {
                cityID = Utils.GetInt(Request.QueryString["CityID"]);
            }
            if (!string.IsNullOrEmpty(Utils.InputText(Request.QueryString["DeletID"])))
            {
                EyouSoft.BLL.SystemStructure.CompanyCityAd.CreateInstance().DeleteCompanyCityAd(cityID, AreaId, Utils.InputText(Request.QueryString["DeletID"]));
                //return;
            }
            //根据城市编号和线路区域编号获取已选择过的批发商列表
            SiteCompanyId      = EyouSoft.BLL.SystemStructure.CompanyCityAd.CreateInstance().GetCompanyIdsByCityAndArea(cityID, AreaId);
            selectCompanyCount = SiteCompanyId.Count;
            if (!IsPostBack)
            {
                BindSelectList();
            }
        }
Esempio n. 11
0
        /// <summary>
        /// 添加线路信息
        /// </summary>
        /// <returns></returns>
        private bool InsertRouteInfo()
        {
            bool IsResult = false;
            // 线路基本信息
            string hidRouteID = Utils.GetFormValue(this.AddQuickRoute_hidRouteID.UniqueID);    // 用于判断是添加还是修改

            string RouteArea  = Utils.GetFormValue(this.AddQuickRoute_RouteArea.UniqueID);
            string RouteName  = Utils.GetFormValue(this.AddQuickRoute_RouteName.UniqueID);
            string TourDays   = Utils.GetFormValue(this.AddQuickRoute_TourDays.UniqueID);
            string LeaveCity  = Utils.GetFormValue("AddQuickRoute_radPortCity");
            string RouteTheme = Utils.GetFormValue("AddQuickRoute_chkRouteTopic");
            string SaleCity   = Utils.GetFormValue("AddQuickRoute_chkSaleCity");

            if (LeaveCity == null || LeaveCity == string.Empty)
            {
                LeaveCity = "0";
            }

            // 快速发布线路行程信息
            string QuickPlan = Utils.EditInputText(Server.UrlDecode(Request.Form["AddQuickRoute_divFCK"]));

            if (QuickPlan == string.Empty || QuickPlan == "点击添加行程信息")
            {
                QuickPlan = string.Empty;
            }

            #region 线路区域处理
            string AreaName = string.Empty;
            int    AreaID   = 0;
            EyouSoft.Model.SystemStructure.AreaType Areatype = EyouSoft.Model.SystemStructure.AreaType.国内短线;
            if (!String.IsNullOrEmpty(RouteArea) && StringValidate.IsInteger(RouteArea))
            {
                EyouSoft.IBLL.SystemStructure.ISysArea AreaBll   = EyouSoft.BLL.SystemStructure.SysArea.CreateInstance();
                EyouSoft.Model.SystemStructure.SysArea AreaModel = AreaBll.GetSysAreaModel(int.Parse(RouteArea));
                if (AreaModel != null)
                {
                    AreaID   = AreaModel.AreaId;
                    AreaName = AreaModel.AreaName;
                    Areatype = AreaModel.RouteType;
                }
                AreaModel = null;
                AreaBll   = null;
            }
            #endregion

            #region 线路主题
            IList <int> RouteThemeList = new List <int>();
            if (!String.IsNullOrEmpty(RouteTheme))
            {
                string[] strRouteTopic = RouteTheme.Split(',');
                foreach (string str in strRouteTopic)
                {
                    RouteThemeList.Add(int.Parse(str));
                }
            }
            #endregion

            #region 销售城市
            IList <int> SaleCityList = new List <int>();
            if (!String.IsNullOrEmpty(SaleCity))
            {
                string[] strSaleCity = SaleCity.Split(',');
                foreach (string str in strSaleCity)
                {
                    SaleCityList.Add(int.Parse(str));
                }
            }
            #endregion

            // 写入线路信息
            EyouSoft.IBLL.TourStructure.IRouteBasicInfo bll   = EyouSoft.BLL.TourStructure.RouteBasicInfo.CreateInstance();
            EyouSoft.Model.TourStructure.RouteBasicInfo model = new EyouSoft.Model.TourStructure.RouteBasicInfo();
            model.AreaId          = AreaID;
            model.AreaType        = Areatype;
            model.CompanyID       = UserInfoModel.CompanyID;
            model.CompanyName     = UserInfoModel.CompanyName;
            model.ContactMQID     = ContactMQID;
            model.ContactName     = ContactName;
            model.ContactTel      = ContactTel;
            model.ContactUserName = UserInfoModel.UserName;
            model.IsAccept        = false;
            model.IssueTime       = DateTime.Now;
            model.LeaveCityId     = int.Parse(LeaveCity);
            model.OperatorID      = UserInfoModel.ID;
            model.PriceDetails    = InsertPriceDetail();
            model.QuickPlan       = QuickPlan;
            model.ReleaseType     = EyouSoft.Model.TourStructure.ReleaseType.Quick;
            model.RouteName       = RouteName;
            model.RouteTheme      = RouteThemeList;
            model.SaleCity        = SaleCityList;
            model.ServiceStandard = null;
            model.StandardPlans   = null;
            model.TourDays        = int.Parse(TourDays);

            if (!String.IsNullOrEmpty(hidRouteID))   // 修改
            {
                model.ID = hidRouteID;
                IsResult = bll.UpdateRouteInfo(model);
            }
            else
            {
                model.ID = Guid.NewGuid().ToString();
                IsResult = bll.InsertRouteInfo(model);
            }
            return(IsResult);
        }
Esempio n. 12
0
        /// <summary>
        /// 添加线路信息
        /// </summary>
        /// <returns></returns>
        private bool InsertRouteInfo()
        {
            bool   IsResult = false;
            string strErr   = string.Empty;
            // 线路基本信息
            string hidRouteID = Utils.GetFormValue(this.AddStandardRoute_hidRouteID.UniqueID);    // 用于判断是添加还是修改

            string RouteArea  = Utils.GetFormValue(this.AddStandardRoute_RouteArea.UniqueID);
            string RouteName  = Utils.GetFormValue(this.AddStandardRoute_RouteName.UniqueID);
            string TourDays   = Utils.GetFormValue(this.AddStandardRoute_txtTourDays.UniqueID);
            string RouteTopic = Utils.GetFormValue("AddStandardRoute_chkRouteTopic");
            string LeaveCity  = Utils.GetFormValue("AddStandardRoute_radPortCity");
            string SaleCity   = Utils.GetFormValue("AddStandardRoute_chkSaleCity");
            string Service    = Utils.GetFormValue(this.AddStandardRoute_Service.UniqueID);
            string Remark     = Utils.GetFormValue(this.AddStandardRoute_Remark.UniqueID);

            // 标准发布线路行程信息
            string StandardPlan = Utils.GetFormValue(this.AddStandardRoute_Remark.UniqueID);

            // 服务标准
            string ResideContent       = Utils.GetFormValue("AddStandardRouteResideContent");
            string DinnerContent       = Utils.GetFormValue("AddStandardRouteDinnerContent");
            string SightContent        = Utils.GetFormValue("AddStandardRouteSightContent");
            string CarContent          = Utils.GetFormValue("AddStandardRouteCarContent");
            string GuideContent        = Utils.GetFormValue("AddStandardRouteGuideContent");
            string TrafficContent      = Utils.GetFormValue("AddStandardRouteTrafficContent");
            string IncludeOtherContent = Utils.GetFormValue("AddStandardRouteIncludeOtherContent");

            // 线路负责人
            string ContactName     = Utils.GetFormValue("AddStandardRoute_TourContact");
            string ContactTel      = Utils.GetFormValue("AddStandardRoute_TourContactTel");
            string ContactMQID     = Utils.GetFormValue("AddStandardRoute_TourContacMQ");
            string ContactUserName = Utils.GetFormValue("AddStandardRoute_TourContactUserName");

            if (LeaveCity == null || LeaveCity == string.Empty)
            {
                LeaveCity = "0";
            }
            #region 线路区域处理
            string AreaName = string.Empty;
            int    AreaID   = 0;
            EyouSoft.Model.SystemStructure.AreaType Areatype = EyouSoft.Model.SystemStructure.AreaType.国内短线;
            if (!String.IsNullOrEmpty(RouteArea) && StringValidate.IsInteger(RouteArea))
            {
                EyouSoft.IBLL.SystemStructure.ISysArea AreaBll   = EyouSoft.BLL.SystemStructure.SysArea.CreateInstance();
                EyouSoft.Model.SystemStructure.SysArea AreaModel = AreaBll.GetSysAreaModel(int.Parse(RouteArea));
                if (AreaModel != null)
                {
                    AreaID   = AreaModel.AreaId;
                    AreaName = AreaModel.AreaName;
                    Areatype = AreaModel.RouteType;
                }
                AreaModel = null;
                AreaBll   = null;
            }
            #endregion

            #region 线路主题
            IList <int> RouteThemeList = new List <int>();
            if (!String.IsNullOrEmpty(RouteTopic))
            {
                string[] strRouteTopic = RouteTopic.Split(',');
                //string[] strRouteTopic = new string[] { "1","2","3"};
                foreach (string str in strRouteTopic)
                {
                    RouteThemeList.Add(int.Parse(str));
                }
            }
            #endregion

            #region 销售城市
            IList <int> SaleCityList = new List <int>();
            if (!String.IsNullOrEmpty(SaleCity))
            {
                string[] strSaleCity = SaleCity.Split(',');
                foreach (string str in strSaleCity)
                {
                    SaleCityList.Add(int.Parse(str));
                }
            }
            #endregion

            // 写入线路信息
            EyouSoft.IBLL.TourStructure.IRouteBasicInfo bll   = EyouSoft.BLL.TourStructure.RouteBasicInfo.CreateInstance();
            EyouSoft.Model.TourStructure.RouteBasicInfo model = new EyouSoft.Model.TourStructure.RouteBasicInfo();
            model.AreaId          = AreaID;
            model.AreaType        = Areatype;
            model.CompanyID       = UserInfoModel.CompanyID;
            model.CompanyName     = UserInfoModel.CompanyName;
            model.ContactMQID     = ContactMQID;
            model.ContactName     = ContactName;
            model.ContactTel      = ContactTel;
            model.ContactUserName = ContactUserName;
            model.IsAccept        = false;
            model.IssueTime       = DateTime.Now;
            model.LeaveCityId     = int.Parse(LeaveCity);
            model.OperatorID      = UserInfoModel.ID;
            model.PriceDetails    = InsertRoutePriceDetail();
            model.QuickPlan       = string.Empty;
            model.ReleaseType     = EyouSoft.Model.TourStructure.ReleaseType.Standard;
            model.RouteName       = RouteName;
            model.RouteTheme      = RouteThemeList;
            model.SaleCity        = SaleCityList;
            model.StandardPlans   = InsertRouteStandardPlan();
            model.TourDays        = int.Parse(TourDays);
            // 服务标准
            EyouSoft.Model.TourStructure.RouteServiceStandard RouteServiceModel = new EyouSoft.Model.TourStructure.RouteServiceStandard();
            if (!String.IsNullOrEmpty(ResideContent))
            {
                RouteServiceModel.ResideContent = ResideContent;
            }
            if (!String.IsNullOrEmpty(DinnerContent))
            {
                RouteServiceModel.DinnerContent = DinnerContent;
            }
            if (!String.IsNullOrEmpty(CarContent))
            {
                RouteServiceModel.CarContent = CarContent;
            }
            if (!String.IsNullOrEmpty(SightContent))
            {
                RouteServiceModel.SightContent = SightContent;
            }
            if (!String.IsNullOrEmpty(GuideContent))
            {
                RouteServiceModel.GuideContent = GuideContent;
            }
            if (!String.IsNullOrEmpty(TrafficContent))
            {
                RouteServiceModel.TrafficContent = TrafficContent;
            }
            if (!String.IsNullOrEmpty(IncludeOtherContent))
            {
                RouteServiceModel.IncludeOtherContent = IncludeOtherContent;
            }
            if (!String.IsNullOrEmpty(Service))
            {
                RouteServiceModel.NotContainService = Service;
            }
            if (!String.IsNullOrEmpty(Remark))
            {
                RouteServiceModel.SpeciallyNotice = Remark;
            }
            model.ServiceStandard = RouteServiceModel;

            if (!String.IsNullOrEmpty(hidRouteID))   // 修改
            {
                model.ID = hidRouteID;
                IsResult = bll.UpdateRouteInfo(model);
            }
            else
            {
                model.ID = Guid.NewGuid().ToString();
                IsResult = bll.InsertRouteInfo(model);
            }

            return(IsResult);
        }
Esempio n. 13
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            IList <EyouSoft.Model.SystemStructure.SysCityAreaControl> modelList = new List <EyouSoft.Model.SystemStructure.SysCityAreaControl>();

            string[] LongVal  = Utils.GetFormValues("cbkName_国内长线");
            string[] ShortVal = Utils.GetFormValues("cbkName_国内短线");
            string[] OutVal   = Utils.GetFormValues("cbkName_国际线");
            //添加国内长线模块
            if (LongVal != null && LongVal.Length > 0)
            {
                EyouSoft.Model.SystemStructure.SysCityAreaControl model = null;
                foreach (string LongM in LongVal)
                {
                    model = new EyouSoft.Model.SystemStructure.SysCityAreaControl();
                    string[] strList  = LongM.Split('_');
                    string[] areaInfo = strList[0].Split('|');
                    model.AreaId   = int.Parse(areaInfo[0]);
                    model.AreaName = areaInfo[1];
                    model.CityId   = CityID;
                    model.CityName = "";
                    if (strList[2] != null)
                    {
                        if (strList[2].ToString() == "1")
                        {
                            model.IsDefaultShow = true;
                        }
                        else
                        {
                            model.IsDefaultShow = false;
                        }
                    }
                    else
                    {
                        model.IsDefaultShow = false;
                    }
                    model.ProvinceId   = ProvinceID;
                    model.ProvinceName = "";
                    model.RouteType    = EyouSoft.Model.SystemStructure.AreaType.国内长线;
                    if (strList[1] != null && StringValidate.IsInteger(strList[1].ToString()))
                    {
                        model.SortId = int.Parse(strList[1].ToString());
                    }
                    else
                    {
                        model.SortId = 0;
                    }
                    model.TourCount = 0;
                    modelList.Add(model);
                }
            }
            //添加国内短线模块
            if (ShortVal != null && ShortVal.Length > 0)
            {
                EyouSoft.Model.SystemStructure.SysCityAreaControl model = null;
                foreach (string ShortM in ShortVal)
                {
                    model = new EyouSoft.Model.SystemStructure.SysCityAreaControl();
                    string[] strList  = ShortM.Split('_');
                    string[] areaInfo = strList[0].Split('|');
                    model.AreaId   = int.Parse(areaInfo[0]);
                    model.AreaName = areaInfo[1];
                    model.CityId   = CityID;
                    model.CityName = "";
                    if (strList[2] != null)
                    {
                        if (strList[2].ToString() == "1")
                        {
                            model.IsDefaultShow = true;
                        }
                        else
                        {
                            model.IsDefaultShow = false;
                        }
                    }
                    else
                    {
                        model.IsDefaultShow = false;
                    }
                    model.ProvinceId   = ProvinceID;
                    model.ProvinceName = "";
                    model.RouteType    = EyouSoft.Model.SystemStructure.AreaType.国内短线;
                    if (strList[1] != null && StringValidate.IsInteger(strList[1].ToString()))
                    {
                        model.SortId = int.Parse(strList[1].ToString());
                    }
                    else
                    {
                        model.SortId = 0;
                    }
                    model.TourCount = 0;
                    modelList.Add(model);
                }
            }
            //添加国际线模块
            if (OutVal != null && OutVal.Length > 0)
            {
                EyouSoft.Model.SystemStructure.SysCityAreaControl model = null;
                foreach (string OutM in OutVal)
                {
                    model = new EyouSoft.Model.SystemStructure.SysCityAreaControl();
                    string[] strList  = OutM.Split('_');
                    string[] areaInfo = strList[0].Split('|');
                    model.AreaId   = int.Parse(areaInfo[0]);
                    model.AreaName = areaInfo[1];
                    model.CityId   = CityID;
                    model.CityName = "";
                    if (strList[2] != null)
                    {
                        if (strList[2].ToString() == "1")
                        {
                            model.IsDefaultShow = true;
                        }
                        else
                        {
                            model.IsDefaultShow = false;
                        }
                    }
                    else
                    {
                        model.IsDefaultShow = false;
                    }
                    model.ProvinceId   = ProvinceID;
                    model.ProvinceName = "";
                    model.RouteType    = EyouSoft.Model.SystemStructure.AreaType.国际线;
                    if (strList[1] != null && StringValidate.IsInteger(strList[1].ToString()))
                    {
                        model.SortId = int.Parse(strList[1].ToString());
                    }
                    else
                    {
                        model.SortId = 0;
                    }
                    model.TourCount = 0;
                    modelList.Add(model);
                }
            }
            //执行操作
            EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().UpdateSysSiteAreaControl(CityID, modelList);
            //释放资源
            modelList = null;
            MessageBox.ShowAndRedirect(this, "设置线路区域成功!", "ChooseRouteAgency.aspx?CityID=" + CityID);
        }
Esempio n. 14
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            #region 数据验证
            StringBuilder StrErr = new StringBuilder();
            if (Utils.GetFormValue(ddlTypes.UniqueID) == "-1")
            {
                StrErr.Append("请选择类别\n");
            }
            if (Utils.GetFormValue(ddlTags.UniqueID) == "-1")
            {
                StrErr.Append("请选择标签\n");
            }
            if (txtContent.Text.Trim().Length == 0)
            {
                StrErr.Append("请输入供求内容");
            }
            if (StrErr.Length > 0)
            {
                MessageBox.Show(this.Page, StrErr.ToString());
                return;
            }
            StrErr = null;
            #endregion

            EyouSoft.Model.CommunityStructure.ExchangeList model = new EyouSoft.Model.CommunityStructure.ExchangeList();
            model.AttatchPath      = string.Empty;
            model.CityId           = SiteUserInfo.CityId;
            model.CompanyId        = SiteUserInfo.CompanyID;
            model.CompanyName      = SiteUserInfo.CompanyName;
            model.ContactName      = SiteUserInfo.ContactInfo.ContactName;
            model.ContactTel       = SiteUserInfo.ContactInfo.Tel;
            model.ExchangeTag      = (EyouSoft.Model.CommunityStructure.ExchangeTag) int.Parse(Utils.GetFormValue(ddlTags.UniqueID));
            model.ExchangeText     = Utils.GetText(EyouSoft.Common.Utils.InputText(txtContent.Text), 250);
            model.ExchangeTitle    = Utils.GetText(model.ExchangeText, 26);
            model.ID               = Guid.NewGuid().ToString();
            model.IssueTime        = DateTime.Now;
            model.OperatorId       = SiteUserInfo.ID;
            model.OperatorMQ       = SiteUserInfo.ContactInfo.MQ;
            model.OperatorName     = SiteUserInfo.ContactInfo.ContactName;
            model.ProvinceId       = SiteUserInfo.ProvinceId;
            model.TopicClassID     = (EyouSoft.Model.CommunityStructure.ExchangeType) int.Parse(Utils.GetFormValue(ddlTypes.UniqueID));
            model.IsCheck          = IsCompanyCheck;
            model.ExchangeCategory = Utils.GetFormValue("dllCategory") == "1" ? EyouSoft.Model.CommunityStructure.ExchangeCategory.供 : EyouSoft.Model.CommunityStructure.ExchangeCategory.求;
            IList <int> ProvinceIds    = null;
            string[]    strProvinceIds = Utils.GetFormValues("ckbProvince");
            if (strProvinceIds != null && strProvinceIds.Length > 0)
            {
                ProvinceIds = new List <int>();
                for (int i = 0; i < strProvinceIds.Length; i++)
                {
                    if (!string.IsNullOrEmpty(strProvinceIds[i]) && StringValidate.IsInteger(strProvinceIds[i]))
                    {
                        ProvinceIds.Add(int.Parse(strProvinceIds[i]));
                    }
                }
            }

            bool Result = EyouSoft.BLL.CommunityStructure.ExchangeList.CreateInstance().AddExchangeList(model, ProvinceIds == null ? null : ProvinceIds.ToArray());
            model = null;
            if (Result)
            {
                MessageBox.ShowAndRedirect(this.Page, "供求发布成功!", Request.RawUrl);
            }
            else
            {
                MessageBox.ShowAndRedirect(this.Page, "供求发布失败!", Request.RawUrl);
            }
        }
Esempio n. 15
0
        public void ProcessRequest(HttpContext context)
        {
            EyouSoft.SSOComponent.Entity.UserInfo SiteUserInfo = null;
            bool IsLogin = EyouSoft.Security.Membership.UserProvider.IsUserLogin(out SiteUserInfo);
            context.Response.ContentType = "text/plain";
            string ImageServerURL = ImageManage.GetImagerServerUrl(1);
            #region 参数生成
            int pageIndex = 1;
            int pageSize = 10;
            int recordCount = 0;
            int ItemIndex = 1;
            int ChildItemIndex = 1;
            string TopicId = string.Empty;
            int TopicType = 1; //回复类型 1:供求 2:嘉宾访谈
            int CurrCityId = 0; //当前销售城市
            StringBuilder StrCommHTML = new StringBuilder();
            if (context.Request.QueryString["pageIndex"] != null && StringValidate.IsInteger(context.Request.QueryString["pageIndex"].ToString()))
            {
                pageIndex = int.Parse(context.Request.QueryString["pageIndex"].ToString());
            }
            if (context.Request.QueryString["pageSize"] != null && StringValidate.IsInteger(context.Request.QueryString["pageSize"].ToString()))
            {
                pageSize = int.Parse(context.Request.QueryString["pageSize"].ToString());
            }
            if (context.Request.QueryString["TopicType"] != null && StringValidate.IsInteger(context.Request.QueryString["TopicType"].ToString()))
            {
                TopicType = int.Parse(context.Request.QueryString["TopicType"].ToString());
            }
            if (context.Request.QueryString["TopicId"] != null)
            {
                TopicId = StringValidate.SafeRequest(context.Request.QueryString["TopicId"].ToString());
            }
            if (context.Request.QueryString["cityid"] != null)
            {
                int.TryParse(context.Request.QueryString["cityid"].ToString(), out CurrCityId);
            }
            #endregion

            #region 生成回复列表
            EyouSoft.Model.CompanyStructure.CompanyType? UnitType =null;
            string GoToUrl=string.Empty;
            EyouSoft.IBLL.CommunityStructure.IExchangeComment ICommentBll = EyouSoft.BLL.CommunityStructure.ExchangeComment.CreateInstance();
            IList<EyouSoft.Model.CommunityStructure.ExchangeComment> list = new List<EyouSoft.Model.CommunityStructure.ExchangeComment>();
            if (TopicType == 1)
            {
                list = ICommentBll.GetSupplyComment(pageSize, pageIndex, ref recordCount, TopicId);
            }
            else
            {
                list = ICommentBll.GetGuestInterview(pageSize, pageIndex, ref recordCount, TopicId);
            }
            StrCommHTML.Append("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"border:1px solid #ccc;\">");
            StrCommHTML.Append("<tr>");
            StrCommHTML.AppendFormat("<td style=\"background:url({0}/images/seniorshop/gqplhang.gif) repeat-x; height:29px; font-size:14px; padding-left:10px; text-align:left;\">", ImageServerURL);
            StrCommHTML.AppendFormat("<a name=\"d1\"> </a><strong>网友评论| 共{0}条</strong></td>", recordCount);
            StrCommHTML.Append("</tr><tr><td>");
            if (list != null && list.Count > 0)
            {
                foreach (EyouSoft.Model.CommunityStructure.ExchangeComment parent in list)
                {

                    UnitType = Utils.GetCompanyType(parent.CompanyId);
                    GoToUrl = UnitType.HasValue ? Utils.GetCompanyDomain(parent.CompanyId, UnitType.Value) : "javascript:void(0);";
                    UnitType = null;
                    StrCommHTML.Append("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"border-bottom:1px dashed #d5d5d5; margin-top:5px;\">");
                    StrCommHTML.Append("<tr>");
                    StrCommHTML.Append("<td width=\"78%\" align=\"left\">");
                    StrCommHTML.AppendFormat("<em style=\"color:#009900; font-size:18px; font-weight:bold;\">{0}</em>楼 ", (pageIndex - 1) * pageSize + ItemIndex);
                    StrCommHTML.AppendFormat("<span class=\"gqlvse\"><strong><a {2} href=\"{0}\" class=\"font12_grean\">{1}</a></strong></span>", GoToUrl, parent.IsAnonymous ? "" : parent.CompanyName,UnitType.HasValue?"target=\"_blank\"":"");
                    StrCommHTML.AppendFormat("<label class=\"gqlvse\"><strong> {0} </strong></label> {1}说: ", parent.IsAnonymous ? "网友" : parent.OperatorName, EyouSoft.Common.Utils.GetMQ(parent.OperatorMQ));
                    StrCommHTML.Append("</td>");
                    //StrCommHTML.AppendFormat("<td width=\"22%\" align=\"right\">{0} {1}</td>", parent.IssueTime.ToString("yyyy-MM-dd HH:mm"), IsLogin ? string.Format("|<a href=\"javascript:void(0);\" onclick=\"gotoComment('{0}',{1});return false\">回复</a> ", parent.ID, (pageIndex - 1) * pageSize + ItemIndex) : "");
                    StrCommHTML.AppendFormat("<td width=\"22%\" align=\"right\">{0} {1}</td>", parent.IssueTime.ToString("yyyy-MM-dd HH:mm"), string.Format("|<a href=\"javascript:void(0);\" onclick=\"gotoComment('{0}',{1});return false\">回复</a> ", parent.ID, (pageIndex - 1) * pageSize + ItemIndex));
                    StrCommHTML.Append("</tr>");
                    StrCommHTML.Append("<tr>");
                    if (parent.IsHasNextLevel)
                    {
                        StrCommHTML.Append("<td colspan=\"2\" align=\"left\" class=\"detaillou\">");
                        IList<EyouSoft.Model.CommunityStructure.ExchangeComment> childList = ICommentBll.GetCommentByCommentId(parent.ID);
                        if (childList != null && childList.Count > 0)
                        {
                            for (int i = 0; i < childList.Count + 1; i++)
                            {
                                StrCommHTML.Append("<div>");
                            }
                            StrCommHTML.AppendFormat("<p><span>{0}</span></p>{1}</div>", ChildItemIndex, StringValidate.TextToHtml(parent.CommentText));
                            ChildItemIndex += 1;
                            foreach (EyouSoft.Model.CommunityStructure.ExchangeComment child in childList)
                            {
                                UnitType = Utils.GetCompanyType(parent.CompanyId);
                                GoToUrl = UnitType.HasValue ? Utils.GetCompanyDomain(parent.CompanyId, UnitType.Value) : "javascript:void(0);";
                                UnitType = null;
                                StrCommHTML.AppendFormat("<p><a  {5} href=\"{0}\">{1}</a>{2}<span>{3}</span></p>{4}</div>"
                                   , GoToUrl, child.IsAnonymous ? "" : child.CompanyName, child.IsAnonymous ? "网友" : child.OperatorName, ChildItemIndex,
                                   StringValidate.TextToHtml(child.CommentText),UnitType.HasValue?"target=\"_blank\"":"");
                                ChildItemIndex += 1;
                            }
                        }
                    }
                    else
                    {
                        StrCommHTML.AppendFormat("<td colspan=\"2\" align=\"left\" style=\"padding:10px; font-size:14px;\">{0}</td>",StringValidate.TextToHtml(parent.CommentText));
                    }
                    StrCommHTML.Append("</td></tr></table>");
                    ItemIndex += 1;
                    ChildItemIndex = 1;
                }
            }
            else
            {
                StrCommHTML.Append("暂无回复!");
            }
            StrCommHTML.Append("</td></tr></table>");
            StrCommHTML.AppendFormat("<input type=\"hidden\" id=\"hIndex\" value=\"{0}\">", pageIndex);
            StrCommHTML.AppendFormat("<input type=\"hidden\" id=\"hSize\" value=\"{0}\">", pageSize);
            StrCommHTML.AppendFormat("<input type=\"hidden\" id=\"hRecordCount\" value=\"{0}\">", recordCount);
            #endregion

            context.Response.Write(StrCommHTML.ToString());
            context.Response.End();
        }
Esempio n. 16
0
        /// <summary>
        /// 保存求购
        /// </summary>
        private void btnSave()
        {
            #region 验证数据
            //int Type = Utils.GetInt(Request.Form["type"], 1);     //类型
            // = Utils.GetFormValue("seltype");    //标签
            //string Title = Utils.GetFormValue("txtTitle", 50);      //标题
            //string TxtInfo = Utils.GetFormValue("txtInfo", 500);     //内容
            //string TxtName = Utils.InputText(txtName.Value, 100);    //姓名
            //string TxtMQ = Utils.InputText(txtMQ.Value, 20);        //MQ
            //string TxtTel = Utils.InputText(txtTel.Value, 50);      //联系电话
            //string AttatchPath = Utils.GetFormValue("ctl00$ctl00$c1$SupplierBody$SingleFileUpload1$hidFileName", 250);   //附件地址
            //string[] strProvinceIds = Utils.GetFormValues("ckbProvince");               //发布省份
            //if (Title.Trim().Length == 0)
            //{
            //    ErrStr += "请输入求购信息标题\\n";
            //}
            //if (TxtInfo.Trim().Length == 0)
            //{
            //    ErrStr += "请输入求购信息内容\\n";
            //}
            //if (TxtMQ.Trim().Length == 0)
            //{
            //    ErrStr += "请输入MQ号码";
            //}
            //if (!string.IsNullOrEmpty(ErrStr))
            //{
            //    MessageBox.Show(this.Page, ErrStr);
            //    return;
            //}
            #endregion
            EyouSoft.Model.CommunityStructure.ExchangeList model = new EyouSoft.Model.CommunityStructure.ExchangeList();
            model.AttatchPath   = Utils.GetFormValue("SingleFileUpload1$hidFileName", 250);
            model.CityId        = SiteUserInfo.CityId;
            model.CompanyId     = SiteUserInfo.CompanyID;
            model.CompanyName   = SiteUserInfo.CompanyName;
            model.ContactName   = Utils.GetFormValue("txtname", 100);
            model.ContactTel    = Utils.GetFormValue("txttel", 50);
            model.ExchangeTag   = (EyouSoft.Model.CommunityStructure.ExchangeTag)Utils.GetInt(Request.Form["type"]);
            model.ExchangeText  = Utils.GetFormValue("content");
            model.ExchangeTitle = Utils.GetFormValue("title");
            model.ID            = Guid.NewGuid().ToString();
            model.IssueTime     = DateTime.Now;
            model.OperatorId    = SiteUserInfo.ID;
            model.OperatorMQ    = Utils.GetFormValue("txtmq", 20);
            model.OperatorName  = SiteUserInfo.ContactInfo.ContactName;
            model.ProvinceId    = SiteUserInfo.ProvinceId;
            int htype = Utils.GetInt(Request.Form["htype"]);
            if (htype == 1)
            {
                model.ExchangeCategory = EyouSoft.Model.CommunityStructure.ExchangeCategory.求;
            }
            else
            {
                model.ExchangeCategory = EyouSoft.Model.CommunityStructure.ExchangeCategory.供;
            }
            if (model.ExchangeCategory == EyouSoft.Model.CommunityStructure.ExchangeCategory.供)
            {
                model.TopicClassID = (EyouSoft.Model.CommunityStructure.ExchangeType)Utils.GetInt(Request.Form["seltype2"]);
            }
            else
            {
                model.TopicClassID = (EyouSoft.Model.CommunityStructure.ExchangeType)Utils.GetInt(Request.Form["seltype1"]);
            }
            model.IsCheck = IsCompanyCheck;//供求审核状态默认等于当前用户所在公司的审核状态


            string[]    strProvinceIds = Utils.GetFormValues("selprov");
            IList <int> ProvinceIds    = null;
            if (strProvinceIds != null && strProvinceIds.Length > 0)
            {
                ProvinceIds = new List <int>();
                for (int i = 0; i < strProvinceIds.Length; i++)
                {
                    if (!string.IsNullOrEmpty(strProvinceIds[i]) && StringValidate.IsInteger(strProvinceIds[i]))
                    {
                        ProvinceIds.Add(int.Parse(strProvinceIds[i]));
                    }
                }
            }
            bool Result = EyouSoft.BLL.CommunityStructure.ExchangeList.CreateInstance().AddExchangeList(model, ProvinceIds == null ? null : ProvinceIds.ToArray());
            if (Result)
            {
                Utils.ShowAndClose("发布成功!", EyouSoft.Common.URLREWRITE.SupplierInfo.InfoUrlWrite(model.ID, CityId));
            }
            else
            {
                Utils.ShowAndRedirect("发布失败!", Request.RawUrl);
            }
        }
Esempio n. 17
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     #region 验证数据
     string   ErrStr      = string.Empty;
     string[] Tags        = Utils.GetFormValues("radioTag");
     string[] Types       = Utils.GetFormValues("radioType");
     string   AttatchPath = Utils.GetFormValue("ctl00$ctl00$Main$SupplierMain$SingleFileUpload1$hidFileName");
     if (Tags.Length == 0)
     {
         ErrStr += "请选择标签\\n";
     }
     if (Types.Length == 0)
     {
         ErrStr += "请选择类别\\n";
     }
     if (txtInfo.Value.Trim().Length == 0)
     {
         ErrStr += "请输入供求信息内容\\n";
     }
     if (txtMQ.Value.Trim().Length == 0)
     {
         ErrStr += "请输入MQ号码";
     }
     if (!string.IsNullOrEmpty(ErrStr))
     {
         MessageBox.Show(this.Page, ErrStr);
         return;
     }
     #endregion
     EyouSoft.Model.CommunityStructure.ExchangeList model = new EyouSoft.Model.CommunityStructure.ExchangeList();
     model.AttatchPath   = AttatchPath;
     model.CityId        = SiteUserInfo.CityId;
     model.CompanyId     = SiteUserInfo.CompanyID;
     model.CompanyName   = SiteUserInfo.CompanyName;
     model.ContactName   = Utils.InputText(txtName.Value);
     model.ContactTel    = Utils.InputText(txtTel.Value);
     model.ExchangeTag   = (EyouSoft.Model.CommunityStructure.ExchangeTag) int.Parse(Tags[0]);
     model.ExchangeText  = Utils.InputText(txtInfo.Value);
     model.ExchangeTitle = Utils.GetText(model.ExchangeText, 26);
     model.ID            = Guid.NewGuid().ToString();
     model.IssueTime     = DateTime.Now;
     model.OperatorId    = SiteUserInfo.ID;
     model.OperatorMQ    = Utils.InputText(txtMQ.Value);
     model.OperatorName  = SiteUserInfo.ContactInfo.ContactName;
     model.ProvinceId    = SiteUserInfo.ProvinceId;
     model.TopicClassID  = (EyouSoft.Model.CommunityStructure.ExchangeType) int.Parse(Types[0]);
     model.IsCheck       = IsCompanyCheck;//供求审核状态默认等于当前用户所在公司的审核状态
     IList <int> ProvinceIds    = null;
     string[]    strProvinceIds = Utils.GetFormValues("ckbProvince");
     if (strProvinceIds != null && strProvinceIds.Length > 0)
     {
         ProvinceIds = new List <int>();
         for (int i = 0; i < strProvinceIds.Length; i++)
         {
             if (!string.IsNullOrEmpty(strProvinceIds[i]) && StringValidate.IsInteger(strProvinceIds[i]))
             {
                 ProvinceIds.Add(int.Parse(strProvinceIds[i]));
             }
         }
     }
     bool Result = EyouSoft.BLL.CommunityStructure.ExchangeList.CreateInstance().Add(model, ProvinceIds == null ? null : ProvinceIds.ToArray());
     model         = null;
     txtInfo.Value = "";
     if (Result)
     {
         Utils.ShowAndRedirect("供求发布成功!", Request.RawUrl);
     }
     else
     {
         Utils.ShowAndRedirect("供求发布失败!", Request.RawUrl);
     }
 }
Esempio n. 18
0
        /// <summary>
        /// 保存供应
        /// </summary>
        private void sbtnSave()
        {
            #region 验证数据
            string   ErrStr         = string.Empty;
            int      Type           = Utils.GetInt(Request.Form["schooseType"], 1);                                         //类型
            string[] Tags           = Utils.GetFormValues("sradioTag");                                                     //标签
            string   Title          = Utils.GetFormValue("stxtTitle", 50);                                                  //标题
            string   TxtInfo        = Utils.GetFormValue("stxtInfo", 500);                                                  //内容
            string   TxtName        = Utils.InputText(stxtName.Value, 100);                                                 //姓名
            string   TxtMQ          = Utils.InputText(stxtMQ.Value, 20);                                                    //MQ
            string   TxtTel         = Utils.InputText(stxtTel.Value, 50);                                                   //联系电话
            string   AttatchPath    = Utils.GetFormValue("ctl00$ctl00$c1$SupplierBody$SingleFileUpload2$hidFileName", 250); //附件地址
            string[] strProvinceIds = Utils.GetFormValues("sckbProvince");                                                  //发布省份
            if (Title.Trim().Length == 0)
            {
                ErrStr += "请输入求购信息标题\\n";
            }
            if (TxtInfo.Trim().Length == 0)
            {
                ErrStr += "请输入求购信息内容\\n";
            }
            if (TxtMQ.Trim().Length == 0)
            {
                ErrStr += "请输入MQ号码";
            }
            if (!string.IsNullOrEmpty(ErrStr))
            {
                MessageBox.Show(this.Page, ErrStr);
                return;
            }
            #endregion
            EyouSoft.Model.CommunityStructure.ExchangeList model = new EyouSoft.Model.CommunityStructure.ExchangeList();
            model.AttatchPath      = AttatchPath;
            model.CityId           = SiteUserInfo.CityId;
            model.CompanyId        = SiteUserInfo.CompanyID;
            model.CompanyName      = SiteUserInfo.CompanyName;
            model.ContactName      = TxtName;
            model.ContactTel       = TxtTel;
            model.ExchangeTag      = (EyouSoft.Model.CommunityStructure.ExchangeTag) int.Parse(Tags[0]);
            model.ExchangeText     = TxtInfo;
            model.ExchangeTitle    = Title;
            model.ID               = Guid.NewGuid().ToString();
            model.IssueTime        = DateTime.Now;
            model.OperatorId       = SiteUserInfo.ID;
            model.OperatorMQ       = TxtMQ;
            model.OperatorName     = SiteUserInfo.ContactInfo.ContactName;
            model.ProvinceId       = SiteUserInfo.ProvinceId;
            model.TopicClassID     = (EyouSoft.Model.CommunityStructure.ExchangeType)(Type);
            model.IsCheck          = IsCompanyCheck;//供求审核状态默认等于当前用户所在公司的审核状态
            model.ExchangeCategory = EyouSoft.Model.CommunityStructure.ExchangeCategory.供;

            IList <int> ProvinceIds = null;
            if (strProvinceIds != null && strProvinceIds.Length > 0)
            {
                ProvinceIds = new List <int>();
                for (int i = 0; i < strProvinceIds.Length; i++)
                {
                    if (!string.IsNullOrEmpty(strProvinceIds[i]) && StringValidate.IsInteger(strProvinceIds[i]))
                    {
                        ProvinceIds.Add(int.Parse(strProvinceIds[i]));
                    }
                }
            }
            bool Result = EyouSoft.BLL.CommunityStructure.ExchangeList.CreateInstance().AddExchangeList(model, ProvinceIds == null ? null : ProvinceIds.ToArray());

            if (Result)
            {
                Utils.ShowAndRedirect("供应发布成功!", EyouSoft.Common.URLREWRITE.SupplierInfo.InfoUrlWrite(model.ID, CityId));
            }
            else
            {
                Utils.ShowAndRedirect("供应发布失败!", Request.RawUrl);
            }
            model = null;
        }