//设置操作 protected void rptList_ItemCommand(object source, RepeaterCommandEventArgs e) { int id = Convert.ToInt32(((HiddenField)e.Item.FindControl("hidId")).Value); BLL.job bll = new BLL.job(); Model.job model = bll.GetModel(id); switch (e.CommandName.ToLower()) { case "ibtnlock": if (model.is_lock == 1) { bll.UpdateField(id, "is_lock=0"); } else { bll.UpdateField(id, "is_lock=1"); } break; } this.RptBind("id>0" + CombSqlTxt(this.keywords), "sort_id asc,id desc"); }
//保存排序 protected void btnSave_Click(object sender, EventArgs e) { ChkAdminLevel("plugin_job", DTEnums.ActionEnum.Edit.ToString()); //检查权限 BLL.job bll = new BLL.job(); 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.UpdateField(id, "sort_id=" + sortId.ToString()); } JscriptMsg("保存排序成功啦!", Utils.CombUrlTxt("index.aspx", "keywords={0}", this.keywords), "Success"); }
//保存排序 protected void btnSave_Click(object sender, EventArgs e) { ChkAdminLevel("plugin_job", DTEnums.ActionEnum.Edit.ToString()); //检查权限 BLL.job bll = new BLL.job(); 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.UpdateField(id, "sort_id=" + sortId.ToString()); } JscriptMsg("保存排序成功啦!", Utils.CombUrlTxt("index.aspx", "keywords={0}", this.keywords), "Success"); }
//设置操作 protected void rptList_ItemCommand(object source, RepeaterCommandEventArgs e) { int id = Convert.ToInt32(((HiddenField)e.Item.FindControl("hidId")).Value); BLL.job bll = new BLL.job(); Model.job model = bll.GetModel(id); switch (e.CommandName.ToLower()) { case "ibtnlock": if (model.is_lock == 1) bll.UpdateField(id, "is_lock=0"); else bll.UpdateField(id, "is_lock=1"); break; } this.RptBind("id>0" + CombSqlTxt(this.keywords), "sort_id asc,id desc"); }