//保存排序 protected void btnSave_Click(object sender, EventArgs e) { ChkAdminLevel("sys_department", DTEnums.ActionEnum.Edit.ToString()); //检查权限 BLL.department bll = new BLL.department(); for (int i = 0; i < rptList.Items.Count; i++) { int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value); int sortId; if (!int.TryParse(((TextBox)rptList.Items[i].FindControl("txtSortId")).Text.Trim(), out sortId)) { sortId = 99; } bll.UpdateSort(id, sortId); } JscriptMsg("保存排序成功!", Utils.CombUrlTxt("department_list.aspx", "", ""), ""); }