/// <summary> /// 福利列表 /// </summary> /// <param name="context"></param> /// <param name="msg"></param> /// <param name="P1"></param> /// <param name="P2"></param> /// <param name="UserInfo"></param> public void GETFLLIST(JObject context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo) { string userName = UserInfo.User.UserName; string strWhere = " 1=1 and ComId=" + UserInfo.User.ComId; int page = 0; int pagecount = 8; int.TryParse(context.Request("p") ?? "0", out page); int.TryParse(context.Request("pagecount") ?? "8", out pagecount);//页数 page = page == 0 ? 1 : page; int total = 0; DataTable dt = new DataTable(); dt = new SZHL_GZGL_FLB().GetDataPager("SZHL_GZGL_FL", " * ", pagecount, page, " CRDate ", strWhere, ref total); if (dt.Rows.Count > 0) { dt.Columns.Add("FileList", Type.GetType("System.Object")); foreach (DataRow dr in dt.Rows) { if (dr["Files"] != null && dr["Files"].ToString() != "") { dr["FileList"] = new FT_FileB().GetEntities(" ID in (" + dr["Files"].ToString() + ")"); } } } msg.Result = dt; msg.Result1 = total; }
/// <summary> /// 获取福利信息 /// </summary> /// <param name="context"></param> /// <param name="msg"></param> /// <param name="P1"></param> /// <param name="P2"></param> /// <param name="UserInfo"></param> public void GETFLMODEL(JObject context, Msg_Result msg, string P1, string P2, JH_Auth_UserB.UserInfo UserInfo) { int Id = int.Parse(P1); SZHL_GZGL_FL ccxj = new SZHL_GZGL_FLB().GetEntity(d => d.ID == Id); msg.Result = ccxj; if (ccxj != null) { if (!string.IsNullOrEmpty(ccxj.Files)) { msg.Result2 = new FT_FileB().GetEntities(" ID in (" + ccxj.Files + ")"); } //new JH_Auth_User_CenterB().ReadMsg(UserInfo, ccxj.ID, "CCXJ"); } }