Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOmorderdropwaves(ref DataRow row, Omorderdropwaves entity)
 {
     row.SetField("batch", entity.batch);
     row.SetField("order_count", entity.orderCount);
     row.SetField("good_order_count", entity.goodOrderCount);
     row.SetField("not_order_count", entity.notOrderCount);
     row.SetField("line_count", entity.lineCount);
     row.SetField("good_line_count", entity.goodLineCount);
     row.SetField("not_line_count", entity.notLineCount);
     row.SetField("ch_work", entity.chWork);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Omorderdropwaves BuildOmorderdropwavesFromRow(DataRow row)
        {
            Omorderdropwaves entity = new Omorderdropwaves();

            entity.batch          = row.IsNull("batch") ? 0 : row.Field <int>("batch");
            entity.orderCount     = row.IsNull("order_count") ? 0 : row.Field <int>("order_count");
            entity.goodOrderCount = row.IsNull("good_order_count") ? 0 : row.Field <int>("good_order_count");
            entity.notOrderCount  = row.IsNull("not_order_count") ? 0 : row.Field <int>("not_order_count");
            entity.lineCount      = row.IsNull("line_count") ? 0 : row.Field <int>("line_count");
            entity.goodLineCount  = row.IsNull("good_line_count") ? 0 : row.Field <int>("good_line_count");
            entity.notLineCount   = row.IsNull("not_line_count") ? 0 : row.Field <int>("not_line_count");
            entity.chWork         = row.IsNull("ch_work") ? string.Empty : row.Field <string>("ch_work");
            entity.userfield      = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }