ºÏ²¢model²¢ÇÒ³ÊÏÖ£¨asp.net MVC£©
public ActionResult LoadRegionPerformance(TGProject.Models.WModels.TgsOutachiveCondition condition)
{
Account account = (Account)Session["Account"];
var questions = SP.TgsAreaShow(int.Parse(account.AREAID.ToString()));
List<TGProject.Models.WModels.TGSOUTACHIVEAREA> models=new List<TGProject.Models.WModels.TGSOUTACHIVEAREA>();
TGSAREASHOW a;
IEnumerator ie = (System.Collections.IEnumerator)questions.GetEnumerator();
while (ie.MoveNext()) {
a = (TGSAREASHOW)ie.Current;
condition.AREAID = a.AREAID;
List<TGProject.Models.WModels.TGSOUTACHIVEAREA> middlemodels = TGProject.Helpers.SP.TGSOutAchiveArea(condition);
foreach (TGProject.Models.WModels.TGSOUTACHIVEAREA middlemodel in middlemodels)
models.Add(middlemodel);
}
return GetRegionPerformanceModelData(condition, models);
}
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult GetRegionPerformanceModelData(TGProject.Models.WModels.TgsOutachiveCondition condition, List<TGProject.Models.WModels.TGSOUTACHIVEAREA> models)
{
int pageIndex = Convert.ToInt32(condition.Page) - 1;
int pageSize = condition.Rows;
int totalRecords = models.Count;
int totalPages = (int)Math.Ceiling((float)totalRecords / (float)pageSize);
AddField(models, totalPages, condition.Page, totalRecords);
ViewData["RegionPerformance"] = models.Skip(pageIndex * pageSize).Take(pageSize).ToList();
return View();
}
public static void AddField(List<TGProject.Models.WModels.TGSOUTACHIVEAREA> models, int totalPages, int page, int records)
{
foreach (TGProject.Models.WModels.TGSOUTACHIVEAREA model in models)
{
PropertyI
Ïà¹ØÎĵµ£º
¿ª·¢»·¾³:WIN XP VS2005
Êý¾Ý¿â:SQL server 2000
´Ë´¦²»¿¼ÂÇ°²È«ÎÊÌâ.
¾ßÌåÈçÏÂ:
Ê×ÏȽ¨Á¢Ò»¸öÊý¾Ý¿âºÍÒ»¸ö±í½á¹¹²¢ÔÚ±íÖÐÊäÈëһЩÊý¾ÝÒÔ±ã²âÊÔ:´Ë²½ÂÔ¹ý
´ò¿ªVS2005н¨Ò»¸öÍøÕ¾²¢Ìí¼ÓÒ»¸öHTMLÒ³
ÔÚĬÈϵÄDefault.aspxÖзÅÈëGridview¿Ø¼þÓÃÓÚÏÔʾÊý¾Ý
.cs´úÂë
using System;
using System.Data;
usi ......
ÎÒÃÇÔÚAsp.Net¿ª·¢¹ý³ÌÖУ¬ÓÐʱºòΪÁË¿ª·¢µÄÐèÒª£¬»ò´ïµ½Ò»¶¨µÄЧ¹û£¬ÎÒÃÇ»á²ÅÈ¡¶¯Ì¬¼ÓÔØÓû§¿Ø¼þµÄ·½·¨À´ÊµÏÖ£¬¶¯Ì¬¼ÓÔØÓû§¿Ø¼þ£¬¿ÉÒÔÔÚͬһ¸öÒ³ÃæÀïÃ棬¸ù¾Ý²»Í¬µÄÇé¿öÏÔʾ²»Í¬µÄÄÚÈÝ£¬Ê¹ÎÒÃÇÔÚ¿ª·¢Ê¡Ê±Ê¡Á¦¡£
¡¡ÄÇôÎÒÃÇÔõôʵÏÖ¶¯Ì¬¼ÓÔØÓû§¿Ø¼þÄØ£¬ÆäʱºÜ¼òµ¥£¬ÎÒÃÇÖ»ÒªÔÚÒ³ÃæÀïÒª·Å¿ØµÄ¼þµÄµØ·½·ÅÒ»¸öռλ¿Ø¼þ &l ......
Ëü»¹»áÔÚÖ¸¶¨µÄÊý¾Ý¿âÖÐÔö¼Ó¼¸¸ö´æ´¢¹ý³Ì£¬ÓÃÀ´ÈÃASP.NETÒýÇæ²éѯ׷×ÙµÄÊý¾Ý±íµÄÇé¿ö¡£
È»ºó£¬Ëü»á¸øÎÒÃÇҪ׷×ÙµÄTable¼ÓÉϼ¸¸öTrigger£¬·Ö±ð¶ÔÓ¦µ½Insert¡¢Update¡¢Delete²Ù×÷£¬Õ⼸¸öTriggerµÄÓï¾ä·Ç³£¼òµ¥£¬¾ÍÊÇ°Ñ“AspNet_SqlCacheTablesF ......
½«ViewState³Ö¾Ã»¯±£³ÖÔÚ·þÎñÆ÷¶ËÎļþµÄ´úÂ룬ÕâÑùViewState²»Õ¼ÓÃÍøÂç´ø¿í£¬Òò´ËÆä´æÈ¡Ö»ÊÇ·þÎñÆ÷µÄ´ÅÅ̶Áȡʱ¼ä¡£²¢ÇÒËüºÜС£¬¿ÉÒÔ˵ÊÇ´ÅÅÌËæ±ãתһȦ¾ÍÄÜͬʱ¶ÁÈ¡ºÃ¶àViewState£¬Òò´Ë¿ÉÒÔ˵“²»Õ¼Ê±¼ä”¡£ÎªÁËÔÙ“²»Õ¼´ÅÅÌʱ¼ä”£¬ÎÒ»¹Ê¹ÓÃÁË»º´æ¡£
´´½¨Ò»¸ö»ùÀà:
public class
BasePage : Sys ......
ÔÎĵØÖ·:http://blog.csdn.net/ChengKing/archive/2009/01/01/3678774.aspx
ÊôÐÔµÄÉè¼ÆʱÌØÐÔ
.NET Framework
Ϊ
¿Ø¼þÉè¼ÆʱÊôÐÔÌṩÁ˺ܶà·á¸»µÄÀ࣬ÕâЩÊôÐԵŦÄܷdz£Áé»î£¬¿ØÖÆ·¶Î§¹ã·º£¬±ÈÈç¿ÉÒÔ¿ØÖƸÃÊôÐÔÔÚÊôÐÔ´°¿ÚÖеÄÏÔʾģʽ£¬È磺ÊÇ·ñÔÚÊôÐÔ´°¿ÚÖÐÏÔʾ¸ÃÊô
ÐÔ£¬Ò²¿ÉÒÔÖ¸¶¨´ËÊôÐÔ±ØÐë½ÓÊÕÖµÀàÐÍÃèÊö£¬°´×é· ......