public int salary_grant_typeDelete(salary_grant_typeModel s) { salary_grant_type se = new salary_grant_type() { Id = s.Id, grant_type_name = s.grant_type_name }; return(Delete(se)); }
public int salary_grant_typeAdd(salary_grant_typeModel s) { salary_grant_type st = new salary_grant_type() { Id = s.Id, grant_type_name = s.grant_type_name }; return(Add(st)); }
public ActionResult Add(salary_grant_typeModel s) { if (ModelState.IsValid) { if (isb.Add(s) > 0) { return(Content("<script>alert('添加成功');location.href='/salary_grant_type/Index'</script>")); } else { return(Content("<script>alert('添加失败');location.href='/salary_grant_type/Index'</script>")); } } return(View()); }
public List <salary_grant_typeModel> salary_grant_typeSelect() { List <salary_grant_type> list = Select(); List <salary_grant_typeModel> list2 = new List <salary_grant_typeModel>(); foreach (salary_grant_type item in list) { salary_grant_typeModel s = new salary_grant_typeModel() { Id = item.Id, grant_type_name = item.grant_type_name }; list2.Add(s); } return(list2); }
public ActionResult Delete(int Id) { salary_grant_typeModel s = new salary_grant_typeModel() { Id = Id }; if (isb.Delete(s) > 0) { return(Content("<script>alert('删除成功');location.href='/salary_grant_type/Index'</script>")); } else { return(Content("<script>alert('删除失败');location.href='/salary_grant_type/Index'</script>")); } }
public int salary_grant_typeUpdate(salary_grant_typeModel s) { throw new NotImplementedException(); }
public int Delete(salary_grant_typeModel s) { return(isb.salary_grant_typeDelete(s)); }
public int Add(salary_grant_typeModel s) { return(isb.salary_grant_typeAdd(s)); }