Exemplo n.º 1
0
 private static T_OperationLog ToModel(DataRow row)
 {
     T_OperationLog model = new T_OperationLog();
     model.Id = (System.Guid)row["Id"];
     model.OperatorId = (System.Guid)row["OperatorId"];
     model.MakeDate = (System.DateTime)row["MakeDate"];
     model.ActionDesc = (System.String)row["ActionDesc"];
     return model;
 }
Exemplo n.º 2
0
 public static T_OperationLog[] Search(string sql, SqlParameter[] paramters)
 {
     DataTable table = SqlHelper.ExecuteDataTable(sql, paramters);
     T_OperationLog[] operators = new T_OperationLog[table.Rows.Count];
     for (int i = 0; i < table.Rows.Count; i++)
     {
         operators[i] = ToModel(table.Rows[i]);
     }
     return operators;
 }
Exemplo n.º 3
0
 public static T_OperationLog[] ListAll()
 {
     DataTable dt = SqlHelper.ExecuteDataTable("select * from T_OperationLog");
     T_OperationLog[] models = new T_OperationLog[dt.Rows.Count];
     for (int i = 0; i < dt.Rows.Count; i++)
     {
         models[i] = ToModel(dt.Rows[i]);
     }
     return models;
 }