示例#1
0
        /// <summary>
        /// 供求类别健值对列表
        /// </summary>
        /// <param name="cat"></param>
        /// <returns></returns>
        public static IList <EyouSoft.Common.EnumObj> GetExchangeTypeListByCat(EyouSoft.Model.CommunityStructure.ExchangeCategory cat)
        {
            IList <EyouSoft.Common.EnumObj> exchangeTypelist = new List <EyouSoft.Common.EnumObj>();

            exchangeTypelist = EyouSoft.Common.EnumObj.GetList(typeof(EyouSoft.Model.CommunityStructure.ExchangeType));
            if (cat == EyouSoft.Model.CommunityStructure.ExchangeCategory.供)
            {
                exchangeTypelist.RemoveAt(8);
                exchangeTypelist.RemoveAt(0);
            }
            else
            {
                exchangeTypelist.RemoveAt(2);
                exchangeTypelist.RemoveAt(1);
            }
            return(exchangeTypelist);
        }
示例#2
0
        /// <summary>
        /// 供求类别健值对列表
        /// </summary>
        /// <param name="cat"></param>
        /// <returns></returns>
        public static IList <EyouSoft.Common.EnumObj> GetExchangeTypeListByCat(EyouSoft.Model.CommunityStructure.ExchangeCategory cat)
        {
            List <EyouSoft.Common.EnumObj> exchangeTypelist = new List <EnumObj>();

            //exchangeTypelist = EyouSoft.Common.EnumObj.GetList(typeof(EyouSoft.Model.CommunityStructure.ExchangeType));
            if (cat == EyouSoft.Model.CommunityStructure.ExchangeCategory.供)
            {
                exchangeTypelist = new List <EyouSoft.Common.EnumObj>()
                {
                    new EyouSoft.Common.EnumObj("地接报价", "2"),
                    new EyouSoft.Common.EnumObj("直通车", "3"),
                    new EyouSoft.Common.EnumObj("车辆", "4"),
                    new EyouSoft.Common.EnumObj("机票", "10"),
                    new EyouSoft.Common.EnumObj("酒店", "5"),
                    new EyouSoft.Common.EnumObj("票务", "7"),
                    new EyouSoft.Common.EnumObj("签证", "11"),
                    new EyouSoft.Common.EnumObj("招聘", "6"),
                    new EyouSoft.Common.EnumObj("其他", "8")
                };
            }
            else
            {
                exchangeTypelist = new List <EyouSoft.Common.EnumObj>()
                {
                    new EyouSoft.Common.EnumObj("团队询价", "1"),
                    new EyouSoft.Common.EnumObj("找地接", "9"),
                    new EyouSoft.Common.EnumObj("车辆", "4"),
                    new EyouSoft.Common.EnumObj("机票", "10"),
                    new EyouSoft.Common.EnumObj("酒店", "5"),
                    new EyouSoft.Common.EnumObj("票务", "7"),
                    new EyouSoft.Common.EnumObj("签证", "11"),
                    new EyouSoft.Common.EnumObj("招聘", "6"),
                    new EyouSoft.Common.EnumObj("其他", "8")
                };
            }
            return(exchangeTypelist);
        }
