protected string GetAraName(object objAreaId) { int areaId = Core.MyConvert.GetInt32(objAreaId.ToString()); if (areaId <= 0) return ""; Model.AreaInfo area = new Business.Area().GetItem(areaId); if (area == null) return ""; return area.Name; }
protected void btnCall_Click(object sender, EventArgs e) { if ("" == ddlClass.Text) return; if (!Core.Utils.IsNumber(txtLevel.Text.Trim())) return; int level = Core.MyConvert.GetInt32(txtLevel.Text.Trim()); List<Model.AreaInfo> infos = new Business.Area().GetItems(0); System.Text.StringBuilder strHTML = new System.Text.StringBuilder(""); strHTML.Append("<ul>"); foreach (Model.AreaInfo info in infos) { strHTML.Append("<li>"); strHTML.Append("<span>"); strHTML.Append(SetHtmlUrl(info.ID.ToString(), info.Name)); //strHTML = strHTML.Append("//"); strHTML.Append("</span>"); if (info.HasSubArea) { List<Model.AreaInfo> childList = new Business.Area().GetItems(info.ID); strHTML.Append(GetChildHTML(childList, 1, level)); } strHTML.Append("</li>"); } strHTML.Append("</ul>"); string labelName = this.txtLabelName.Text.Trim(); XYECOM.Business.ClassLabel dal = new XYECOM.Business.ClassLabel(); if (dal.IsExists("XY_CLS_" + labelName)) { this.lblMsg.Text = "��ǩ�����ظ�����ѡ���������ƣ�"; return; } Model.ClassLabelInfo clsLabelInfo = new XYECOM.Model.ClassLabelInfo(); clsLabelInfo.Name = "XY_CLS_" + labelName; clsLabelInfo.CNName = this.txtCNName.Text.Trim(); clsLabelInfo.Body = strHTML.ToString().Replace("///", ""); clsLabelInfo.TableName = "XY_Area"; new Business.ClassLabel().Insert(clsLabelInfo); Response.Redirect("ClassLabelList.aspx"); }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); string flagName = XYECOM.Core.XYRequest.GetQueryString("fn"); Model.AreaSiteInfo info = new Business.AreaSite().GetItemByFlagName(flagName); if (info == null) { GotoMsgBoxPage("�ط�վ��Ϣ���ڻ��Ѿ���ɾ����", 5, config.WebURL); return; } Model.AreaInfo area = new Business.Area().GetItem(info.AreaId); if (area != null) areaname = area.Name; //�����ⲿ���� pageinfo.OuterAreaId = info.AreaId; string price = string.Empty; string typeId = string.Empty; if (XYECOM.Core.XYRequest.IsPost()) { string action = XYECOM.Core.XYRequest.GetFormString("btnSearch"); if (action == "�� ��") { price = XYECOM.Core.XYRequest.GetFormString("ddlBounty"); } if (action == "����") { typeId = XYECOM.Core.XYRequest.GetFormString("dzTypeId"); } } zqdata = GetZqData(info.AreaId, price); dzdata = GetDzData(info.AreaId, typeId); }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); if (!pageinfo.IsPost) { string flagName = XYECOM.Core.XYRequest.GetQueryString("fn"); Model.AreaSiteInfo info = new Business.AreaSite().GetItemByFlagName(flagName); if (info == null) { GotoMsgBoxPage("�ط�վ��Ϣ���ڻ��Ѿ���ɾ����", 5, config.WebURL); return; } Model.AreaInfo area = new Business.Area().GetItem(info.AreaId); if (area != null) areaname = area.Name; //�����ⲿ���� pageinfo.OuterAreaId = info.AreaId; } }
private string GetChildHTML(List<Model.AreaInfo> infolist, int thislevel, int level) { if (thislevel >= level) return ""; string htmllistflag = "dl"; string htmlitemflag = "dd"; if (thislevel == 1) { htmllistflag = "ol"; htmlitemflag = "li"; } System.Text.StringBuilder strHTML = new System.Text.StringBuilder(); strHTML.Append("<" + htmllistflag + ">"); foreach (Model.AreaInfo info in infolist) { strHTML.Append("<" + htmlitemflag + ">"); strHTML.Append(SetHtmlUrl(info.ID.ToString(), info.Name)); if (info.HasSubArea) { List<Model.AreaInfo> childs = new Business.Area().GetItems(info.ID); strHTML.Append(GetChildHTML(childs, ++thislevel, level)); } strHTML.Append("</" + htmlitemflag + ">"); } strHTML.Append("</" + htmllistflag + ">"); return strHTML.ToString(); }
private void BindClassList() { List<Model.AreaInfo> infos = new Business.Area().GetItems(0); this.pnlSuperClass.Controls.Add(new LiteralControl("<dt>")); foreach (Model.AreaInfo info in infos) { AddInfoHtml(info, "0", ""); if (info.HasSubArea) { AddChild(info, " "); } } this.pnlSuperClass.Controls.Add(new LiteralControl("</dt>")); }
private void AddChild(Model.AreaInfo info, string str) { this.pnlSuperClass.Controls.Add(new LiteralControl("<dl id=\"li_" + info.ID + "\" style=\"display:none;\"><dt>")); List<Model.AreaInfo> infos = new Business.Area().GetItems(info.ID); foreach (Model.AreaInfo info2 in infos) { AddInfoHtml(info2, info.ID.ToString(), str); if (info2.HasSubArea) { AddChild(info2, str + " "); } } this.pnlSuperClass.Controls.Add(new LiteralControl("</dl></dt>")); }
/// <summary> /// ��ȡǰ̨�û����� /// </summary> /// <param name="userRegInfo">�û�ʵ�����</param> /// <returns>�û�ʵ�����</returns> public static XYECOM.Model.GeneralUserInfo GetUserInfo(XYECOM.Model.UserRegInfo userRegInfo) { XYECOM.Configuration.WebInfo webInfo = XYECOM.Configuration.WebInfo.Instance; if (userRegInfo == null) return null; XYECOM.Model.GeneralUserInfo _templateuserinfo = new XYECOM.Model.GeneralUserInfo(); _templateuserinfo.CompanyId = userRegInfo.CompanyId; _templateuserinfo.IsPrimary = userRegInfo.IsPrimary; //��������(��ʦ����) LayerName varchar(50) 50 FALSE FALSE FALSE _templateuserinfo.LayerName = userRegInfo.LayerName; //�������� Description text FALSE FALSE FALSE _templateuserinfo.Description = userRegInfo.Description; //�绰 Telphone varchar(50) 50 FALSE FALSE FALSE _templateuserinfo.Telphone = userRegInfo.Telphone; //������ϵ��ʽ OtherContact varchar(200) 200 FALSE FALSE FALSE _templateuserinfo.OtherContact = userRegInfo.OtherContact; //�Ա�0 �� 1Ů Sex bit FALSE FALSE FALSE _templateuserinfo.Sex = userRegInfo.Sex; //���֤ IdNumber varchar(50) 50 FALSE FALSE FALSE _templateuserinfo.IdNumber = userRegInfo.IdNumber; //��ʦ֤ LayerId varchar(50) 50 FALSE FALSE FALSE _templateuserinfo.LayerId = userRegInfo.LayerId; //������� AreaId int FALSE FALSE FALSE _templateuserinfo.AreaId = userRegInfo.AreaId; //�Ƿ�����֤ר�� IsExport bit FALSE FALSE FALSE _templateuserinfo.IsExport = userRegInfo.IsPrimary; //��ҵ���ͣ���ҵ&����&��ʦ&����ʦ���� UserType int FALSE FALSE FALSE _templateuserinfo.UserType = (Model.UserType)userRegInfo.UserType; //ɾ��״̬ DelState int FALSE FALSE FALSE _templateuserinfo.DelState = userRegInfo.DelState; //Ψһ��ʾ IdentityNumber varchar(50) 50 FALSE FALSE FALSE _templateuserinfo.IdentityNumber = userRegInfo.IdentityNumber; _templateuserinfo.PartManagerName = userRegInfo.PartManagerName; _templateuserinfo.PartManagerTel = userRegInfo.PartManagerTel; _templateuserinfo.accountid = userRegInfo.AccountId; _templateuserinfo.creditintegral = userRegInfo.CreditIntegral; _templateuserinfo.creditleavl = new CreditLeavlManager().GetItemByPoint(userRegInfo.CreditIntegral); _templateuserinfo.userid = userRegInfo.UserId; _templateuserinfo.LoginName = userRegInfo.LoginName; _templateuserinfo.regdate = userRegInfo.RegDate; if (userRegInfo.IsActivation) _templateuserinfo.activation = true; else _templateuserinfo.activation = false; _templateuserinfo.isaudited = userRegInfo.AuditingState == XYECOM.Model.AuditingState.Passed ? true : false; _templateuserinfo.Email = userRegInfo.Email; if (userRegInfo.IsHasImage) _templateuserinfo.LayerPicture = Business.Attachment.GetInfoDefaultImgHref(XYECOM.Model.AttachmentItem.User, _templateuserinfo.userid); else _templateuserinfo.LayerPicture = SYS_NOIMAGE_PATH; XYECOM.Model.UserInfo _UserInfo = new XYECOM.Business.UserInfo().GetItem(userRegInfo.CompanyId); if (_UserInfo != null) { //�ֻ���״̬ IsBoundMobile bit FALSE FALSE FALSE _templateuserinfo.IsBoundMobile = _UserInfo.IsBoundMobile; //�����״̬ IsBoundEmail bit FALSE FALSE FALSE _templateuserinfo.IsBoundEmail = _UserInfo.IsBoundEmail; //���ۻ��� Point int FALSE FALSE FALSE _templateuserinfo.Point = _UserInfo.Point; //�Ƿ�ʵ����֤ IsReal bit FALSE FALSE FALSE _templateuserinfo.IsReal = _UserInfo.IsReal; //������ GoodTimes int FALSE FALSE FALSE _templateuserinfo.GoodTimes = _UserInfo.GoodTimes; //������ MidTimes int FALSE FALSE FALSE _templateuserinfo.MidTimes = _UserInfo.MidTimes; //������ BadTimes int FALSE FALSE FALSE _templateuserinfo.BadTimes = _UserInfo.BadTimes; _templateuserinfo.template = userRegInfo.TemplateName; if (_templateuserinfo.template.IndexOf("|") != -1) _templateuserinfo.template = _templateuserinfo.template.Split('|')[1]; _templateuserinfo.cred = userRegInfo.Cred; _templateuserinfo.infoperfectpercent = userRegInfo.InFormation; _templateuserinfo.maliceerr = userRegInfo.MaliceErr; _templateuserinfo.commonerr = userRegInfo.CommonErr; _templateuserinfo.LinkMan = _UserInfo.LinkMan.ToString(); _templateuserinfo.CompanyName = _UserInfo.Name.ToString(); _templateuserinfo.Fax = _UserInfo.Fax; _templateuserinfo.homepage = _UserInfo.HomePage; _templateuserinfo.character = _UserInfo.Character; _templateuserinfo.unittypeid = (int)_UserInfo.UserTypeId; _templateuserinfo.tradeids = _UserInfo.TradeIds; _templateuserinfo.employeetotal = _UserInfo.EmployeeTotal; _templateuserinfo.regareaid = _UserInfo.RegAreaId; if (_UserInfo.AreaId > 0) { Model.AreaInfo areainfo = new Business.Area().GetItem(_UserInfo.AreaId); if (null != areainfo) _templateuserinfo.AreaName = areainfo.FullNameAll; } _templateuserinfo.Address = _UserInfo.Address; _templateuserinfo.mode = _UserInfo.Mode; _templateuserinfo.regyear = _UserInfo.RegYear.ToString(); _templateuserinfo.supplypro = _UserInfo.MainProduct; _templateuserinfo.buypro = _UserInfo.BuyPro; _templateuserinfo.registeredcapital = _UserInfo.RegisteredCapital.ToString(); _templateuserinfo.post = _UserInfo.Post; _templateuserinfo.department = _UserInfo.Section; _templateuserinfo.zipcode = _UserInfo.Postcode; _templateuserinfo.supplyorbuy = _UserInfo.SupplyOrBuy; _templateuserinfo.im = _UserInfo.IM; } return _templateuserinfo; }