protected void btnReset_Click(object sender, EventArgs e) { try { //--reset fields txtKeyword.Text = ""; txtDateFrom.Text = ""; txtDateTo.Text = ""; txtYear.Text = ""; txtMonth.Text = ""; //lbDomain.ClearSelection(); //lbSubDomain.Items.Clear(); //--Get collections RepeaterItemCollection rpCategoriesCollection = rpCategories.Items; for (int i = 0; i < rpCategoriesCollection.Count; i++) { RepeaterItem rpCategoryItem = rpCategoriesCollection[i]; ListBox lbCategory = (ListBox)rpCategoryItem.FindControl("lbCategory"); lbCategory.ClearSelection(); } } catch (RaveHRException ex) { LogErrorMessage(ex); } catch (Exception ex) { RaveHRException objEx = new RaveHRException(ex.Message, ex, Sources.PresentationLayer, PAGE_NAME, "btnReset_Click", EventIDConstants.RAVE_HR_PROJECTS_PRESENTATION_LAYER); LogErrorMessage(objEx); } }
protected void lbcount_TextChanged(object sender, EventArgs e) { Regex num = new Regex(@"^[1-9]\d*$"); TextBox txt = (TextBox)sender; if (num.IsMatch(txt.Text)) { RepeaterItemCollection items = repbuygood.Items; Label dj = null; Label sum = null; foreach (var item in items) { RepeaterItem a = (RepeaterItem)item; if (txt == (TextBox)a.FindControl("lbcount")) { dj = (Label)a.FindControl("price"); sum = (Label)a.FindControl("lbsum"); } } sum.Text = (Convert.ToDouble(dj.Text) * Convert.ToInt32(txt.Text)).ToString(); } else { Response.Redirect("<script>alert('请输入正确的数量')</script>"); } }
protected void btnSave_Click(object sender, EventArgs e) { CheckBox chkSelected; Literal lblRealID; SATagMapEntity SATagMap; using (SATagMapDataAccess DataAccess = new SATagMapDataAccess()) { DataAccess.DeleteSATagMap(SAID); RepeaterItemCollection Items = TagRepeater.Items; foreach (RepeaterItem Item in Items) { lblRealID = (Literal)Item.FindControl("lblRealID"); chkSelected = (CheckBox)Item.FindControl("chkSelected"); if (chkSelected.Checked) { SATagMap = new SATagMapEntity { SAID = SAID, RealID = lblRealID.Text }; DataAccess.SaveSATagMap(SATagMap); } } } ScriptManager.RegisterClientScriptBlock(this, GetType(), "Msg", "alert('数据保存成功!')", true); }
protected void btnSave_Click(object sender, EventArgs e) { RepeaterItemCollection Items = ItemGroupRepeater.Items; CheckBox chkSelected; Literal lblGroupID; List <String> Groups = new List <string>(); Groups.AddRange(hGroups.Value.Split(',')); foreach (RepeaterItem Item in Items) { chkSelected = (CheckBox)Item.FindControl("chkSelected"); lblGroupID = (Literal)Item.FindControl("lblGroupID"); if (chkSelected.Checked) { Groups.Add(lblGroupID.Text); } if (!chkSelected.Checked) { Groups.Remove(lblGroupID.Text); } } hGroups.Value = String.Join(",", Groups.ToArray()); // hGroups.Value = hGroups.Value.Substring(1, hGroups.Value.Length - 1); //wsw 修改 if (hGroups.Value.Length > 0 && hGroups.Value.Substring(0, 1) == ",") { hGroups.Value = hGroups.Value.Substring(1, hGroups.Value.Length - 1); } ShowMessage("您选择的体检组合项保存成功!"); }
private void DelBatch() { if (profile == null) { profile = new CustomProfileCommon(); } bool isNoCheck = true; RepeaterItemCollection rows = rpData.Items; //当前部门分配给用户 foreach (RepeaterItem item in rows) { //找到CheckBox HtmlInputCheckBox cb = item.FindControl("cbItem") as HtmlInputCheckBox; if (cb != null && cb.Checked) { if (isNoCheck) { isNoCheck = false; } profile.ShoppingCart.Remove(cb.Value); } } if (isNoCheck) { WebHelper.MessageBox.Messager(this.Page, Page.Controls[0], "请至少选中一行进行操作!", "操作错误", "error"); return; } profile.Save(); Bind(); }
protected void btnSave_Click(object sender, EventArgs e) { PackageBusiness Package = new PackageBusiness(); RepeaterItemCollection Items = ItemGroupRepeater.Items; CheckBox chkSelected; Literal lblGroupID; PackageGroupEntity PackageGroup; foreach (RepeaterItem Item in Items) { chkSelected = (CheckBox)Item.FindControl("chkSelected"); lblGroupID = (Literal)Item.FindControl("lblGroupID"); PackageGroup = new PackageGroupEntity(); PackageGroup.ID = new PackageGroupPK { PackageID = PackageID, GroupID = Convert.ToInt32(lblGroupID.Text) }; if (chkSelected.Checked) { Package.SavePackageGroup(PackageGroup); } if (!chkSelected.Checked) { Package.DeletePackageGroup(PackageGroup); } } decimal PackageCharge = Package.GetPackagePrice(PackageID); hValue.Value = PackageCharge + ""; Package.UpdatePackagePrice(PackageID, PackageCharge); ShowMessage("套餐组合项保存成功!"); }
/// <summary> /// 去结算事件 /// </summary> private void OnTopay() { //当前部门分配给用户 RepeaterItemCollection ric = rpData.Items; if (ric.Count > 0) { bool hasQtyChange = false; if (profile == null) { profile = new CustomProfileCommon(); } ICollection <Model.CartItemInfo> list = profile.ShoppingCart.CartItems; foreach (RepeaterItem item in ric) { HtmlInputCheckBox cb = item.FindControl("cbItem") as HtmlInputCheckBox; HtmlInputText txtQuantity = item.FindControl("txtQuantity") as HtmlInputText; if (cb != null) { string productId = cb.Value; if (cb.Checked) { if (txtQuantity != null) { int quantity = 1; int.TryParse(txtQuantity.Value.Trim(), out quantity); if (quantity < 1) { quantity = 1; } if (quantity > 1) { foreach (Model.CartItemInfo model in list) { if (model.ProductId == productId) { profile.ShoppingCart.SetQuantity(productId, quantity); hasQtyChange = true; } } } } } else { profile.ShoppingCart.Remove(productId); hasQtyChange = true; } } } if (hasQtyChange) { profile.Save(); } Response.Redirect("../../Users/Order/AddOrder.aspx", true); } }
protected void btnSave_Click(object sender, EventArgs e) { ItemGroupBusiness Group = new ItemGroupBusiness(); RepeaterItemCollection Items = CheckedItemRepeater.Items; CheckBox chkSelected; Literal lblItemID; ItemGroupDetailEntity ItemGroupDetail; int ItemID; foreach (RepeaterItem Item in Items) { chkSelected = (CheckBox)Item.FindControl("chkSelected"); lblItemID = (Literal)Item.FindControl("lblItemID"); ItemID = Convert.ToInt32(lblItemID.Text); ItemGroupDetail = new ItemGroupDetailEntity(); ItemGroupDetail.ID = new ItemGroupDetailPK { GroupID = GroupID, ItemID = Convert.ToInt32(lblItemID.Text) }; if (chkSelected.Checked) { Group.SaveItemGroupDetail(ItemGroupDetail); } if (!chkSelected.Checked) { Group.DeleteItemGroupDetail(ItemGroupDetail); } } ShowMessage("组合项目检查明细保存成功!"); }
protected void btnSave_Click(object sender, EventArgs e) { RepeaterItemCollection Items = ItemGroupRepeater.Items; CheckBox chkSelected; Literal lblGroupID, lblDeptID; String RegisterNo = Request.Params["RegisterNo"]; int PackageID = Convert.ToInt32(Request.Params["PackageID"]); foreach (RepeaterItem Item in Items) { chkSelected = (CheckBox)Item.FindControl("chkSelected"); lblGroupID = (Literal)Item.FindControl("lblGroupID"); lblDeptID = (Literal)Item.FindControl("lblDeptID"); if (chkSelected.Checked) { GroupResultEntity GroupResult = new GroupResultEntity { ID = new GroupResultPK { RegisterNo = RegisterNo, GroupID = Convert.ToInt32(lblGroupID.Text) }, DeptID = Convert.ToInt32(lblDeptID.Text), IsOver = false, PackageID = PackageID }; using (RegistrationBusiness Business = new RegistrationBusiness()) { Business.SaveGroupResult(GroupResult); } } } ShowMessage("数据保存成功!"); }
protected void rpData_ItemCommand(object source, RepeaterCommandEventArgs e) { if (e.CommandName == "Del") { bool isNoCheck = true; System.Text.StringBuilder sb = new System.Text.StringBuilder(); string databaseNameStr = string.Empty; RepeaterItemCollection ric = rpData.Items; foreach (RepeaterItem item in ric) { //找到CheckBox HtmlInputCheckBox cb = item.FindControl("cbItem") as HtmlInputCheckBox; if (cb != null && cb.Checked) { if (isNoCheck) { isNoCheck = false; } sb.AppendFormat("{{\"Name\":\"{0}\"}},", cb.Value); } } if (isNoCheck) { return; } } }
protected void btnSave_Click(object sender, EventArgs e) { string errMsg = string.Empty; try { using (var clientContext = GetClientContext()) { var web = GetClientContextWeb(clientContext); var lstEmployee = web.Lists.GetByTitle("Employees"); var itemCreateInfo = new ListItemCreationInformation(); var listItem = lstEmployee.AddItem(itemCreateInfo); listItem["EmpNumber"] = txtEmpNumber.Text; listItem["UserID"] = txtUserID.Text; listItem["Title"] = txtName.Text; listItem["EmpManager"] = txtManager.Text; listItem["Designation"] = ddlDesignation.SelectedValue; listItem["Location"] = ddlCity.Text; StringBuilder sbSkills = new StringBuilder(); RepeaterItemCollection skills = rptSkills.Items; foreach (RepeaterItem skill in skills) { TextBox tbTech = (TextBox)skill.FindControl("rptTxtTechnology"); TextBox tbSkill = (TextBox)skill.FindControl("rptTxtExperience"); sbSkills.Append(tbTech.Text).Append(",").Append(tbSkill.Text).Append(";"); } listItem["Skills"] = sbSkills.ToString(); if (rptUploadedFiles.Items.Count > 0) { listItem["AttachmentID"] = hdnAttachmentID.Value; } listItem.Update(); clientContext.ExecuteQuery(); AddUserToSelectedSiteGroups(clientContext); } } catch (Exception ex) { errMsg = ex.Message; } if (errMsg.Length > 0) { ClientScript.RegisterStartupScript(this.GetType(), "errorMessage", "alert('" + errMsg + "');", true); } else { string url = HttpContext.Current.Request.Url.AbsoluteUri; url = url.Replace("Default.aspx", "Thanks.aspx"); Response.Redirect(url); } }
private List <int> ListFromRepeaterItemCollection(RepeaterItemCollection returnedMovieTable) { List <int> quantityList = new List <int>(); foreach (RepeaterItem repeaterItem in returnedMovieTable) { quantityList.Add(GetQuantityFromRepeaterItem(repeaterItem)); } return(quantityList); }
protected void CheckBoxAll_CheckedChanged(object sender, EventArgs e) { RepeaterItemCollection ric = RepeaterInfo.Items; CheckBox cb = (CheckBox)sender; foreach (RepeaterItem ri in ric) { HtmlInputCheckBox chb = (HtmlInputCheckBox)ri.FindControl("CheckCode"); chb.Checked = cb.Checked; } }
protected void OrderNowClicked(object sender, EventArgs e) { returnedMovieTable = BrowsePageRepeater.Items; Validate(); if (Page.IsValid) { quantityList = new QuantityExtractor(returnedMovieTable).ExtractQuantityList(); SaveOrderToSession(); Response.Redirect("order.aspx"); } }
protected void btnSave_Click(object sender, EventArgs e) { RegistrationBusiness Registration = new RegistrationBusiness(); RepeaterItemCollection Items = ReviewRepeater.Items; Literal lblRegisterNo; DropDownList drpInformResult; foreach (RepeaterItem Item in Items) { lblRegisterNo = (Literal)Item.FindControl("lblRegisterNo"); drpInformResult = (DropDownList)Item.FindControl("drpInformResult"); Registration.SaveReview(lblRegisterNo.Text, drpInformResult.SelectedValue, UserName); } }
private string ConvertListOfPagestoString(RepeaterItemCollection repeaterItemCollection) { List <string> pages = new List <string>(); foreach (RepeaterItem item in repeaterItemCollection) { CheckBox ckb = (CheckBox)item.FindControl("ckbPages"); if (ckb.Checked) { pages.Add(ckb.Text); } } return(pages.Aggregate((x, y) => x + "," + y)); }
protected void btn_Submit_Click(object sender, EventArgs e) { string Oid = "DD" + DateTime.Now.ToString("yyyyMMddMMss"); Orders order = new Orders() { OID = Oid, MID = Convert.ToInt32(Session["Mid"]), ODate = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd")), OConsignee = this.consignee_0.Value, OAddress = this.oaddress.Value, OTelephone = this.tel_0.Value, OSumPrice = Convert.ToInt32(this.txtSumPrice.Value), OState = 1, }; bool ck = OrderBLL.AddOrder(order) > 0? true :false; if (ck) { RepeaterItemCollection items = repgoods.Items; foreach (RepeaterItem item in items) { Label bid = (Label)item.FindControl("bBID"); Label tid = (Label)item.FindControl("bTID"); Label price = (Label)item.FindControl("price"); TextBox lbcount = (TextBox)item.FindControl("lbcount"); OrderDetails o = new OrderDetails() { OID = Oid, BID = Convert.ToInt32(bid.Text), BPrice = Convert.ToDouble(price.Text), BCount = Convert.ToInt32(lbcount.Text) }; bool cko = OrderBLL.AddOrderDetails(o) > 0 ? true : false; if (cko) { bool ckd = OrderBLL.DeleteTrade(Convert.ToInt32(tid.Text)) > 0 ? true : false; if (ckd) { OrderBLL.UpdateBcount(Convert.ToInt32(lbcount.Text), Convert.ToInt32(bid.Text)); } } } Response.Redirect("done.aspx?oid=" + Oid); } }
private void OnSave() { BLL.RunLottery rlBll = new BLL.RunLottery(); bool isRight = false; //获取所有行 RepeaterItemCollection ric = rpData.Items; foreach (RepeaterItem item in ric) { //找到CheckBox HtmlInputText txt = item.FindControl("txtLotteryNum") as HtmlInputText; if (txt != null) { if (!string.IsNullOrEmpty(txt.Value.Trim())) { HtmlInputHidden hNid = item.FindControl("hNid") as HtmlInputHidden; if (hNid != null) { if (!string.IsNullOrEmpty(hNid.Value.Trim())) { Model.RunLottery rlModel = rlBll.GetModel(hNid.Value.Trim()); if (rlModel != null) { rlModel.LotteryNum = txt.Value.Trim(); if (rlBll.Update(rlModel) > 0) { if (!isRight) { isRight = true; } } } } } } } } if (isRight) { WebHelper.MessageBox.MessagerShow(this.Page, lbtnPostBack, "操作成功"); } else { WebHelper.MessageBox.Messager(this.Page, lbtnPostBack, "操作失败", "系统提示"); } }
private DataTable GetAttachmentsFromRepeaterControl() { DataTable table = GetAttachmentsTable(); RepeaterItemCollection attachments = rptUploadedFiles.Items; foreach (RepeaterItem attachment in attachments) { HyperLink hlAttachment = (HyperLink)attachment.FindControl("rptAttachment"); LinkButton lbDelete = (LinkButton)attachment.FindControl("rptDelete"); table.Rows.Add(hlAttachment.Text, hlAttachment.NavigateUrl, lbDelete.CommandArgument); } return(table); }
protected void btnBatch_Click(object source, EventArgs e) { RepeaterItemCollection Items = RegistrationRepeater.Items; GroupResultBusiness GroupResult = new GroupResultBusiness(); Button btnDetail; String RegisterNo = ""; foreach (RepeaterItem Item in Items) { btnDetail = (Button)Item.FindControl("btnDetail"); RegisterNo = btnDetail.CommandArgument + ""; String Summary = String.Join(Environment.NewLine, GroupResult.GetGroupSummary(RegisterNo).ToArray()); m_Registration.SaveOverall(RegisterNo, DateTime.Now.Date, UserName, Summary, "", ""); } ShowMessage("操作成功!"); }
public override void DataBind() { TagRepeater.DataSource = KPI_RealTagDal.GetRealTags(UnitID); base.DataBind(); Literal lblRealID; CheckBox chkSelected; using (SATagMapDataAccess DataAccess = new SATagMapDataAccess()) { List <String> TagIDList = DataAccess.GetSATagMaps(SAID).Select(p => p.RealID).ToList <String>(); RepeaterItemCollection Items = TagRepeater.Items; foreach (RepeaterItem Item in Items) { lblRealID = (Literal)Item.FindControl("lblRealID"); chkSelected = (CheckBox)Item.FindControl("chkSelected"); chkSelected.Checked = TagIDList.Contains(lblRealID.Text); } } }
protected void btnBatchPrint_Click(object sender, EventArgs e) { //ReportUtility ReportUtil = new ReportUtility(); //List<RegistrationViewEntity> Registrations = new List<RegistrationViewEntity>(); List <String> Registrations = new List <string>(); CheckBox chkSelected; RepeaterItemCollection Items = RegistrationRepeater.Items; foreach (RepeaterItem Item in Items) { chkSelected = (CheckBox)Item.FindControl("chkSelected"); if (chkSelected.Checked) { Registrations.Add(chkSelected.ToolTip); } } if (Registrations.Count <= 0) { return; } Session["Registrations"] = Registrations; String js = "window.open('" + ApplicationPath + "/Reports/Default.aspx?ReportKind=6','_blank')"; ScriptManager.RegisterClientScriptBlock(this, GetType(), "PrintReport", js, true); //if (Registrations.Count <= 0) return; //List<Package> Packages = new List<Package>(); //List<GroupItem> GroupItems = new List<GroupItem>(); //foreach (RegistrationViewEntity Registration in Registrations) { // Packages.AddRange(ReportUtil.GetPackageItems(Registration.RegisterNo, Registration.PackageID.Value)); // GroupItems.AddRange(ReportUtil.GetGroupItems(Registration.RegisterNo, Registration.PackageID.Value)); //} //using (WebReport Report = new WebReport()) { // Report.ReportFile = Server.MapPath(ApplicationPath + "/Reports/IntroductionListReport.frx"); // Report.Report.RegisterData(Registrations, "Registration"); // Report.Report.RegisterData(Packages, "Packages"); // Report.Report.RegisterData(GroupItems, "ItemGroups"); // Report.Report.Prepare(true); // Report.Report.PrintSettings.ShowDialog = false; // Report.Report.Print(); //} //Report.PrintInPdf = true; //Report.Report.Print(); }
protected void ButtonBind_Click(object sender, EventArgs e) { RepeaterItemCollection ric = RepeaterInfo.Items; List <string> sqls = new List <string>(); foreach (RepeaterItem ri in ric) { HtmlInputCheckBox chb = (HtmlInputCheckBox)ri.FindControl("CheckCode"); if (chb.Checked) { string id = chb.Value; sqls.Add(OrderSubManage.GetDelSql(id)); sqls.AddRange(GetAddSql(id)); } } DbHelperSQL.ExecuteSqlTran(sqls); LTP.Common.MessageBox.Show(this, "项目绑定成功!"); }
private void AddNewSkill() { DataTable table = new DataTable(); table.Columns.Add("Technology", typeof(string)); table.Columns.Add("Experience", typeof(string)); RepeaterItemCollection skills = rptSkills.Items; foreach (RepeaterItem skill in skills) { TextBox tbTech = (TextBox)skill.FindControl("rptTxtTechnology"); TextBox tbSkill = (TextBox)skill.FindControl("rptTxtExperience"); table.Rows.Add(tbTech.Text, tbSkill.Text); } table.Rows.Add("", ""); rptSkills.DataSource = table; rptSkills.DataBind(); }
/// <summary> /// 数据绑定体检登记 /// </summary> public override void DataBind() { int RecordCount = 0; DateTime?RegisterDate = EnvConverter.ToDateTime(txtSRegisterDate.Text); String DeptName = txtsDeptName.Text.Trim(); String RegisterNo = txtsRegisterNo.Text.Trim(); RegistrationRepeater.DataSource = m_Registration.GetOveralls(Pager.CurrentPageIndex, Pager.PageSize, RegisterDate, DeptName, RegisterNo, out RecordCount); Pager.RecordCount = RecordCount; base.DataBind(); RepeaterItemCollection Items = RegistrationRepeater.Items; Button btnDetail; foreach (RepeaterItem Item in Items) { btnDetail = (Button)Item.FindControl("btnDetail"); btnDetail.OnClientClick = "onSelected(1, \"" + btnDetail.CommandArgument + "\")"; } }
private void InitialItemGroup() { ItemGroupBusiness Group = new ItemGroupBusiness(); List <ItemGroupDetailViewEntity> List = Group.GetItemGroupDetails(GroupID); RepeaterItemCollection Items = CheckedItemRepeater.Items; CheckBox chkSelected; Literal lblItemID; int ItemID, Count; foreach (RepeaterItem Item in Items) { chkSelected = (CheckBox)Item.FindControl("chkSelected"); lblItemID = (Literal)Item.FindControl("lblItemID"); ItemID = Convert.ToInt32(lblItemID.Text); Count = List.Count(p => p.ID.GroupID == GroupID && p.ID.ItemID == ItemID); if (Count > 0) { chkSelected.Checked = true; } } }
private void InitialItemGroup() { PackageBusiness Package = new PackageBusiness(); int RecordCount = 0; List <PackageGroupViewEntity> List = Package.GetPackageGroups(1, 200, PackageID, out RecordCount); RepeaterItemCollection Items = ItemGroupRepeater.Items; CheckBox chkSelected; Literal lblGroupID; int GroupID, Count; foreach (RepeaterItem Item in Items) { chkSelected = (CheckBox)Item.FindControl("chkSelected"); lblGroupID = (Literal)Item.FindControl("lblGroupID"); GroupID = Convert.ToInt32(lblGroupID.Text); Count = List.Count(p => p.ID.PackageID == PackageID && p.ID.GroupID == GroupID); if (Count > 0) { chkSelected.Checked = true; } } }
protected void btnSave_Click(Object sender, EventArgs e) { Literal lblSysName, lblSysDesc, lblSysCode; TextBox txtSysValue, txtSysNote, txtSysValue2; KPI_SystemDal DataAccess = new KPI_SystemDal(); SystemParameterEntity SystemParameter; RepeaterItemCollection Items = Repeater1.Items; foreach (RepeaterItem Item in Items) { lblSysName = (Literal)Item.FindControl("lblSysName"); lblSysDesc = (Literal)Item.FindControl("lblSysDesc"); lblSysCode = (Literal)Item.FindControl("lblSysCode"); txtSysValue = (TextBox)Item.FindControl("txtSysValue"); txtSysValue2 = (TextBox)Item.FindControl("txtSysValue2"); txtSysNote = (TextBox)Item.FindControl("txtSysNote"); SystemParameter = new SystemParameterEntity(); SystemParameter.SysEngunit = "元"; SystemParameter.SysIsValid = 1; SystemParameter.SysID = DateTime.Now.Ticks + ""; SystemParameter.SysName = lblSysName.Text; SystemParameter.SysDesc = lblSysDesc.Text; SystemParameter.SysValue = txtSysValue.Text; SystemParameter.SysNote = txtSysNote.Text; DataAccess.SaveSystemParameter(SystemParameter); SystemParameter = new SystemParameterEntity(); SystemParameter.SysEngunit = ""; SystemParameter.SysIsValid = 1; SystemParameter.SysID = lblSysName.Text; SystemParameter.SysName = lblSysCode.Text; SystemParameter.SysDesc = "奖励名次"; SystemParameter.SysValue = txtSysValue2.Text; SystemParameter.SysNote = "奖励名次"; DataAccess.SaveSystemParameter(SystemParameter); } ShowMessage("数据保存成功!"); }
/// <summary> /// 删除选中文件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnCommand_Click(object sender, EventArgs e) { Int32 arguments = Convert.ToInt32(Request.Form["__EVENTARGUMENT"]); List <FileInfo> files = new List <FileInfo>(); RepeaterItemCollection items = (displayMode == DisplayMode.列表) ? Repeater1.Items : Repeater2.Items; foreach (RepeaterItem item in items) { HtmlInputCheckBox chkid = item.FindControl("id") as HtmlInputCheckBox; if (chkid.Checked) { files.Add(new FileInfo(Server.UrlDecode(chkid.Value))); //FileInfo file = new FileInfo(Server.UrlDecode(chkid.Value)); } } if (files.Count > 0) { if (arguments == -1)//批量删除 { foreach (FileInfo file in files) { if (file.Attributes == FileAttributes.Directory) { DirectoryInfo dir = new DirectoryInfo(file.FullName); if (dir.Exists) { dir.Delete(true); } } else if (file.Exists) { file.Delete(); } } } } BindData(); }
protected void btnGetItemResult_Click(object sender, EventArgs e) { DataBind(); ItemResultRepeater.DataSource = m_ItemResult.GetDeptItemResults( hRegisterNo.Value, Convert.ToInt32(hGroupID.Value)); base.DataBind(); GroupResultViewEntity GroupResult = m_GroupResut.GetGroupResult(RegisterNo, Convert.ToInt32(hGroupID.Value)); txtSummary.Text = ""; if (GroupResult != null) { txtSummary.Text = GroupResult.Summary; } TextBox txtCheckResult; RepeaterItemCollection Items = ItemResultRepeater.Items; foreach (RepeaterItem Item in Items) { txtCheckResult = (TextBox)Item.FindControl("txtCheckResult"); txtCheckResult.Enabled = InputEnabled; } ScriptManager.RegisterClientScriptBlock(this, GetType(), "setUIStatus", "setUIStatus();", true); }