本文整理汇总了C#中RepeaterItemEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# RepeaterItemEventArgs类的具体用法?C# RepeaterItemEventArgs怎么用?C# RepeaterItemEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RepeaterItemEventArgs类属于命名空间,在下文中一共展示了RepeaterItemEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: RptPageType_DataBound
protected void RptPageType_DataBound(object source, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
Repeater RptPageList = (Repeater)e.Item.FindControl("RptPageList");
DataRowView rowv = (DataRowView)e.Item.DataItem;//找到分类Repeater关联的数据项
string _strManagerID = LCmn.Func.GetManageID();
if (string.IsNullOrEmpty(_strManagerID)) return;
string _strRoleID = Cmn.DB.getFieldValue("select roleID from adm_manager where managerID='" + _strManagerID + "';");
if (_strRoleID.Equals("1"))
{
_strSql = "select ManagePageDesc,ManagePageUrl,ManagePageType from adm_managePage where ManagePageType=" + rowv[0] + " order by SortID desc";
}
else
{
_strSql = @"select ManagePageDesc,ManagePageUrl,ManagePageType from adm_managePage mp
inner join adm_authority a on mp.ManagePageID=a.ManagePageID
where roleId='" + _strRoleID + " and ManagePageType=" + rowv[0] + " ' " + @"
order by SortID desc";
}
RptPageList.DataSource = Cmn.DB.getDataTable(_strSql);
RptPageList.DataBind();
}
}
开发者ID:rose5202,项目名称:hot,代码行数:27,代码来源:admin_menu.ascx.cs
示例2: m_repMapRepeater_ItemDataBound
void m_repMapRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
TadImage oImageInfo = e.Item.DataItem as TadImage;
LinkButton oLink = e.Item.FindControl("m_lbName") as LinkButton;
oLink.Text = oImageInfo.Title;
oLink.PostBackUrl = "ViewMap.aspx?ImageId=" + oImageInfo.Id;
Label oLabel = e.Item.FindControl("m_lblDescription") as Label;
oLabel.Text = oImageInfo.Description;
Image oImage = e.Item.FindControl("m_imgImage") as Image;
oImage.Width = 80;
oImage.Height = 80;
PostBackOptions options = new PostBackOptions(oLink, "", "ViewMap.aspx?ImageId=" + oImageInfo.Id, true, false, false, true, false, "");
HtmlControl oDiv = e.Item.FindControl("ListItem") as HtmlControl;
oDiv.Attributes.Add("onClick", ClientScript.GetPostBackEventReference(options));
oDiv.Attributes.Add("onMouseOver", "this.style.background = '#FFFFCC';");
oDiv.Attributes.Add("onMouseOut", "this.style.background = '#FFFFFF';");
ThreeSharpWrapper s3 = new ThreeSharpWrapper(S3Storage.AccessKey, S3Storage.SecretAccessKey);
oImage.ImageUrl = s3.GetUrl(S3Storage.BucketName, "Square_" + oImageInfo.StorageKey);
//oImage.ImageUrl = "http://" + S3Storage.BucketName + ".s3.amazonaws.com/Square_" + oImageInfo.StorageKey;
}
开发者ID:trevorpower,项目名称:tadmap,代码行数:26,代码来源:MyImages.aspx.cs
示例3: rptTeams_ItemDataBound
protected void rptTeams_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
DropDownList drpStanding = (DropDownList)e.Item.FindControl("drpStanding");
int year = cf.getMaxYear();
SortedList teams = new SortedList();
int cnt = 0;
if (Session["user"] != null)
{
user u = (user)Session["user"];
teams = u.get_teams();
rptTeams.DataSource = null;
}
if (teams == null)
{
teams = cf.getTeams(year);
}
cnt = teams.Count;
for (int i = 0; i < cnt; i++)
{
int s = i + 1;
drpStanding.Items.Add(new ListItem(s.ToString(), s.ToString()));
}
try
{
drpStanding.SelectedIndex = e.Item.ItemIndex;
}
catch (Exception ex)
{
cf.logError(ex);
}
}
开发者ID:denpone,项目名称:ffl,代码行数:31,代码来源:final_standings.aspx.cs
示例4: rptrNewsInHome_ItemDataBound
protected void rptrNewsInHome_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
{
Label lblIDNews = e.Item.FindControl("lblIDNews") as Label;
HyperLink lnkTitle = e.Item.FindControl("lnkTitle") as HyperLink;
HyperLink lnkImage = e.Item.FindControl("lnkImage") as HyperLink;
Image imgMinhhoa = e.Item.FindControl("imgMinhhoa") as Image;
Label lblDesc = e.Item.FindControl("lblDesc") as Label;
HyperLink lnkChitiet = e.Item.FindControl("lnkChitiet") as HyperLink;
if (lnkTitle != null && imgMinhhoa != null && lnkChitiet != null && lnkImage != null && lblDesc != null)
{
NewsEntity newsEntity = new NewsEntity();
newsEntity = NewsBRL.GetOne(Convert.ToInt32(lblIDNews.Text));
lnkTitle.NavigateUrl = "~/Content.aspx?sID=" + newsEntity.iNewsID;
lnkChitiet.NavigateUrl = "~/Content.aspx?sID=" + newsEntity.iNewsID;
lnkTitle.Text = INVI.INVILibrary.INVIString.GetCuttedString(newsEntity.sTitle, 70);
if (File.Exists(Server.MapPath(ConfigurationManager.AppSettings["UploadPath"] + newsEntity.sImage)))
imgMinhhoa.ImageUrl = ConfigurationManager.AppSettings["UploadPath"] + newsEntity.sImage;
else
{
Panel pnAnh = e.Item.FindControl("pnAnh") as Panel;
pnAnh.Visible = false;
}
lblDesc.Text = INVI.INVILibrary.INVIString.GetCuttedString(newsEntity.sDesc, 150);
}
}
}
}
开发者ID:vantrung87hvt,项目名称:vietgap-thuysan,代码行数:31,代码来源:ucListServices.ascx.cs
示例5: BindQuestionText
protected void BindQuestionText(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
bool isSubQuestion = Convert.ToBoolean(((Label)e.Item.FindControl("lblIsSubQuestion")).Text);
Label questionLabel = (Label)e.Item.FindControl("lblQuestionText");
string unformattedQuestionText = questionLabel.Text;
string formattedQuestionText = null;
if (isSubQuestion)
{
formattedQuestionText = unformattedQuestionText;
}
else
{
formattedQuestionText = "<b>" + (questionNumber + 1).ToString() + ". " + unformattedQuestionText + "</b>";
questionNumber++;
}
questionLabel.Text = formattedQuestionText;
}
}
开发者ID:nehawadhwa,项目名称:ccweb,代码行数:25,代码来源:ReportsSurveyResponsesSummary.aspx.cs
示例6: repDeptList_ItemDataBound
protected void repDeptList_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
random++;
Model.T_Department dept = (Model.T_Department)e.Item.DataItem;
Literal liDeptID = e.Item.FindControl("liDeptID") as Literal;
liDeptID.Text = dept.Id.ToString();
Literal liDeptName = e.Item.FindControl("liDeptName") as Literal;
liDeptName.Text = dept.DeptName;
RadioButtonList rblist = e.Item.FindControl("rblist") as RadioButtonList;
List<int> vdList = new List<int>();
//生成随机列
for (int i = 0; i <= 3; i++)
{
Random rad = new Random(random);
int v1 = rad.Next(0, 4);
while (vdList.Where(v => v == v1).Count() > 0)
{
v1 = rad.Next(0, 4);
};
vdList.Add(v1);
ListItem li = liList[v1];
li.Attributes.Add("onclick", "clickRB(this)");
rblist.Items.Add(liList[v1]);
}
}
开发者ID:scrammed,项目名称:Evaluation,代码行数:29,代码来源:BehalfVote.aspx.cs
示例7: Repeater1_ItemDataBound
protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
int id = int.Parse(((Label)e.Item.FindControl("lb_ID")).Text);
QNA_QuestionBLL q = new QNA_QuestionBLL(id);
RadioButtonList rbl_Result = (RadioButtonList)e.Item.FindControl("rbl_Result");
CheckBoxList cbl_Result = (CheckBoxList)e.Item.FindControl("cbl_Result");
TextBox tbx_Result = (TextBox)e.Item.FindControl("tbx_Result");
if (q.Model != null)
{
switch (q.Model.OptionMode)
{
case 1: //单选
rbl_Result.DataSource = q.Items;
rbl_Result.DataBind();
rbl_Result.Visible = true;
break;
case 2: //多选
cbl_Result.DataSource = q.Items;
cbl_Result.DataBind();
cbl_Result.Visible = true;
break;
case 3: //输入文本
tbx_Result.Visible = true;
break;
}
}
}
}
开发者ID:fuhongliang,项目名称:GraduateProject,代码行数:32,代码来源:QNA_DisplayResult.aspx.cs
示例8: RptExport_ItemDataBound
protected void RptExport_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if ((e.Item.ItemType != ListItemType.Header) && (e.Item.ItemType != ListItemType.Footer))
{
Label lblName = (Label)e.Item.FindControl("lblName");
Label lblPrice = (Label)e.Item.FindControl("lblPrice");
//Label lblQuantity = (Label)e.Item.FindControl("lblQuantity");
//Label lblProductTotal = (Label)e.Item.FindControl("lblProductTotal");
int nQuantity = 1;
int nProductID = ConvertData.ConvertToInt(DataBinder.Eval(e.Item.DataItem, "ProductID2"));
Products objProduct = new Products();
objProduct.LoadById(nProductID);
string sNameProduct = ConvertData.ConvertToString(objProduct.Data.ProductName);
int nPrice = ConvertData.ConvertToInt(objProduct.Data.Price);
lblName.Text = sNameProduct;
lblPrice.Text = ConvertData.ConvertToString(Support.FormatCurrency(nPrice)) + " " + "vn₫";
//lblQuantity.Text = ConvertData.ConvertToString(nQuantity);
int nTotal = nPrice * nQuantity;
//lblProductTotal.Text = ConvertData.ConvertToString(Support.FormatCurrency(nTotal)) + " " + "vn₫";
int nTotalOrder = nTotal;
fSubTotal += ConvertData.ConvertToDouble(nTotal);
}
lblTotal.Text = ConvertData.ConvertToString(Support.FormatCurrency(fSubTotal)) + " " + "vn₫";
}
开发者ID:changtraicantinh,项目名称:atpgroup,代码行数:32,代码来源:OrderAdd.ascx.cs
示例9: SetAuthor
protected void SetAuthor(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
string strAuthorText;
DataRowView TempRow = (DataRowView)e.Item.DataItem;
if (TempRow["PortfolioID"].ToString().Length > 0)
strAuthorText = TempRow["FirstName"].ToString();
else
{
strAuthorText = TempRow["PartnerNickname"].ToString();
// Make whistle image visible
if (((CareerCruisingWeb.PageBase.SuperBase)Page).ConSysInfo["CareerCoaches"].ToString() == "True")
{
((System.Web.UI.WebControls.Image)e.Item.FindControl("CoachImage")).Visible = true;
}
else { ((System.Web.UI.WebControls.Image)e.Item.FindControl("CoachImage")).Visible = false; }
}
((Label)e.Item.FindControl("AuthorLabel")).Text = strAuthorText;
// Also set Deactivate link visibility
if (_ShowDeactivateLink)
((System.Web.UI.HtmlControls.HtmlTableCell)e.Item.FindControl("DeactivateCell")).Visible = true;
else
((System.Web.UI.HtmlControls.HtmlTableCell)e.Item.FindControl("DeactivateCell")).Visible = false;
}
}
开发者ID:nehawadhwa,项目名称:ccweb,代码行数:29,代码来源:MessageBoardViewThread.ascx.cs
示例10: CartsContainer_ItemDataBound
protected void CartsContainer_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
HiddenField hiddenField = e.Item.FindControl("hiddenReceiptId") as HiddenField;
Helper.ExecScript(@"
jsHiddenReceiptId[" + e.Item.ItemIndex + "] = '" + string.Format("#{0}", hiddenField.ClientID) + @"';
");
}
开发者ID:SaintLoong,项目名称:micro-emall,代码行数:7,代码来源:shopping-cart.aspx.cs
示例11: rptNewsList_ItemDataBound
protected void rptNewsList_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if ((e.Item.ItemType != ListItemType.Header) && (e.Item.ItemType != ListItemType.Footer))
{
HyperLink lnkimgList = (HyperLink)e.Item.FindControl("lnkimgList");
Image imgNewsList = (Image)e.Item.FindControl("imgNewsList");
HyperLink lnkNewName = (HyperLink)e.Item.FindControl("lnkNewName");
Label lblInitContent = (Label)e.Item.FindControl("lblInitContent");
int nID = ConvertData.ConvertToInt(DataBinder.Eval(e.Item.DataItem, "NewsID"));
string sTitle = ConvertData.ConvertToString(DataBinder.Eval(e.Item.DataItem, "Title"));
string sURL = Constants.ROOT + Pages.FrontEnds.NEWS + "?" + Constants.NEWS_ID + "=" + nID;
string sInitContent = ConvertData.ConvertToString(DataBinder.Eval(e.Item.DataItem, "InitContent"));
string strImages = ConvertData.ConvertToString(DataBinder.Eval(e.Item.DataItem, "Image"));
lnkNewName.Text = sTitle;
lnkNewName.NavigateUrl = sURL;
lnkNewName.ToolTip = sTitle;
lnkimgList.NavigateUrl = sURL;
lblInitContent.Text = sInitContent;
imgNewsList.ToolTip = sTitle;
if (strImages.Length > 0)
{
imgNewsList.ImageUrl = Constants.ROOT + Constants.IMAGE_NEWS_DEFAULT_UPLOAD + strImages;
}
else
{
imgNewsList.ImageUrl = Constants.ROOT + Constants.IMAGE_NO_IMAGE_FRONTEND_280;
}
}
}
开发者ID:changtraicantinh,项目名称:atpgroup,代码行数:31,代码来源:NewsList.ascx.cs
示例12: CustomTableRep_ItemDataBound
protected void CustomTableRep_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
DataTable dt = new DataTable();
dt = BCustomFormField.GetTitleList(CustomFormId);
if (e.Item.ItemType == ListItemType.Header)
{
//列举出所有的字段当头部
StringBuilder sb = new StringBuilder();
for (int i = 0; i < dt.Rows.Count; i++)
{
sb.Append("<td>"+dt.Rows[i]["Alias"].ToString()+"</td>");
}
(e.Item.FindControl("lit_head") as Literal).Text = sb.ToString();
}
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType==ListItemType.AlternatingItem)
{
//行ID
int Id = int.Parse((e.Item.FindControl("CustomFormFieldId") as Label).Text);
drInfo = BInfoOper.GetInfo(MCustomForm.TableName, Id);
StringBuilder sb = new StringBuilder();
for (int i = 0; i < dt.Rows.Count; i++)
{
sb.Append("<td>" + Function.Encode(drInfo["" + dt.Rows[i]["Name"].ToString() + ""].ToString()) + "</td>");
}
(e.Item.FindControl("lit_item") as Literal).Text = sb.ToString();
}
}
开发者ID:suizhikuo,项目名称:KYCMS,代码行数:30,代码来源:CustomFormInfoList.aspx.cs
示例13: Appointments_ItemDataBound
protected void Appointments_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
currentAppointment = (Appointment)e.Item.DataItem;
if (currentAppointment == null)
return;
ImageButton btnDel = (ImageButton)e.Item.FindControl("ButtonDelete");
btnDel.CommandArgument = currentAppointment.Id.ToString();
btnDel.Attributes["OwnerId"] = LoginState.IsAdmin() ? "admin" : currentAppointment.UserId;
Repeater inner = (Repeater)e.Item.FindControl("Posts");
List<Post> posts = new List<Post>();
foreach (Post p in currentAppointment.AppointmentPosts)
posts.Add(p);
posts.Sort((a, b) => a.PostingDate.CompareTo(b.PostingDate));
inner.DataSource = posts;
inner.ItemDataBound += new RepeaterItemEventHandler(inner_ItemDataBound);
inner.DataBind();
TextBox txt = (TextBox)e.Item.FindControl("Name");
Button btn = (Button)e.Item.FindControl("ButtonSend");
btn.CommandArgument = currentAppointment.Id.ToString();
btn.OnClientClick = string.Format("onSendPost('{0}');", txt.ClientID);
HtmlImage img = (HtmlImage)e.Item.FindControl("Meteo");
int idx = currentAppointment.AppointmentDate.DayOfYear - DateTime.Now.DayOfYear;
if (idx < 0 || idx > 6)
img.Visible = false;
else
img.Src = string.Format("http://www.ilmeteo.it/cartine2/{0}.LIG.png", idx);
}
开发者ID:Maasik,项目名称:mtbscout,代码行数:29,代码来源:Appointments.aspx.cs
示例14: RepeaterItemDataBound
/// <summary>
/// 为RepeaterItem绑定数据
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void RepeaterItemDataBound(object sender, RepeaterItemEventArgs e)
{
//用户控件的使用
UserControl_TaListItem1 assignmentItem1 = (UserControl_TaListItem1)e.Item.FindControl("TaListItem10");
//用户控件
UserControl_TaListItem2 assignmentItem2 = (UserControl_TaListItem2)e.Item.FindControl("TaListItem20");
//new一个AssignmentInfo对象
AssignmentInfo a = new AssignmentInfo();
//初始化
a.DtAssignDate = Convert.ToDateTime(DataBinder.Eval(e.Item.DataItem, "assignDate"));
a.DtDeadline = Convert.ToDateTime(DataBinder.Eval(e.Item.DataItem, "deadline"));
a.IAssignmentId = Convert.ToInt32(DataBinder.Eval(e.Item.DataItem, "ID"));
a.StrContents = Convert.ToString(DataBinder.Eval(e.Item.DataItem, "contents"));
a.StrTitle = Convert.ToString(DataBinder.Eval(e.Item.DataItem, "title"));
//判断作业是否为空
if (assignmentItem1!=null)
{
assignmentItem1.A = a;
assignmentItem1.Index = index++;
}
else
{
assignmentItem2.A = a;
assignmentItem2.Index = index++;
}
}
开发者ID:dalinhuang,项目名称:my-project-step,代码行数:31,代码来源:TAssignmentList.aspx.cs
示例15: rptTgRecord_ItemDataBound
protected void rptTgRecord_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
{
DJ_GroupConsumRecord record = e.Item.DataItem as DJ_GroupConsumRecord;
Literal laIsChecked = e.Item.FindControl("laIsChecked") as Literal;
if (record.Id.Equals(Guid.Empty))
{
laIsChecked.Text = "未验证";
}
else
laIsChecked.Text = "已验证";
}
if (e.Item.ItemType == ListItemType.Footer)
{
Literal laGuiderCount = e.Item.FindControl("laGuiderCount") as Literal;
Literal laAdultCount = e.Item.FindControl("laAdultCount") as Literal;
Literal laChildrenCount = e.Item.FindControl("laChildrenCount") as Literal;
int groupcount, adultcount, childrencount;
bllrecord.GetCountInfoByETid(Master.Scenic.Id, out groupcount, out adultcount, out childrencount, ListRecord);
laGuiderCount.Text = groupcount.ToString();
laAdultCount.Text = adultcount.ToString();
laChildrenCount.Text = childrencount.ToString();
}
}
开发者ID:phiree,项目名称:testttt,代码行数:25,代码来源:GroupTestatistics.aspx.cs
示例16: trackedEventsRepeater_ItemDataBound
//===============================================================
// Function: trackedEventsRepeater_ItemDataBound
//===============================================================
protected void trackedEventsRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.DataItem != null &&
(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem))
{
DataRowView row = e.Item.DataItem as DataRowView;
int eventID = int.Parse(row["EventID"].ToString());
SedogoEvent sedogoEvent = new SedogoEvent(Session["loggedInUserFullName"].ToString(), eventID);
HyperLink eventNameLabel = e.Item.FindControl("eventNameLabel") as HyperLink;
eventNameLabel.NavigateUrl = "viewEvent.aspx?EID=" + row["EventID"].ToString();
eventNameLabel.Text = row["EventName"].ToString();
HyperLink userNameLabel = e.Item.FindControl("userNameLabel") as HyperLink;
userNameLabel.Text = row["FirstName"].ToString() + " " + row["LastName"].ToString();
userNameLabel.NavigateUrl = "userTimeline.aspx?UID=" + sedogoEvent.userID.ToString();
Image eventImage = e.Item.FindControl("eventImage") as Image;
string eventPicThumbnail = row["EventPicThumbnail"].ToString();
if (eventPicThumbnail == "")
{
eventImage.ImageUrl = "~/images/eventThumbnailBlank.png";
}
else
{
var _event = new SedogoEvent(string.Empty, eventID);
eventImage.ImageUrl = ImageHelper.GetRelativeImagePath(_event.eventID, _event.eventGUID, ImageType.EventThumbnail);
}
}
}
开发者ID:sedogo,项目名称:site,代码行数:34,代码来源:tracking.aspx.cs
示例17: Repeater1_ItemDataBound
public void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
//if (e.Item.ItemType != ListItemType.Item && e.Item.ItemType != ListItemType.AlternatingItem)
// return;
DataRowView row = (DataRowView)e.Item.DataItem;
RadioButtonList rbl = new RadioButtonList();
rbl.RepeatDirection = RepeatDirection.Vertical;
//string[] ans1;
//ans1 =Convert.ToString( row["ans"]);
string[] ans1 = row["ans"].ToString().Split('|');
//string[] ans1 = row["ans"].ToString();
//for (int n = 0; n < Choices.Length; n++)
//{
// rbl.Items.Add(new ListItem(Choices[n], n.ToString()));
//}
for (int n = 0; n < ans1.Length; n++)
{
rbl.Items.Add(new ListItem(ans1[n], n.ToString()));
}
if (row["ans"] != DBNull.Value)
rbl.SelectedIndex = (int)row["ans"];
//if (row["Answer"] != DBNull.Value)
// rbl.SelectedIndex = (int)row["Answer"];
((Label)e.Item.FindControl("ChoicesLabel")).Controls.Add(rbl);
}
开发者ID:karimkhanp,项目名称:Online_Education_Examinations,代码行数:28,代码来源:gre_test.aspx.cs
示例18: RptFAQ_ItemDataBound
protected void RptFAQ_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if ((e.Item.ItemType != ListItemType.Header) && (e.Item.ItemType != ListItemType.Footer))
{
Label lblQuestion = (Label)e.Item.FindControl("lblQuestion");
LinkButton lnkEdit = (LinkButton)e.Item.FindControl("lnkEdit");
LinkButton lnkDelete = (LinkButton)e.Item.FindControl("lnkDelete");
int nID = ConvertData.ConvertToInt(DataBinder.Eval(e.Item.DataItem, "FAQID"));
int nCategoryID = ConvertData.ConvertToInt(DataBinder.Eval(e.Item.DataItem, "FAQCategoryId"));
int nStatus = ConvertData.ConvertToInt(DataBinder.Eval(e.Item.DataItem, "Status"));
string sItemTitle = ConvertData.ConvertToString(DataBinder.Eval(e.Item.DataItem, "Question"));
if (sItemTitle == "")
sItemTitle = ConvertData.ConvertToString(DataBinder.Eval(e.Item.DataItem, "Question_default"));
if (sItemTitle.Length > 80)
sItemTitle = ConvertData.TruncateString(sItemTitle, 80) + Constants.DOT;
lblQuestion.Text = sItemTitle;
lnkDelete.CommandArgument = ConvertData.ConvertToString(DataBinder.Eval(e.Item.DataItem, "FAQID"));
lnkDelete.OnClientClick = Support.CreateConfirmBoxClient(MessagesAlert.DELETE_ALERT);
lnkEdit.CommandArgument = ConvertData.ConvertToString(DataBinder.Eval(e.Item.DataItem, "FAQID"));
}
}
开发者ID:changtraicantinh,项目名称:atpgroup,代码行数:25,代码来源:FAQMan.ascx.cs
示例19: RepBigType_ItemDataBound
protected void RepBigType_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
Repeater RepChild = (Repeater)e.Item.FindControl("RepSmallType");
DataRowView rowv = (DataRowView)e.Item.DataItem;
int id = 1;
if (int.TryParse(rowv["id"].ToString(), out id))
{
string sql = string.Format("select * from ProductType where isshow = 1 and tid = {0} order by sort,id", id);
DataTable Info = DB_Help.ExecuteSql(sql);
if (ShareInfoFactory.CheckTableIsNullOrEmpty(Info))
{
Info.Columns.Add("typeid", typeof(int));
for (int i = 0; i < 4; i++)
{
for (int j = 0; j < Info.Rows.Count; j++)
{
if (id == int.Parse(Info.Rows[j]["tid"].ToString()))
{
Info.Rows[j]["typeid"] = id.ToString();
}
}
}
}
ShareInfoFactory.ViewInfoToRepeater(Info, RepChild);
}
}
}
开发者ID:whchv,项目名称:whchn,代码行数:29,代码来源:brand.aspx.cs
示例20: rptETMonthDetail_ItemDataBound
protected void rptETMonthDetail_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
{
DJ_GroupConsumRecord record = e.Item.DataItem as DJ_GroupConsumRecord;
Literal laCountInfo = e.Item.FindControl("laCountInfo") as Literal;
if (blldjent.GetDJS8id(entid.ToString())[0].Type == EnterpriseType.景点)
{
totalmonth_audlt += record.AdultsAmount;
totalmonth_child += record.ChildrenAmount;
totalyear_child += record.ChildrenAmount;
totalyear_adult += record.AdultsAmount;
laCountInfo.Text = "成人" + record.AdultsAmount.ToString() + " " + "儿童" + record.ChildrenAmount.ToString();
}
if (blldjent.GetDJS8id(entid.ToString())[0].Type == EnterpriseType.宾馆)
{
totalmonth_audlt += record.AdultsAmount * record.LiveDay;
totalmonth_child += record.ChildrenAmount * record.LiveDay;
totalyear_adult += record.AdultsAmount * record.LiveDay;
totalyear_child += record.ChildrenAmount * record.LiveDay;
laCountInfo.Text = "成人" + (record.AdultsAmount * record.LiveDay).ToString() + " " + "儿童" + (record.ChildrenAmount * record.LiveDay).ToString();
}
Literal laMonthTotal = e.Item.Parent.Parent.FindControl("laMonthTotal") as Literal;
laMonthTotal.Text = "成人" + totalmonth_audlt.ToString() + " " + "儿童" + totalmonth_child.ToString();
}
}
开发者ID:phiree,项目名称:testttt,代码行数:26,代码来源:TEDetailStatistics.aspx.cs
注:本文中的RepeaterItemEventArgs类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论