public static void UpdateAPLog(int TranId, string APIResponseData, int APIResponseCode, string APIErrorMessage) { AP_Interface_Log Log = new AP_Interface_Log(ICON.Configuration.Database.REM_ConnectionString, TranId); Log.APIResponseData = !string.IsNullOrEmpty(APIResponseData) ? APIResponseData : Log.APIResponseData; Log.APIResponseCode = APIResponseCode; Log.APIErrorMessage = !string.IsNullOrEmpty(APIErrorMessage) ? APIErrorMessage : Log.APIErrorMessage; Log.ExecCommand.Update(); }
public static AP_Interface_Log CreateAPLog(string Module, string MethodName, string APIRequestData, string TranBy) { AP_Interface_Log Log = new AP_Interface_Log(ICON.Configuration.Database.REM_ConnectionString); DBHelper dbHelp = new DBHelper(ICON.Configuration.Database.REM_ConnectionString, null); Log.Module = Module; Log.MethodName = MethodName; Log.APIRequestData = APIRequestData; Log.APIResponseCode = 500; Log.CreateDate = DateTime.Now; Log.CreateBy = TranBy; Log.UpdateDate = DateTime.Now; Log.UpdateBy = Log.CreateBy; Log.ExecCommand.Insert(); return(Log); }
public List <AP_Interface_Log> SelectAll(int start, int length, List <WhereClause> Where, List <OrderByClause> OrderBy) { SelectQueryBuilder Sqb = new SelectQueryBuilder(); Sqb.SelectAllColumns(); if (start > 0 || length > 0) { if (start == 0) { Sqb.TopRecords = length; } else { Sqb.LimitRecords(start, length); } } Sqb.SelectFromTable("AP_Interface_Log"); if (Where != null) { foreach (WhereClause Item in Where) { Sqb.AddWhere(Item); } } if (OrderBy != null) { foreach (OrderByClause Item in OrderBy) { Sqb.AddOrderBy(Item); } } DataTable dt = LoadByQueryBuilder(Sqb); List <AP_Interface_Log> Res = new List <AP_Interface_Log>(); foreach (DataRow Dr in dt.Rows) { AP_Interface_Log Item = new AP_Interface_Log(); Item.ExecCommand.Load(Dr); Res.Add(Item); } return(Res); }
internal AP_Interface_Log_Command(string ConnectionStr, AP_Interface_Log obj_AP_Interface_Log) { this._AP_Interface_Log = obj_AP_Interface_Log; this._DBHelper = new DBHelper(ConnectionStr, null); }
internal AP_Interface_Log_Command(AP_Interface_Log obj_AP_Interface_Log) { this._AP_Interface_Log = obj_AP_Interface_Log; this._DBHelper = new DBHelper(); }