60 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			60 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System;
 | |
| using System.Collections.Generic;
 | |
| using System.Linq;
 | |
| using System.Text;
 | |
| using System.Data;
 | |
| using System.Windows.Forms;
 | |
| namespace AIMS.PublicUI.BLL
 | |
| {
 | |
|    public class Department
 | |
|     {
 | |
|         public static void Add(Model.Department DepartmentObj)
 | |
|         {
 | |
|             try
 | |
|             {
 | |
|                 new DAL.DepartmentDB().Add(DepartmentObj);
 | |
|                 MessageBox.Show("增加成功!");
 | |
|             }
 | |
|             catch (Exception ex)
 | |
|             {
 | |
|                 MessageBox.Show("增加失败!" + ex.Message);
 | |
|             }
 | |
|         }
 | |
| 
 | |
|         public static void Update(Model.Department DepartmentObj)
 | |
|         {
 | |
|             try
 | |
|             {
 | |
|                 new DAL.DepartmentDB().Update(DepartmentObj);
 | |
|                 MessageBox.Show("修改成功!");
 | |
|             }
 | |
|             catch (Exception ex)
 | |
|             {
 | |
|                 MessageBox.Show("修改失败!"+ex.Message);
 | |
|             }
 | |
|         }
 | |
| 
 | |
|         public static Model.Department GetModel(int Id)
 | |
|         {
 | |
|             return new DAL.DepartmentDB().GetModel(Id);
 | |
|         }
 | |
|         public static Model.Department GetModelName(string Name)
 | |
|         {
 | |
|             return new DAL.DepartmentDB().GetModelName (Name);
 | |
|         }
 | |
| 
 | |
|         public static DataTable GetDepartmentDataTable(string strWhere)
 | |
|         {
 | |
|             return new DAL.DepartmentDB().GetDepartmentDataTable(strWhere);
 | |
|         }
 | |
|         public static List<Model.Department> GetDepartmentAllList(string Kind)
 | |
|         {
 | |
|             return new DAL.DepartmentDB().GetDepartmentAllList(Kind);
 | |
|         }
 | |
|         public static List<Model.Department> GetDepartmentAllListBYSql(string Kind)
 | |
|         {
 | |
|             return new DAL.DepartmentDB().GetDepartmentAllListBYSql(Kind);
 | |
|         }
 | |
|     }
 | |
| }
 |