Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromLoadpoaddonssingle(ref DataRow row, Loadpoaddonssingle entity)
 {
     row.SetField("addondesc1", entity.addondesc1);
     row.SetField("addonamt1", entity.addonamt1);
     row.SetField("addondist1", entity.addondist1);
     row.SetField("addonnet1", entity.addonnet1);
     row.SetField("addondesc2", entity.addondesc2);
     row.SetField("addonamt2", entity.addonamt2);
     row.SetField("addondist2", entity.addondist2);
     row.SetField("addonnet2", entity.addonnet2);
     row.SetField("addondesc3", entity.addondesc3);
     row.SetField("addonamt3", entity.addonamt3);
     row.SetField("addondist3", entity.addondist3);
     row.SetField("addonnet3", entity.addonnet3);
     row.SetField("addondesc4", entity.addondesc4);
     row.SetField("addonamt4", entity.addonamt4);
     row.SetField("addondist4", entity.addondist4);
     row.SetField("addonnet4", entity.addonnet4);
 }
Esempio n. 2
0
        public static Loadpoaddonssingle BuildLoadpoaddonssingleFromRow(DataRow row)
        {
            Loadpoaddonssingle entity = new Loadpoaddonssingle();

            entity.addondesc1 = row.IsNull("addondesc1") ? string.Empty : row.Field <string>("addondesc1");
            entity.addonamt1  = row.IsNull("addonamt1") ? decimal.Zero : row.Field <decimal>("addonamt1");
            entity.addondist1 = row.IsNull("addondist1") ? string.Empty : row.Field <string>("addondist1");
            entity.addonnet1  = row.IsNull("addonnet1") ? decimal.Zero : row.Field <decimal>("addonnet1");
            entity.addondesc2 = row.IsNull("addondesc2") ? string.Empty : row.Field <string>("addondesc2");
            entity.addonamt2  = row.IsNull("addonamt2") ? decimal.Zero : row.Field <decimal>("addonamt2");
            entity.addondist2 = row.IsNull("addondist2") ? string.Empty : row.Field <string>("addondist2");
            entity.addonnet2  = row.IsNull("addonnet2") ? decimal.Zero : row.Field <decimal>("addonnet2");
            entity.addondesc3 = row.IsNull("addondesc3") ? string.Empty : row.Field <string>("addondesc3");
            entity.addonamt3  = row.IsNull("addonamt3") ? decimal.Zero : row.Field <decimal>("addonamt3");
            entity.addondist3 = row.IsNull("addondist3") ? string.Empty : row.Field <string>("addondist3");
            entity.addonnet3  = row.IsNull("addonnet3") ? decimal.Zero : row.Field <decimal>("addonnet3");
            entity.addondesc4 = row.IsNull("addondesc4") ? string.Empty : row.Field <string>("addondesc4");
            entity.addonamt4  = row.IsNull("addonamt4") ? decimal.Zero : row.Field <decimal>("addonamt4");
            entity.addondist4 = row.IsNull("addondist4") ? string.Empty : row.Field <string>("addondist4");
            entity.addonnet4  = row.IsNull("addonnet4") ? decimal.Zero : row.Field <decimal>("addonnet4");
            return(entity);
        }