/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromOelinepricetabdisclvl(ref DataRow row, Oelinepricetabdisclvl entity) { row.SetField("level", entity.level); row.SetField("discamt", entity.discamt); row.SetField("discamtdspl", entity.discamtdspl); row.SetField("qty", entity.qty); row.SetField("qtydspl", entity.qtydspl); row.SetField("userfield", entity.userfield); }
public static Oelinepricetabdisclvl BuildOelinepricetabdisclvlFromRow(DataRow row) { Oelinepricetabdisclvl entity = new Oelinepricetabdisclvl(); entity.level = row.IsNull("level") ? 0 : row.Field <int>("level"); entity.discamt = row.IsNull("discamt") ? decimal.Zero : row.Field <decimal>("discamt"); entity.discamtdspl = row.IsNull("discamtdspl") ? string.Empty : row.Field <string>("discamtdspl"); entity.qty = row.IsNull("qty") ? decimal.Zero : row.Field <decimal>("qty"); entity.qtydspl = row.IsNull("qtydspl") ? string.Empty : row.Field <string>("qtydspl"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }