/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromTiecreatetiettresults(ref DataRow row, Tiecreatetiettresults entity) { row.SetField("seqno", entity.seqno); row.SetField("ordertype", entity.ordertype); row.SetField("orderaltno", entity.orderaltno); row.SetField("orderaltsuf", entity.orderaltsuf); row.SetField("linealtno", entity.linealtno); row.SetField("seqaltno", entity.seqaltno); row.SetField("wtcono", entity.wtcono); row.SetField("transtype", entity.transtype); row.SetField("name", entity.name); row.SetField("cleartiefl", entity.cleartiefl); row.SetField("oordertype", entity.oordertype); row.SetField("oorderaltno", entity.oorderaltno); row.SetField("oorderaltsuf", entity.oorderaltsuf); row.SetField("olinealtno", entity.olinealtno); row.SetField("oseqaltno", entity.oseqaltno); row.SetField("owtcono", entity.owtcono); row.SetField("repairordno", entity.repairordno); row.SetField("repairordsuf", entity.repairordsuf); row.SetField("tietype", entity.tietype); row.SetField("modified", entity.modified); row.SetField("approvty", entity.approvty); row.SetField("tierecid", entity.tierecid); }
public static Tiecreatetiettresults BuildTiecreatetiettresultsFromRow(DataRow row) { Tiecreatetiettresults entity = new Tiecreatetiettresults(); entity.seqno = row.IsNull("seqno") ? 0 : row.Field <int>("seqno"); entity.ordertype = row.IsNull("ordertype") ? string.Empty : row.Field <string>("ordertype"); entity.orderaltno = row.IsNull("orderaltno") ? 0 : row.Field <int>("orderaltno"); entity.orderaltsuf = row.IsNull("orderaltsuf") ? 0 : row.Field <int>("orderaltsuf"); entity.linealtno = row.IsNull("linealtno") ? 0 : row.Field <int>("linealtno"); entity.seqaltno = row.IsNull("seqaltno") ? 0 : row.Field <int>("seqaltno"); entity.wtcono = row.IsNull("wtcono") ? 0 : row.Field <int>("wtcono"); entity.transtype = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype"); entity.name = row.IsNull("name") ? string.Empty : row.Field <string>("name"); entity.cleartiefl = row.Field <bool>("cleartiefl"); entity.oordertype = row.IsNull("oordertype") ? string.Empty : row.Field <string>("oordertype"); entity.oorderaltno = row.IsNull("oorderaltno") ? 0 : row.Field <int>("oorderaltno"); entity.oorderaltsuf = row.IsNull("oorderaltsuf") ? 0 : row.Field <int>("oorderaltsuf"); entity.olinealtno = row.IsNull("olinealtno") ? 0 : row.Field <int>("olinealtno"); entity.oseqaltno = row.IsNull("oseqaltno") ? decimal.Zero : row.Field <decimal>("oseqaltno"); entity.owtcono = row.IsNull("owtcono") ? 0 : row.Field <int>("owtcono"); entity.repairordno = row.IsNull("repairordno") ? 0 : row.Field <int>("repairordno"); entity.repairordsuf = row.IsNull("repairordsuf") ? 0 : row.Field <int>("repairordsuf"); entity.tietype = row.IsNull("tietype") ? string.Empty : row.Field <string>("tietype"); entity.modified = row.Field <bool>("modified"); entity.approvty = row.IsNull("approvty") ? string.Empty : row.Field <string>("approvty"); entity.tierecid = row.IsNull("tierecid") ? 0 : row.Field <long>("tierecid"); return(entity); }