📄 surveyitemsform.ascx.cs
字号:
namespace Caisis.UI.Modules.All.DataEntryForms
{
using System;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Collections;
using System.Collections.Specialized;
using Caisis.Controller;
using Caisis.DataAccess;
using Caisis.BusinessObject;
using Caisis.UI.Core.Classes;
public abstract class SurveyItemsForm : MultiRowGridControl
{
override protected void SetDataEntryInfo()
{
this._tableInfo = "SurveyItems";
this._dataEntryTitle = "<a href=\"DataEntryContainer.aspx?dataForm=SurveysForm&primKey="+Request.QueryString["parentKey"]+"\"> Survey</a> > Survey Items";
}
public void ItemBound(Object sender, DataGridItemEventArgs e)
{
if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
DataRowView drv = (DataRowView) e.Item.DataItem;
HtmlInputText surveyId = (HtmlInputText) e.Item.FindControl(SurveyItem.SurveyId);
HtmlSelect surveyitem = (HtmlSelect) e.Item.FindControl("SurveyItemFld");
HtmlInputText surveyitemresult = (HtmlInputText) e.Item.FindControl(SurveyItem.SurveyItemResult);
HtmlInputText surveyitemtotal = (HtmlInputText) e.Item.FindControl(SurveyItem.SurveyItemTotal);
HtmlInputText surveyitemnotes = (HtmlInputText) e.Item.FindControl(SurveyItem.SurveyItemNotes);
string surveyType = ((SurveysForm)Parent).SurveyType.Value;
//survey item look up codes depend on the type selected on survey's page. passed in as url variable
if(surveyType != null && !surveyType.Equals(""))
{
surveyType = surveyType.Replace(" ", "");
PageUtil.FillLkpDropDown(surveyitem, "SurveyItem_" + surveyType + "");
}
else
{
//should create default set of lookups
PageUtil.FillLkpDropDown(surveyitem, "SurveyItem");
}
PageUtil.SelectDropDownItem(surveyitem, drv[SurveyItem.SurveyItemFld].ToString());
//
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -