system.web.ui.page.user是属性,但此处被当作类型来使用
DataTabletbScratchCard=newDataTable();DataColumncolSerialNumber=newDataColumn();colSe...
DataTable tbScratchCard = new DataTable();
DataColumn colSerialNumber = new DataColumn();
colSerialNumber.DataType = System.Type.GetType("System.Int32");
colSerialNumber.ColumnName = "serialNumber";
DataColumn colType = new DataColumn();
colType.DataType = System.Type.GetType("System.String");
colType.ColumnName = "type";
DataColumn colModifiedTime = new DataColumn();
colModifiedTime.DataType = System.Type.GetType("System.DateTime");
colModifiedTime.ColumnName = "modifiedTime";
DataColumn colModifiedName = new DataColumn();
colModifiedName.DataType = System.Type.GetType("System.String");
colModifiedName.ColumnName = "modifiedName";
DataColumn[] cols = { colSerialNumber, colType, colModifiedTime, colModifiedName };
tbScratchCard.Columns.AddRange(cols);
tbScratchCard.Rows.Add(tbScratchCard.NewRow());
tbScratchCard.Rows[0]["serialNumber"] = tbScratchCard.Rows.Count - 1;
tbScratchCard.Rows[0]["modifiedTime"] = DateTime.Now;
tbScratchCard.Rows[0]["modifiedName"] = ((User)Session["user"]).AccountName;
ViewState["tbCategory"] = tbScratchCard;
gvFrontendTypeSetting.DataSource = tbScratchCard;
gvFrontendTypeSetting.DataBind(); 展开
DataColumn colSerialNumber = new DataColumn();
colSerialNumber.DataType = System.Type.GetType("System.Int32");
colSerialNumber.ColumnName = "serialNumber";
DataColumn colType = new DataColumn();
colType.DataType = System.Type.GetType("System.String");
colType.ColumnName = "type";
DataColumn colModifiedTime = new DataColumn();
colModifiedTime.DataType = System.Type.GetType("System.DateTime");
colModifiedTime.ColumnName = "modifiedTime";
DataColumn colModifiedName = new DataColumn();
colModifiedName.DataType = System.Type.GetType("System.String");
colModifiedName.ColumnName = "modifiedName";
DataColumn[] cols = { colSerialNumber, colType, colModifiedTime, colModifiedName };
tbScratchCard.Columns.AddRange(cols);
tbScratchCard.Rows.Add(tbScratchCard.NewRow());
tbScratchCard.Rows[0]["serialNumber"] = tbScratchCard.Rows.Count - 1;
tbScratchCard.Rows[0]["modifiedTime"] = DateTime.Now;
tbScratchCard.Rows[0]["modifiedName"] = ((User)Session["user"]).AccountName;
ViewState["tbCategory"] = tbScratchCard;
gvFrontendTypeSetting.DataSource = tbScratchCard;
gvFrontendTypeSetting.DataBind(); 展开
- 你的回答被采纳后将获得:
- 系统奖励15(财富值+成长值)+难题奖励30(财富值+成长值)
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询