96 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			C#
		
	
	
	
		
		
			
		
	
	
			96 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			C#
		
	
	
	
|  | using System; | ||
|  | using System.Data; | ||
|  | 
 | ||
|  | 
 | ||
|  | namespace DeiNiu | ||
|  | { | ||
|  |     public abstract class BaseModel   | ||
|  |     { | ||
|  |         protected internal Object[] cmdParameters = new Object[10]; | ||
|  |         protected internal int _id; | ||
|  | 
 | ||
|  |         public Object[] CmdParameters | ||
|  |         { | ||
|  |             get | ||
|  |             { | ||
|  |                 return cmdParameters; | ||
|  |             } | ||
|  | 
 | ||
|  |         } | ||
|  | 
 | ||
|  |         public int ID | ||
|  |         { | ||
|  |             get { return _id; } | ||
|  |             set { _id = value; } | ||
|  |         } | ||
|  |         internal int custOperFlag;      | ||
|  |         public BaseModel() | ||
|  |         { | ||
|  |             getImp(); | ||
|  |         } | ||
|  |         protected  BaseModel_Imp model_imp; | ||
|  |         public int Add() | ||
|  |         { | ||
|  |             return model_imp.Add(this); | ||
|  |         } | ||
|  | 
 | ||
|  |         public int Update() | ||
|  |         { | ||
|  |             return model_imp.Update(this); | ||
|  |         } | ||
|  | 
 | ||
|  |         public int Delete() | ||
|  |         { | ||
|  |             return model_imp.Delete(this); | ||
|  |         } | ||
|  | 
 | ||
|  |         public DataSet QueryActived() | ||
|  |         { | ||
|  |             return model_imp.QueryActived(); | ||
|  |         } | ||
|  |         public DataSet Query(BaseModel exampleObj) | ||
|  |         { | ||
|  |             return model_imp.Query(exampleObj); | ||
|  |         } | ||
|  |         public DataSet Query() | ||
|  |         { | ||
|  |             return model_imp.Query(); | ||
|  |         } | ||
|  |         protected DataSet CustQuery(int custOperFlag) | ||
|  |         { | ||
|  |             this.custOperFlag = custOperFlag; | ||
|  |             return model_imp.CustQuery(  this); | ||
|  |         } | ||
|  |          | ||
|  |         protected int CustOper(int custOperFlag) | ||
|  |         { | ||
|  |             this.custOperFlag = custOperFlag; | ||
|  |             return model_imp.CustOper(this); | ||
|  |         } | ||
|  | 
 | ||
|  |         | ||
|  |         public void getModel() | ||
|  |         { | ||
|  |             custOperFlag = 0;  //2010.1.3 | ||
|  |             model_imp.getModel(this); | ||
|  |         } | ||
|  |         public void getModel(int custOperFlag) | ||
|  |         { | ||
|  |             this.custOperFlag = custOperFlag; | ||
|  |             model_imp.getModel(this); | ||
|  |         } | ||
|  |         protected virtual void getImp() | ||
|  |         { | ||
|  |               | ||
|  |             Log_Imp obj = new Log_Imp(); | ||
|  |             model_imp = obj; | ||
|  |         } | ||
|  | 
 | ||
|  |         | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |     } | ||
|  | } |