예제 #1
0
 public static string GetStatRes_Doc(int PageIndex, int PageSize)
 {
     try
     {
         string          strWhere = string.Empty;
         BLL_StatRes_Doc bll      = new BLL_StatRes_Doc();
         strWhere  = "and SDocType<>'f22bd0fd-73b6-4c73-9df0-8b3cb8489816' and SSaleCount>0 ";
         PageIndex = Convert.ToInt32(PageIndex.ToString().Filter());
         GH_PagerInfo <List <Model_StatRes_Doc> > pageInfo = bll.GetAllList(strWhere, "SYear desc,SDocType,SSaleCount desc", PageIndex, PageSize);
         List <Model_StatRes_Doc> list       = pageInfo.PageData;
         List <object>            listReturn = new List <object>();
         int inum = 1;
         foreach (var item in list)
         {
             listReturn.Add(new
             {
                 Num              = inum + PageSize * (PageIndex - 1),
                 SYear            = item.SYear,
                 SDocType         = item.SDocType,
                 SDocTypeName     = item.SDocTypeName,
                 SProductionCount = item.SProductionCount,
                 SDownloadCount   = item.SDownloadCount,
                 SSaleCount       = item.SSaleCount,
                 textbookversion  = "<a href='javascript:void(0);'onclick=\"Show('StatRes_Sell_Attr.aspx?SAttrType=textbookversion&SYear=" + item.SYear + "&SDocType=" + item.SDocType + "')\">查看</a>",
                 subject          = "<a href='javascript:void(0);'onclick=\"Show('StatRes_Sell_Attr.aspx?SAttrType=subject&SYear=" + item.SYear + "&SDocType=" + item.SDocType + "')\">查看</a>",
                 gradeterm        = "<a href='javascript:void(0);'onclick=\"Show('StatRes_Sell_Attr.aspx?SAttrType=gradeterm&SYear=" + item.SYear + "&SDocType=" + item.SDocType + "')\">查看</a>",
                 area             = "<a href='javascript:void(0);'onclick=\"Show('StatRes_Sell_Attr.aspx?SAttrType=area&SYear=" + item.SYear + "&SDocType=" + item.SDocType + "')\">查看</a>"
             });
             inum++;
         }
         if (inum > 1)
         {
             return(JsonConvert.SerializeObject(new
             {
                 err = "null",
                 PageIndex = pageInfo.CurrentPage,
                 PageSize = pageInfo.PageSize,
                 TotalCount = pageInfo.RecordCount,
                 list = listReturn
             }));
         }
         else
         {
             return(JsonConvert.SerializeObject(new
             {
                 err = "暂无数据"
             }));
         }
     }
     catch (Exception ex)
     {
         return(JsonConvert.SerializeObject(new
         {
             err = ex.Message.ToString()
         }));
     }
 }
예제 #2
0
 public static string GetStatRes_Doc_Attr(string SAttrType, string SDocType, string SYear, int PageIndex, int PageSize)
 {
     try
     {
         string strWhere          = string.Empty;
         BLL_StatRes_Doc_Attr bll = new BLL_StatRes_Doc_Attr();
         strWhere  = "and SProductionCount>0 and SAttrType='" + SAttrType + "' and SDocType='" + SDocType + "' and SYear=" + SYear;
         PageIndex = Convert.ToInt32(PageIndex.ToString().Filter());
         GH_PagerInfo <List <Model_StatRes_Doc_Attr> > pageInfo = bll.GetAllList(strWhere, "SYear desc,SDocType,SProductionCount desc", PageIndex, PageSize);
         List <Model_StatRes_Doc_Attr> list = pageInfo.PageData;
         List <object> listReturn           = new List <object>();
         int           inum = 1;
         foreach (var item in list)
         {
             listReturn.Add(new
             {
                 Num              = inum + PageSize * (PageIndex - 1),
                 SYear            = item.SYear,
                 SDocTypeName     = item.SDocTypeName,
                 SData_Name       = item.SData_Name,
                 SProductionCount = item.SProductionCount,
                 SDownloadCount   = item.SDownloadCount,
                 SSaleCount       = item.SSaleCount
             });
             inum++;
         }
         if (inum > 1)
         {
             return(JsonConvert.SerializeObject(new
             {
                 err = "null",
                 PageIndex = pageInfo.CurrentPage,
                 PageSize = pageInfo.PageSize,
                 TotalCount = pageInfo.RecordCount,
                 list = listReturn
             }));
         }
         else
         {
             return(JsonConvert.SerializeObject(new
             {
                 err = "暂无数据"
             }));
         }
     }
     catch (Exception ex)
     {
         return(JsonConvert.SerializeObject(new
         {
             err = ex.Message.ToString()
         }));
     }
 }