示例#3
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void InitPage()
        {
            model = EyouSoft.BLL.CommunityStructure.ExchangeList.CreateInstance().GetModel(ExchangeID);
            int proCount = 0;

            if (model != null)
            {
                Tel          = model.ContactTel;
                ConnectName  = model.ContactName;
                MQ           = model.OperatorMQ;
                ExchangeText = model.ExchangeText;
                string fileName = "";
                string filePath = "";
                if (model.AttatchPath.Split('|').Length > 1)
                {
                    fileName = model.AttatchPath.Split('|')[0];
                    filePath = model.AttatchPath.Split('|')[1];
                }
                else
                {
                    filePath = model.AttatchPath;
                }
                AttatchPath = filePath;

                AttatchPathFileUpload1.LastDocFile = filePath;
                //if (model.ExchangePhotoList != null && model.ExchangePhotoList.Count > 0)
                //{
                //    for (int j = 0; j < model.ExchangePhotoList.Count; j++)
                //    {
                //        switch (j)
                //        {
                //            case 0:
                //                SupplyInfoImgePath1 = model.ExchangePhotoList[j].ImgPath;
                //                imgId1 = model.ExchangePhotoList[j].ImgId;
                //                break;
                //            case 1:
                //                SupplyInfoImgePath2 = model.ExchangePhotoList[j].ImgPath;
                //                imgId2 = model.ExchangePhotoList[j].ImgId;
                //                break;
                //            case 2:
                //                SupplyInfoImgePath3 = model.ExchangePhotoList[j].ImgPath;
                //                imgId3 = model.ExchangePhotoList[j].ImgId;
                //                break;
                //            case 3:
                //                SupplyInfoImgePath4 = model.ExchangePhotoList[j].ImgPath;
                //                imgId4 = model.ExchangePhotoList[j].ImgId;
                //                break;
                //        }
                //    }
                //}
            }
            else
            {
                ConnectName = this.SiteUserInfo.ContactInfo.ContactName;
                MQ          = this.SiteUserInfo.ContactInfo.MQ;
                Tel         = this.SiteUserInfo.ContactInfo.Tel;
                if (string.IsNullOrEmpty(Tel))
                {
                    Tel = this.SiteUserInfo.ContactInfo.Mobile;
                }
            }

            #region  绑定标签枚举
            string[] strExchangeTag = Enum.GetNames(typeof(EyouSoft.Model.CommunityStructure.ExchangeTag));
            if (strExchangeTag != null && strExchangeTag.Length > 0)
            {
                int Tag = 1;
                if (model != null)
                {
                    Tag = (int)model.ExchangeTag;
                }
                if (Tag == 0)
                {
                    Tag = 1;
                }
                for (int i = 1; i <= strExchangeTag.Length; i++)
                {
                    if (Tag == ((int)(EyouSoft.Model.CommunityStructure.ExchangeTag)Enum.Parse(typeof(EyouSoft.Model.CommunityStructure.ExchangeTag), strExchangeTag[i - 1])))
                    {
                        ExchangeTagHtml += string.Format("<div class=\"gqbqx\"><input type=\"radio\"  checked=\"checked\" id=\"gqbiaoqian{0}\" name=\"rbtExchangeTag\" value=\"{0}\" /></div><div class=\"gqbiaoqian{0}\"><label for=\"gqbiaoqian{0}\">{1}</label></div>", i, strExchangeTag[i - 1]);
                    }
                    else
                    {
                        ExchangeTagHtml += string.Format("<div class=\"gqbqx\"><input type=\"radio\" id=\"gqbiaoqian{0}\" name=\"rbtExchangeTag\" value=\"{0}\" /></div><div class=\"gqbiaoqian{0}\"><label for=\"gqbiaoqian{0}\">{1}</label></div>", i, strExchangeTag[i - 1]);
                    }
                }
            }
            #endregion
            #region  绑定类别枚举
            IList <EyouSoft.Common.EnumObj> listg = GetExchangeTypeListByCat(EyouSoft.Model.CommunityStructure.ExchangeCategory.供);
            IList <EyouSoft.Common.EnumObj> listq = GetExchangeTypeListByCat(EyouSoft.Model.CommunityStructure.ExchangeCategory.求);
            EyouSoft.Model.CommunityStructure.ExchangeCategory curr = EyouSoft.Model.CommunityStructure.ExchangeCategory.供;
            if (model != null)
            {
                curr = model.ExchangeCategory;
            }
            if (listg != null && listg.Count > 0)
            {
                ExchangeTypeHtmlg += string.Format("<select name=\"rbtExchangeTypeg\" id=\"ExchangeTypeg\" {0}>", curr == EyouSoft.Model.CommunityStructure.ExchangeCategory.求 ? "style=\"display:none;\"" : "");
                foreach (EyouSoft.Common.EnumObj e in listg)
                {
                    ExchangeTypeHtmlg += string.Format("<option value=\"{0}\" {2}>{1}</option>", e.Value, e.Text, model == null ? "" : (e.Value == model.TopicClassID.ToString() ? "selected='selected'" : ""));
                }
                ExchangeTypeHtmlg += "</select>";
            }
            if (listq != null && listq.Count > 0)
            {
                ExchangeTypeHtmlq += string.Format("<select name=\"rbtExchangeTypeq\" id=\"ExchangeTypeq\" {0}>", curr == EyouSoft.Model.CommunityStructure.ExchangeCategory.供 ? "style=\"display:none;\"" : "");
                foreach (EyouSoft.Common.EnumObj e in listq)
                {
                    ExchangeTypeHtmlq += string.Format("<option value=\"{0}\" {2}>{1}</option>", e.Value, e.Text, model == null ? "" : (e.Value == model.TopicClassID.ToString() ? "selected='selected'" : ""));
                }
                ExchangeTypeHtmlq += "</select>";
            }

            #endregion
            #region 绑定省份
            IList <EyouSoft.Model.SystemStructure.SysProvince> ProvinceList = EyouSoft.BLL.SystemStructure.SysProvince.CreateInstance().GetProvinceList();
            if (ProvinceList != null && ProvinceList.Count > 0)
            {
                if (model != null && model.CityContactList != null)
                {
                    proCount = model.CityContactList.Count;
                }
                int[] ProLists = new int[proCount];
                if (model != null && model.CityContactList != null)
                {
                    for (int k = 0; k < model.CityContactList.Count; k++)
                    {
                        if (!ProLists.Contains(model.CityContactList[k].ProvinceId))
                        {
                            ProLists[k] = model.CityContactList[k].ProvinceId;
                        }
                    }
                }
                else
                {
                    if (model != null)
                    {
                        ProLists[0] = model.ProvinceId;
                    }
                }
                ((List <EyouSoft.Model.SystemStructure.SysProvince>)ProvinceList).ForEach(item =>
                {
                    if (model != null && model.CityContactList != null)
                    {
                        if (ProLists.Contains(item.ProvinceId))
                        {
                            ExchangeProvinceHtml += string.Format("<input id=\"ProvinceList_{0}\" type=\"checkbox\" name=\"ProvinceList_forSupply\" value=\"{0}\" {2} /><label for=\"ProvinceList_{0}\">{1}</label>", item.ProvinceId, item.ProvinceName, "checked=\"checked\"");
                        }
                        else
                        {
                            ExchangeProvinceHtml += string.Format("<input id=\"ProvinceList_{0}\" type=\"checkbox\" name=\"ProvinceList_forSupply\" value=\"{0}\" {2} /><label for=\"ProvinceList_{0}\">{1}</label>", item.ProvinceId, item.ProvinceName, "");
                        }
                    }
                    else
                    {
                        ExchangeProvinceHtml += string.Format("<input id=\"ProvinceList_{0}\" type=\"checkbox\" name=\"ProvinceList_forSupply\" value=\"{0}\" {2} /><label for=\"ProvinceList_{0}\">{1}</label>", item.ProvinceId, item.ProvinceName, "");
                    }
                });
            }
            ProvinceList = null;
            #endregion
        }