コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIceandetailtranssingle(ref DataRow row, Iceandetailtranssingle entity)
 {
     row.SetField("qty1", entity.qty1);
     row.SetField("qty2", entity.qty2);
     row.SetField("qty3", entity.qty3);
     row.SetField("qty4", entity.qty4);
     row.SetField("qty5", entity.qty5);
     row.SetField("unit1", entity.unit1);
     row.SetField("unit2", entity.unit2);
     row.SetField("unit3", entity.unit3);
     row.SetField("unit4", entity.unit4);
     row.SetField("unit5", entity.unit5);
     row.SetField("amount1", entity.amount1);
     row.SetField("amount2", entity.amount2);
     row.SetField("amount3", entity.amount3);
     row.SetField("amount4", entity.amount4);
     row.SetField("amount5", entity.amount5);
     row.SetField("total1", entity.total1);
     row.SetField("total2", entity.total2);
     row.SetField("total3", entity.total3);
     row.SetField("total4", entity.total4);
     row.SetField("total5", entity.total5);
     row.SetField("balancetotal", entity.balancetotal);
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Iceandetailtranssingle BuildIceandetailtranssingleFromRow(DataRow row)
        {
            Iceandetailtranssingle entity = new Iceandetailtranssingle();

            entity.qty1         = row.IsNull("qty1") ? string.Empty : row.Field <string>("qty1");
            entity.qty2         = row.IsNull("qty2") ? string.Empty : row.Field <string>("qty2");
            entity.qty3         = row.IsNull("qty3") ? string.Empty : row.Field <string>("qty3");
            entity.qty4         = row.IsNull("qty4") ? string.Empty : row.Field <string>("qty4");
            entity.qty5         = row.IsNull("qty5") ? string.Empty : row.Field <string>("qty5");
            entity.unit1        = row.IsNull("unit1") ? string.Empty : row.Field <string>("unit1");
            entity.unit2        = row.IsNull("unit2") ? string.Empty : row.Field <string>("unit2");
            entity.unit3        = row.IsNull("unit3") ? string.Empty : row.Field <string>("unit3");
            entity.unit4        = row.IsNull("unit4") ? string.Empty : row.Field <string>("unit4");
            entity.unit5        = row.IsNull("unit5") ? string.Empty : row.Field <string>("unit5");
            entity.amount1      = row.IsNull("amount1") ? string.Empty : row.Field <string>("amount1");
            entity.amount2      = row.IsNull("amount2") ? string.Empty : row.Field <string>("amount2");
            entity.amount3      = row.IsNull("amount3") ? string.Empty : row.Field <string>("amount3");
            entity.amount4      = row.IsNull("amount4") ? string.Empty : row.Field <string>("amount4");
            entity.amount5      = row.IsNull("amount5") ? string.Empty : row.Field <string>("amount5");
            entity.total1       = row.IsNull("total1") ? string.Empty : row.Field <string>("total1");
            entity.total2       = row.IsNull("total2") ? string.Empty : row.Field <string>("total2");
            entity.total3       = row.IsNull("total3") ? string.Empty : row.Field <string>("total3");
            entity.total4       = row.IsNull("total4") ? string.Empty : row.Field <string>("total4");
            entity.total5       = row.IsNull("total5") ? string.Empty : row.Field <string>("total5");
            entity.balancetotal = row.IsNull("balancetotal") ? string.Empty : row.Field <string>("balancetotal");
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }