private void BindAttach() { Query q = new Query(); q.OrderBy("ArticleID"); q.Append("p.ProjectID=" + Utils.StrToInt(id, 0)); Query q2 = new Query(); q2.OrderBy("TreatiseID"); q2.Append("p.ProjectID=" + Utils.StrToInt(id, 0)); IList <Article> list1 = ba.GetArticlesList(q); if (list1 != null && list1.Count > 0) { rplist1.DataSource = list1.Take(5); rplist1.DataBind(); } else { v1.Visible = false; } IList <Treatise> list2 = bt.GetTreatisesList(q2); if (list2 != null && list2.Count > 0) { rplist2.DataSource = list2.Take(5); rplist2.DataBind(); } else { v2.Visible = false; } }
private void BindList() { Query q = new Query(); q.OrderBy("ArticleID desc"); q.Append("a.ExpertID=" + Utils.StrToInt(hfEID.Value, 0)); int ret = 0; rplist.DataSource = ba.GetArticlesList(q, AspNetPager1.CurrentPageIndex, AspNetPager1.PageSize, out ret); rplist.DataBind(); AspNetPager1.RecordCount = ret; }
private void BindDetail() { //BindBasicMessage Member m = bm.GetMembersByID(id); ltorg.Text = m.Organization; ltphone.Text = m.Phone; ltemail.Text = m.Email; ltname.Text = m.MemberName; ltqua.Text = m.Qualification; lttype.Text = m.MemberType; hftypeint.Value = ((int)Enum.Parse(typeof(MemberType), m.MemberType)).ToString(); htmlimg.Attributes["src"] = PicFilePathV + m.MemberPic; //Article Query qa = new Query(); qa.OrderBy("Views desc"); if (m.MemberType == MemberType.联盟成员.ToString()) { qa.Append("a.LmMemberID=" + id); } else if (m.MemberType == MemberType.团队成员.ToString()) { qa.Append("a.TdMemberID=" + id); } int rec = 0; rplist.DataSource = ba.GetArticlesList(qa, 1, 10, out rec); rplist.DataBind(); //Treatise Query qt = new Query(); qt.OrderBy("FinishTime desc"); if (m.MemberType == MemberType.联盟成员.ToString()) { qa.Append("t.LmMemberID=" + id); } else if (m.MemberType == MemberType.团队成员.ToString()) { qa.Append("t.TdMemberID=" + id); } int ret = 0; rplist2.DataSource = bt.GetTreatisesList(qt, 1, 10, out ret); rplist2.DataBind(); }
private void BindDetail() { Query q = new Query(); q.OrderBy("SubmitTime desc"); int rec = 0; if (id != 0) { // 表明id 类型 type 1 = project ,2=expert,3=lmmember,4=tdmember,5代表国内,6代表国外 switch (type) { case 1: q.Append("p.ProjectID=" + id); break; case 2: q.Append("e.ExpertID=" + id); break; case 3: q.Append("m.MemberID=" + id); break; case 4: q.Append("m2.MemberID=" + id); break; case 5: q.Append("a.IsInternal=" + 1); break; case 6: q.Append("a.IsInternal=" + 0); break; } } rplist.DataSource = ba.GetArticlesList(q, AspNetPager1.CurrentPageIndex, AspNetPager1.PageSize, out rec); rplist.DataBind(); AspNetPager1.RecordCount = rec; }
private void BindingList() { Query qm = Query.Build(new { SortFields = "SubmitTime Desc" }); //6个dpdownlist if (dpLanguage.SelectedValue != "") { qm.Add("a.LanguageType", dpLanguage.SelectedValue); } if (dpArticleType.SelectedValue != "") { qm.Add("a.ArticleType", dpArticleType.SelectedValue); } if (dpExpert.SelectedValue != "") { qm.Add("e.ExpertID", dpExpert.SelectedValue); } if (dpLm.SelectedValue != "") { qm.Add("m.LmMemberID", dpLm.SelectedValue); } if (dpTd.SelectedValue != "") { qm.Add("m.TdMemberID", dpTd.SelectedValue); } if (dpProject.SelectedValue != "") { qm.Add("p.ProjectID", dpProject.SelectedValue); } string Title = PubCom.CheckString(txtTitle.Text.Trim()); if (Title != "") { qm.Add("a.ArticleTitle", Title); } string keyword = PubCom.CheckString(txtKeyword.Text.Trim()); if (keyword != "") { qm.Add("a.Keyword", keyword); } string Subtime = PubCom.CheckString(StarTime.Text.Trim()); if (Subtime != "") { qm.Add("a.SubmitTime", DateTime.Parse(Subtime)); } string publication = PubCom.CheckString(txtPublication.Text.Trim()); if (publication != "") { qm.Add("a.Publication", publication); } int ret = 0; rplist.DataSource = ba.GetArticlesList(qm, AspNetPager1.CurrentPageIndex, AspNetPager1.PageSize, out ret); rplist.DataBind(); AspNetPager1.RecordCount = ret; SysOperateLog log = new SysOperateLog(); log.LogID = StringHelper.getKey(); log.LogType = LogType.文章信息.ToString(); log.OperateUser = GetLogUserName(); log.OperateDate = DateTime.Now; log.LogOperateType = "文章查询"; log.LogAfterObject = JsonHelper.Obj2Json <string>(qm.GetCondition(true)); bsol.Insert(log); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BindStu(); //绑定校内专家 Query q = new Query(); q.OrderBy("Istop desc,Sort"); q.Append("EIdentification='" + ExpertType.校内专家 + "'"); int rec = 0; IList <Expert> elist = be.GetExpertsList(q, 1, 4, out rec); ltexpertname1.Text = elist[0].EName; ltcountry1.Text = elist[0].ECountry; ltsummary1.Text = Utils.CutString(elist[0].ESummary, 20); if (elist[0].EPicPath != null) { img1.Attributes["src"] = PicFilePathV + elist[0].EPicPath; } Query qatta1 = new Query(); qatta1.OrderBy("Views desc, Downloads desc"); qatta1.Append("e.ExpertID=" + elist[0].ExpertID); int recatta1; rplist1.DataSource = ba.GetArticlesList(qatta1, 1, 6, out recatta1); rplist1.DataBind(); ltexpertname2.Text = elist[1].EName; ltcountry2.Text = elist[1].ECountry; ltsummary2.Text = Utils.CutString(elist[1].ESummary, 20); if (elist[1].EPicPath != null) { img2.Attributes["src"] = PicFilePathV + elist[1].EPicPath; } Query qatta2 = new Query(); qatta2.OrderBy("Views desc, Downloads desc"); qatta2.Append("e.ExpertID=" + elist[1].ExpertID); int recatta2; rplist2.DataSource = ba.GetArticlesList(qatta2, 1, 6, out recatta2); rplist2.DataBind(); ltexpertname3.Text = elist[2].EName; ltcountry3.Text = elist[2].ECountry; ltsummary3.Text = Utils.CutString(elist[2].ESummary, 20); if (elist[2].EPicPath != null) { img3.Attributes["src"] = PicFilePathV + elist[2].EPicPath; } Query qatta3 = new Query(); qatta3.OrderBy("Views desc, Downloads desc"); qatta3.Append("e.ExpertID=" + elist[2].ExpertID); int recatta3; rplist3.DataSource = ba.GetArticlesList(qatta3, 1, 6, out recatta3); rplist3.DataBind(); ltexpertname4.Text = elist[3].EName; ltcountry4.Text = elist[3].ECountry; ltsummary4.Text = Utils.CutString(elist[3].ESummary, 20); if (elist[3].EPicPath != null) { img4.Attributes["src"] = PicFilePathV + elist[3].EPicPath; } Query qatta4 = new Query(); qatta4.OrderBy("Views desc, Downloads desc"); qatta4.Append("e.ExpertID=" + elist[3].ExpertID); int recatta4; rplist4.DataSource = ba.GetArticlesList(qatta4, 1, 6, out recatta4); rplist4.DataBind(); } }