protected void saveOrder_Btn_Click(object sender, EventArgs e) { //mid,oid,nid,wid string[] wid = Request.Form["order_T"].Split(','); //需要更换成的ID string[] ids = Request.Form["order_Hid"].Split(','); //信息描述 for (int i = 0; i < wid.Length; i++) { if (wid[i] == "") { function.Script(this, "alert('排序不能为空!');"); return; } int wantPid = DataConverter.CLng(wid[i]); int mid = DataConverter.CLng(ids[i].Split(':')[0]); int oid = DataConverter.CLng(ids[i].Split(':')[1]); int nowPid = DataConverter.CLng(ids[i].Split(':')[2]); if (wantPid == nowPid) { continue; //没有修改排序值 } else { b_search.UpdateOrder(mid, wantPid); } // if end; } //for end; MyBind(); }
public ContentResult SearchFunc_API() { switch (action) { case "del": shBll.DelByIDS(ids); break; case "order": { //mid,oid,nid,wid string[] wid = GetParam("order_T").Split(",".ToCharArray(), StringSplitOptions.RemoveEmptyEntries); //需要更换成的ID string[] ids = GetParam("order_Hid").Split(",".ToCharArray(), StringSplitOptions.RemoveEmptyEntries); //信息描述 for (int i = 0; i < wid.Length; i++) { //if (wid[i] == "") //{ // function.Script(this, "alert('排序不能为空!');"); // return; //} int wantPid = DataConverter.CLng(wid[i]); int mid = DataConverter.CLng(ids[i].Split(':')[0]); int oid = DataConverter.CLng(ids[i].Split(':')[1]); int nowPid = DataConverter.CLng(ids[i].Split(':')[2]); if (wantPid == nowPid) { continue; //没有修改排序值 } else { shBll.UpdateOrder(mid, wantPid); } // if end; } //for end; } break; } return(Content(Success.ToString())); }