Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCheckprodxrefcriteria(ref DataRow row, Checkprodxrefcriteria entity)
 {
     row.SetField("prod", entity.prod);
     row.SetField("whse", entity.whse);
     row.SetField("type", entity.type);
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("vendno", entity.vendno);
     row.SetField("customparam", entity.customparam);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Checkprodxrefcriteria BuildCheckprodxrefcriteriaFromRow(DataRow row)
        {
            Checkprodxrefcriteria entity = new Checkprodxrefcriteria();

            entity.prod        = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.whse        = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.type        = row.IsNull("type") ? string.Empty : row.Field <string>("type");
            entity.custno      = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto      = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.vendno      = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.customparam = row.IsNull("customparam") ? string.Empty : row.Field <string>("customparam");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }