public static StockRightTempEntity DataRowToEntity(DataRow row)
 {
     if (row == null)
         return null;
     var result = new StockRightTempEntity();
     result.RoleId = (string)row["RoleId"];
     result.StockId = (int)row["StockId"];
     result.Flag = (string)row["RoleId"];
     return result;
 }
 public static StockRightTempEntity[] DataTableToEntitys(DataTable dt)
 {
     if (dt == null)
         return null;
     var results = new StockRightTempEntity[dt.Rows.Count];
     for (int i = 0; i < dt.Rows.Count; i++)
     {
         results[i] = StockRightTempService.DataRowToEntity(dt.Rows[i]);
     }
     return results;
 }