public ModelInvokeResult <Ewallet_Recharge_RecordPK> Nullify(string strId) { ModelInvokeResult <Ewallet_Recharge_RecordPK> result = new ModelInvokeResult <Ewallet_Recharge_RecordPK> { Success = true }; try { List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>(); int _Id = Convert.ToInt32(strId); Ewallet_Recharge_Record ewallet = new Ewallet_Recharge_Record { Id = _Id, Status = 0 }; statements.Add(new IBatisNetBatchStatement { StatementName = ewallet.GetUpdateMethodName(), ParameterObject = ewallet.ToStringObjectDictionary(false), Type = SqlExecuteType.UPDATE }); /***********************begin 自定义代码*******************/ /***********************此处添加自定义代码*****************/ /***********************end 自定义代码*********************/ BuilderFactory.DefaultBulder().ExecuteNativeSqlNoneQuery(statements); result.instance = new Ewallet_Recharge_RecordPK { Id = _Id }; } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public InvokeResult NullifySelected(string strIds) { InvokeResult result = new InvokeResult { Success = true }; try { List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>(); string[] arrIds = strIds.Split("|".ToCharArray(), StringSplitOptions.RemoveEmptyEntries); if (arrIds.Length == 0) { result.Success = false; result.ErrorCode = 59996; return(result); } string statementName = new Ewallet_Recharge_Record().GetUpdateMethodName(); foreach (string strId in arrIds) { Ewallet_Recharge_Record ewallet = new Ewallet_Recharge_Record { Id = Convert.ToInt32(strId), Status = 0 }; statements.Add(new IBatisNetBatchStatement { StatementName = statementName, ParameterObject = ewallet.ToStringObjectDictionary(false), Type = SqlExecuteType.UPDATE }); } BuilderFactory.DefaultBulder().ExecuteNativeSqlNoneQuery(statements); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public ModelInvokeResult <Ewallet_Recharge_RecordPK> Create(Ewallet_Recharge_Record ewallet) { ModelInvokeResult <Ewallet_Recharge_RecordPK> result = new ModelInvokeResult <Ewallet_Recharge_RecordPK> { Success = true }; try { List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>(); if (ewallet.Id == -1) { ewallet.Id = null; } statements.Add(new IBatisNetBatchStatement { StatementName = ewallet.GetCreateMethodName(), ParameterObject = ewallet.ToStringObjectDictionary(false), Type = SqlExecuteType.INSERT }); /***********************begin 自定义代码*******************/ /***********************此处添加自定义代码*****************/ /***********************end 自定义代码*********************/ BuilderFactory.DefaultBulder().ExecuteNativeSqlNoneQuery(statements); result.instance = new Ewallet_Recharge_RecordPK { Id = ewallet.Id }; } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }