Пример #1
0
 private T_OperationLog ToModel(DataRow row)
 {
     T_OperationLog model = new T_OperationLog();
     model.Id = (System.Guid)SqlHelper.FromDbValue(row["Id"]);
     model.OperatorId = (System.Guid)SqlHelper.FromDbValue(row["OperatorId"]);
     model.MakeDate = (System.DateTime)SqlHelper.FromDbValue(row["MakeDate"]);
     model.ActionDesc = (string)SqlHelper.FromDbValue(row["ActionDesc"]);
     return model;
 }
Пример #2
0
 public T_OperationLog[] Search(string sql, SqlParameter[] parameters)
 {
     DataTable table = SqlHelper.ExecuteDataTable(sql, parameters);
     T_OperationLog[] logs = new T_OperationLog[table.Rows.Count];
     for (int i = 0; i < table.Rows.Count; i++)
     {
         logs[i] = ToModel(table.Rows[i]);
     }
     return logs;
 }