/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromCreccriteria(ref DataRow row, Creccriteria entity) { row.SetField("bankno", entity.bankno); row.SetField("ckrectype", entity.ckrectype); row.SetField("checkno", entity.checkno); row.SetField("secure", entity.secure); row.SetField("recordLimit", entity.recordLimit); row.SetField("userfield", entity.userfield); }
public static Creccriteria BuildCreccriteriaFromRow(DataRow row) { Creccriteria entity = new Creccriteria(); entity.bankno = row.IsNull("bankno") ? 0 : row.Field <int>("bankno"); entity.ckrectype = row.IsNull("ckrectype") ? 0 : row.Field <int>("ckrectype"); entity.checkno = row.IsNull("checkno") ? decimal.Zero : row.Field <decimal>("checkno"); entity.secure = row.IsNull("secure") ? 0 : row.Field <int>("secure"); entity.recordLimit = row.IsNull("recordLimit") ? 0 : row.Field <int>("recordLimit"); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }