예제 #1
0
        private void Bindlist()
        {
            Query q = new Query();

            q.OrderBy("StartTime desc");
            int rec = 0;

            rplist.DataSource = bp.GetProjectsList(q, AspNetPager1.CurrentPageIndex, AspNetPager1.PageSize, out rec);
            rplist.DataBind();
            AspNetPager1.RecordCount = rec;
        }
예제 #2
0
        void BindDropDownList()
        {
            //绑定 专家,项目,联盟成员,团队成员
            Query          qe    = Query.Build(new { SortFields = "ExpertID" });
            Query          qp    = Query.Build(new { SortFields = "ProjectID" });
            Query          qm    = Query.Build(new { SortFields = "MemberID" });
            IList <Expert> elist = be.GetExpertsList(qe);

            dpExpert.Items.Clear();
            dpExpert.Items.Add(new ListItem("==请选择==", ""));
            if (elist.Count > 0)
            {
                foreach (Expert e in elist)
                {
                    dpExpert.Items.Add(new ListItem(e.EName, e.ExpertID.ToString()));
                }
            }
            IList <Project> plist = bp.GetProjectsList(qp);

            dpProject.Items.Clear();
            dpProject.Items.Add(new ListItem("==请选择==", ""));
            if (plist.Count > 0)
            {
                foreach (Project p in plist)
                {
                    dpProject.Items.Add(new ListItem(p.ProjectName, p.ProjectID.ToString()));
                }
            }
            IList <Member> lmlist = bm.GetMembersList(qm).Where(t => t.MemberType == MemberType.联盟成员.ToString()).ToList();

            dpLm.Items.Clear();
            dpLm.Items.Add(new ListItem("==请选择==", ""));
            if (lmlist.Count > 0)
            {
                foreach (Member m in lmlist)
                {
                    dpLm.Items.Add(new ListItem(m.MemberName, m.MemberID.ToString()));
                }
            }
            IList <Member> tdlist = bm.GetMembersList(qm).Where(t => t.MemberType == MemberType.团队成员.ToString()).ToList();

            dpTd.Items.Clear();
            dpTd.Items.Add(new ListItem("==请选择==", ""));
            if (tdlist.Count > 0)
            {
                foreach (Member m in tdlist)
                {
                    dpTd.Items.Add(new ListItem(m.MemberName, m.MemberID.ToString()));
                }
            }
        }
예제 #3
0
        void BindDropDownList()
        {
            // 绑定语言和类型
            dpArticleType.Items.Clear();
            dpArticleType.Items.Add(new ListItem("==请选择==", ""));

            Query q = Query.Build(new { SortFields = "SortNo" });

            q.Append("CodeName='ArticleType' or CodeName='Language'");
            IList <SysCode> sclisttype = bsc.GetSysCodeList(q).Where(t => t.CodeName == "ArticleType").ToList();
            IList <SysCode> sclistlan  = bsc.GetSysCodeList(q).Where(t => t.CodeName == "Language").ToList();

            if (sclisttype.Count > 0)
            {
                foreach (SysCode sc in sclisttype)
                {
                    dpArticleType.Items.Add(new ListItem(sc.CodeText, sc.CodeValue));
                }
            }
            dpLanguage.Items.Clear();
            dpLanguage.Items.Add(new ListItem("==请选择==", ""));
            if (sclistlan.Count > 0)
            {
                foreach (SysCode sc in sclistlan)
                {
                    dpLanguage.Items.Add(new ListItem(sc.CodeText, sc.CodeValue));
                }
            }
            //绑定 专家,项目,联盟成员,团队成员,普通学生
            Query          qe    = Query.Build(new { SortFields = "ExpertID" });
            Query          qp    = Query.Build(new { SortFields = "ProjectID" });
            Query          qm    = Query.Build(new { SortFields = "MemberID" });
            IList <Expert> elist = be.GetExpertsList(qe);

            dpExpert.Items.Clear();
            dpExpert.Items.Add(new ListItem("==请选择==", ""));
            if (elist.Count > 0)
            {
                foreach (Expert e in elist)
                {
                    dpExpert.Items.Add(new ListItem(e.EName, e.ExpertID.ToString()));
                }
            }
            IList <Project> plist = bp.GetProjectsList(qp);

            dpProject.Items.Clear();
            dpProject.Items.Add(new ListItem("==请选择==", ""));
            if (plist.Count > 0)
            {
                foreach (Project p in plist)
                {
                    dpProject.Items.Add(new ListItem(p.ProjectName, p.ProjectID.ToString()));
                }
            }
            IList <Member> lmlist = bm.GetMembersList(qm).Where(t => t.MemberType == MemberType.联盟成员.ToString()).ToList();

            dpLm.Items.Clear();
            dpLm.Items.Add(new ListItem("==请选择==", ""));
            if (lmlist.Count > 0)
            {
                foreach (Member m in lmlist)
                {
                    dpLm.Items.Add(new ListItem(m.MemberName, m.MemberID.ToString()));
                }
            }
            IList <Member> tdlist = bm.GetMembersList(qm).Where(t => t.MemberType == MemberType.团队成员.ToString()).ToList();

            dpTd.Items.Clear();
            dpTd.Items.Add(new ListItem("==请选择==", ""));
            if (tdlist.Count > 0)
            {
                foreach (Member m in tdlist)
                {
                    dpTd.Items.Add(new ListItem(m.MemberName, m.MemberID.ToString()));
                }
            }
            //新添加的博士啊,硕士啊
            IList <Member> stulist = bm.GetMembersList(qm).Where(t => t.MemberType == MemberType.普通学生.ToString()).ToList();

            dpstu.Items.Clear();
            dpstu.Items.Add(new ListItem("==请选择==", ""));
            if (stulist.Count > 0)
            {
                foreach (Member m in stulist)
                {
                    dpstu.Items.Add(new ListItem(m.MemberName, m.MemberID.ToString()));
                }
            }
        }
예제 #4
0
        private void BindingList()
        {
            Query qm = Query.Build(new { SortFields = "StartTime Desc" });


            //6个dpdownlist

            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 (dpProjectPeriod.SelectedValue != "")
            {
                qm.Add("p.ProjectPeriod", dpProjectPeriod.SelectedValue);
            }

            string Name = PubCom.CheckString(txtName.Text.Trim());

            if (Name != "")
            {
                qm.Add("p.ProjectName", Name);
            }
            string OrgName = PubCom.CheckString(txtOrgName.Text.Trim());

            if (OrgName != "")
            {
                qm.Add("p.OrgName", OrgName);
            }
            string starttime = PubCom.CheckString(StarTime.Text.Trim());

            if (starttime != "")
            {
                qm.Gt("p.StartTime", DateTime.Parse(starttime));
            }
            string endtime = PubCom.CheckString(EndTime.Text.Trim());

            if (endtime != "")
            {
                qm.Lt("p.EndTime", DateTime.Parse(endtime));
            }


            int ret = 0;

            rplist.DataSource = bp.GetProjectsList(qm, AspNetPager1.CurrentPageIndex, AspNetPager1.PageSize, out ret);
            rplist.DataBind();
            AspNetPager1.RecordCount = ret;

            // 插入日志  query
            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);
        }