60 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			60 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System;
 | |
| using System.Data;
 | |
| using System.Data.SqlClient;
 | |
| using System.Collections;
 | |
| using System.Collections.Generic;
 | |
| using AIMSModel;
 | |
| using AIMSObjectQuery;
 | |
| using System.Text;
 | |
| 
 | |
| namespace AIMSDAL
 | |
| {
 | |
|     internal partial class DApplyOperationInfo
 | |
|     {
 | |
|        	public static void Add(ApplyOperationInfo ApplyOperationInfoObj)
 | |
| 		{
 | |
| 			StringBuilder strSql=new StringBuilder();
 | |
| 			strSql.Append("insert into [ApplyOperationInfo](");
 | |
| 			strSql.Append("OperationApplyId,OperationId,OperatorNo,OperatorName,OperateDate,OperationName,LeftRemark,RightRemark");
 | |
| 			strSql.Append(")");
 | |
| 			strSql.Append(" values (");
 | |
| 			strSql.Append(""+ApplyOperationInfoObj.OperationApplyId+",");
 | |
| 			strSql.Append(""+ApplyOperationInfoObj.OperationId+",");
 | |
| 			strSql.Append("'"+ApplyOperationInfoObj.OperatorNo+"',");
 | |
| 			strSql.Append("'"+ApplyOperationInfoObj.OperatorName+"',");
 | |
| 			strSql.Append("'"+ApplyOperationInfoObj.OperateDate+"',");
 | |
| 			strSql.Append("'"+ApplyOperationInfoObj.OperationName+"',");
 | |
| 			strSql.Append("'"+ApplyOperationInfoObj.LeftRemark+"',");
 | |
| 			strSql.Append("'"+ApplyOperationInfoObj.RightRemark+"'");
 | |
| 			strSql.Append(")");
 | |
| 			HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString());
 | |
| 		}
 | |
| 
 | |
|         public static void Delete(int OperationApplyId)
 | |
| 		{
 | |
| 			StringBuilder strSql=new StringBuilder();
 | |
| 			strSql.Append("delete ApplyOperationInfo ");
 | |
|             strSql.Append(" where OperationApplyId=" + OperationApplyId + "");
 | |
|             HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString());
 | |
| 		}
 | |
|       
 | |
|         public static List<ApplyOperationInfo> GetApplyOperationIdList(int OperationApplyId)
 | |
|         {
 | |
|             List<ApplyOperationInfo> OperationIdList = new List<ApplyOperationInfo>();
 | |
|             string strSql = "SELECT * FROM ApplyOperationInfo WHERE OperationApplyId='" + OperationApplyId + "'";
 | |
| 
 | |
|             DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString());
 | |
|             for (int i = 0; i < dt.Rows.Count; i++)
 | |
|             {
 | |
| 				ApplyOperationInfo info = new ApplyOperationInfo();
 | |
| 				info.OperationId = int.Parse(dt.Rows[i]["OperationId"].ToString());
 | |
| 				info.OperationName = dt.Rows[i]["OperationName"].ToString();
 | |
| 				info.LeftRemark = dt.Rows[i]["LeftRemark"].ToString();
 | |
| 				info.RightRemark = dt.Rows[i]["RightRemark"].ToString(); 
 | |
|                 OperationIdList.Add(info); 
 | |
|             }
 | |
|             return OperationIdList;
 | |
|         }
 | |
|     }
 | |
| }
 |