private void showTbType() { TBTypeService tbService = new TBTypeService(); ArrayList list = tbService.GetTBTypeList(); Repeater_TBType.DataSource = list; Repeater_TBType.DataBind(); }
private void showTypeData() { TBTypeService tbService = new TBTypeService(); ArrayList list = tbService.GetTBTypeList(); DropDownList1.DataSource = list; DropDownList1.DataTextField = "TypeIntro"; DropDownList1.DataValueField = "Id"; DropDownList1.DataBind(); }
private void fillInfoType() { TBTypeService tbService = new TBTypeService(); ArrayList list = tbService.GetTBTypeList(); TBType temp = new TBType(); temp.Id = 0; temp.TypeIntro = "全部信息"; list.Insert(0, temp); DropDownList_Type.DataSource = list; DropDownList_Type.DataTextField = "TypeIntro"; DropDownList_Type.DataValueField = "Id"; DropDownList_Type.DataBind(); }
public void showData(int typeId) { TBInfoService infoSeervice = new TBInfoService(); TBInfo info = infoSeervice.GetTheNewInfoByPayFor(1, typeId); TBTypeService typeService = new TBTypeService(); string typeName = typeService.GetTBTypeById(typeId); Label_PayName.Text = typeName; Labe_Title1.Text = info.InfoTitle; Label_Date1.Text = string.Format("{0:yyyy-MM-dd HH:mm:ss}", Convert.ToDateTime(info.InfoDate)); string content1 = info.InfoContent; if (content1 == null) { content1 = "内容为空"; } if (content1.Length > 20) { content1 = content1.Substring(0, 20); } Label_Content1.Text = content1; Label_Linkman1.Text = info.InfoLinkMan; string phone1 = info.InfoPhone; if (phone1 == null) { phone1 = "0000000000"; } Label_Phone1.Text = phone1.Substring(0, 7) + "****"; Label_Email1.Text = info.InfoEmail; }