コード例 #1
0
        /// <summary>
        /// 获取记事本
        /// </summary>
        /// <param name="context"></param>
        /// <param name="msg"></param>
        /// <param name="P1">类型</param>
        /// <param name="P2">查询条件</param>
        /// <param name="strUserName"></param>
        public void GETNOTELIST(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            int DataID = -1;

            int.TryParse(context.Request["ID"] ?? "-1", out DataID);//页码


            int page = 0;

            int.TryParse(context.Request["p"] ?? "1", out page);//页码
            page = page == 0 ? 1 : page;
            int    recordCount = 0;
            string strWhere    = string.Format(" note.ComId={0} And note.CRUser='******'", UserInfo.User.ComId, UserInfo.User.UserName);

            if (P1 != "")//分类
            {
                strWhere += string.Format("And  note.LeiBie={0}", P1);
            }
            if (P2 != "")//内容查询
            {
                strWhere += string.Format(" And note.NoteContent like '%{0}%'", P2);
            }
            if (DataID != -1)
            {
                strWhere += string.Format(" And note.ID = '{0}'", DataID);
            }
            DataTable dt = new SZHL_NOTEB().GetDataPager(" SZHL_NOTE note inner join JH_Auth_ZiDian zd on LeiBie= zd.ID and Class=8  ", " note.ID,note.NoteTitle,note.NoteContent,note.LeiBie,note.CRDate,note.CRUser,note.UPUser,note.UPDDate,zd.TypeName ", 8, page, "note.CRDate desc", strWhere, ref recordCount);

            msg.Result  = dt;
            msg.Result1 = Math.Ceiling(recordCount * 1.0 / 8);
        }
コード例 #2
0
        public void GETNOTEMODEL(HttpContext context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo)
        {
            int Id = 0;

            int.TryParse(P1, out Id);
            SZHL_NOTE sg = new SZHL_NOTEB().GetEntity(d => d.ID == Id && d.ComId == UserInfo.User.ComId);

            msg.Result = sg;
        }