public ActionResult check(major_changeModel mcm) { //修改操作 if (imb.Update(mcm) > 0) { return(Content("<script>alert('修改成功');window.location.href='/check_list/check_list'</script>")); } else { return(Content("<script>alert('修改失败');window.location.href='/check_list/check_list'</script>")); } }
public ActionResult register(major_changeModel mcm) { config_file_second_kindModel csm = new config_file_second_kindModel { second_kind_id = mcm.new_second_kind_id }; config_file_first_kindModel cfm = new config_file_first_kindModel { first_kind_id = mcm.new_first_kind_id }; config_file_third_kindModel css = new config_file_third_kindModel { third_kind_id = mcm.new_third_kind_id }; config_major_kindModel cff = new config_major_kindModel { major_kind_id = mcm.new_major_kind_id }; config_majorModel cmm = new config_majorModel { major_id = mcm.new_major_id, major_kind_id = mcm.new_major_kind_id }; List <config_file_second_kindModel> lists = sb.SelectByName(csm); List <config_file_first_kindModel> listf = ib.SelectByName(cfm); List <config_file_third_kindModel> lis = isb.SelectByName(css); List <config_major_kindModel> liss = ia.SelectByName(cff); List <config_majorModel> litt = iii.SelectByName(cmm); mcm.new_second_kind_name = lists[0].second_kind_name; mcm.new_first_kind_name = listf[0].first_kind_name; mcm.new_third_kind_name = lis[0].third_kind_name; mcm.new_major_kind_name = liss[0].major_kind_name; mcm.new_major_name = litt[0].major_name; //修改操作 if (imb.Update(mcm) > 0) { return(Content("<script>alert('修改成功');window.location.href='/major_change/register_list'</script>")); } else { return(Content("<script>alert('修改失败');window.location.href='/major_change/register_list'</script>")); } }