/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromArsoaddcriteria(ref DataRow row, Arsoaddcriteria entity) { row.SetField("custno", entity.custno); row.SetField("custtype", entity.custtype); row.SetField("prodcat", entity.prodcat); row.SetField("userfield", entity.userfield); }
public static Arsoaddcriteria BuildArsoaddcriteriaFromRow(DataRow row) { Arsoaddcriteria entity = new Arsoaddcriteria(); entity.custno = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno"); entity.custtype = row.IsNull("custtype") ? string.Empty : row.Field <string>("custtype"); entity.prodcat = row.IsNull("prodcat") ? string.Empty : row.Field <string>("prodcat"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }