| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Data;
- using CoreFS.CA06;
- namespace Core.StlMes.Client.Sale.DbHelp
- {
- public class DbCoreClientParam
- {
- private static string ServerName = "core.stlmes.server.sale.dbhelp.DbManager";
- private static string QueryMethod = "exceuteQuery";
- private static string NoQueryMethod = "exceuteNoQuery";
- private static string BeginTransactionMethod = "beginTransaction";
- private static string CommitMethod = "commit";
- private static string RollbackMethod = "rollBack";
- private static string ExecuteNoQueryTransactionMethod = "exceuteNoQueryTranscation";
- /// <summary>
- ///获取调用查询的参数
- /// </summary>
- /// <param name="dt"></param>
- /// <param name="args"></param>
- /// <returns></returns>
- public static CoreClientParam GetCoreClientParam_Query(DataTable dt, object[] args)
- {
- CoreClientParam param = new CoreClientParam();
- param.ServerName = ServerName;
- param.MethodName = QueryMethod;
- param.ServerParams = args;
- param.SourceDataTable = dt;
- return param;
- }
- /// <summary>
- /// 获取dml 传入参数
- /// </summary>
- /// <param name="args"></param>
- /// <returns></returns>
- public static CoreClientParam GetCoreClientParam_NoQuery(object[] args)
- {
- CoreClientParam param = new CoreClientParam();
- param.ServerName = ServerName;
- param.MethodName = NoQueryMethod;
- param.ServerParams = args;
- return param;
- }
- public static CoreClientParam GetCoreClientParam_BeginTransaction(object[] args)
- {
- CoreClientParam param = new CoreClientParam();
- param.ServerName = ServerName;
- param.MethodName = BeginTransactionMethod;
- param.ServerParams = args;
- return param;
- }
- public static CoreClientParam GetCoreClientParam_Commit(object[] args)
- {
- CoreClientParam param = new CoreClientParam();
- param.ServerName = ServerName;
- param.MethodName = CommitMethod;
- param.ServerParams = args;
- return param;
- }
- public static CoreClientParam GetCoreClientParam_RollBack(object[] args)
- {
- CoreClientParam param = new CoreClientParam();
- param.ServerName = ServerName;
- param.MethodName = RollbackMethod;
- param.ServerParams = args;
- return param;
- }
- public static CoreClientParam GetCoreClientParam_Trancation(object[] args)
- {
- CoreClientParam param = new CoreClientParam();
- param.ServerName = ServerName;
- param.MethodName = ExecuteNoQueryTransactionMethod;
- param.ServerParams = args;
- return param;
- }
- }
- }
|