예제 #3
0
 public static string GetDataList(int PageIndex, int PageSize)
 {
     try
     {
         string             strWhere = string.Empty;
         BLL_FileSyncRecord bll      = new BLL_FileSyncRecord();
         strWhere  = " and SyncType='" + FileSyncType.SyncOperate.ToString() + "' ";
         PageIndex = Convert.ToInt32(PageIndex.ToString().Filter());
         GH_PagerInfo <List <Model_FileSyncRecord> > pageInfo = bll.SearhExeccuteDataAnalysis(strWhere, "SyncTime desc", PageIndex, PageSize);
         List <Model_FileSyncRecord> list = pageInfo.PageData;
         List <object> listReturn         = new List <object>();
         int           inum = 1;
         foreach (var item in list)
         {
             listReturn.Add(new
             {
                 Num          = inum + PageSize * (PageIndex - 1),
                 SyncTime     = pfunction.ConvertToLongDateTime(item.SyncTime.ToString()),
                 SyncLong     = item.SyncLong.ToString(),
                 SyncUserName = item.SyncUserName,
                 SysType      = item.SyncType
             });
             inum++;
         }
         if (inum > 1)
         {
             return(JsonConvert.SerializeObject(new
             {
                 err = "null",
                 PageIndex = pageInfo.CurrentPage,
                 PageSize = pageInfo.PageSize,
                 TotalCount = pageInfo.RecordCount,
                 list = listReturn
             }));
         }
         else
         {
             return(JsonConvert.SerializeObject(new
             {
                 err = "暂无数据"
             }));
         }
     }
     catch (Exception ex)
     {
         return(JsonConvert.SerializeObject(new
         {
             err = ex.Message.ToString()
         }));
     }
 }
예제 #4
0
 public static string GetmyBaby(int PageIndex, int PageSize)
 {
     try
     {
         string strWhere = string.Empty;
         BLL_StudentToParent             bll        = new BLL_StudentToParent();
         Rc.Model.Resources.Model_F_User FloginUser = Rc.Common.StrUtility.clsUtility.IsFPageFlag() as Rc.Model.Resources.Model_F_User;
         strWhere  = "and Parent_ID='" + FloginUser.UserId + "'";
         PageIndex = Convert.ToInt32(PageIndex.ToString().Filter());
         GH_PagerInfo <List <Model_StudentToParent> > pageInfo = bll.GetAllList(strWhere, "", PageIndex, PageSize);
         List <Model_StudentToParent> list = pageInfo.PageData;
         List <object> listReturn          = new List <object>();
         int           inum = 1;
         foreach (var item in list)
         {
             listReturn.Add(new
             {
                 Num       = inum + PageSize * (PageIndex - 1),
                 BabyName  = item.UserName,
                 struserid = item.Student_ID,
                 Email     = string.IsNullOrEmpty(item.Email) ? "" : item.Email
             });
             inum++;
         }
         if (inum > 1)
         {
             return(JsonConvert.SerializeObject(new
             {
                 err = "null",
                 PageIndex = pageInfo.CurrentPage,
                 PageSize = pageInfo.PageSize,
                 TotalCount = pageInfo.RecordCount,
                 list = listReturn
             }));
         }
         else
         {
             return(JsonConvert.SerializeObject(new
             {
                 err = "暂无数据"
             }));
         }
     }
     catch (Exception ex)
     {
         return(JsonConvert.SerializeObject(new
         {
             err = ex.Message.ToString()
         }));
     }
 }