Esempio n. 1
0
      /// <summary>
      /// Update a database row from a class
      /// </summary>
      public static void UpdateRowFromArelearetcriteria(ref DataRow row, Arelearetcriteria entity)
      {
         row.SetField("custno", entity.custno);
         row.SetField("transcd", entity.transcd);
         row.SetField("transcddesc", entity.transcddesc);
         row.SetField("invno", entity.invno);
         row.SetField("invsuf", entity.invsuf);
         row.SetField("invdt", entity.invdt);
         row.SetField("invamt", entity.invamt);
         row.SetField("type", entity.type);
         row.SetField("originvno", entity.originvno);
         row.SetField("originvsuf", entity.originvsuf);
         row.SetField("origapplyamt", entity.origapplyamt);
         row.SetField("recordcountlimit", entity.recordcountlimit);
         row.SetField("userfield", entity.userfield);

      }
Esempio n. 2
0
 public static Arelearetcriteria BuildArelearetcriteriaFromRow(DataRow row)
 {
    Arelearetcriteria entity = new Arelearetcriteria();
    entity.custno = row.IsNull("custno") ? decimal.Zero : row.Field<decimal>("custno");
    entity.transcd = row.IsNull("transcd") ? 0 : row.Field<int>("transcd");
    entity.transcddesc = row.IsNull("transcddesc") ? string.Empty : row.Field<string>("transcddesc");
    entity.invno = row.IsNull("invno") ? 0 : row.Field<int>("invno");
    entity.invsuf = row.IsNull("invsuf") ? 0 : row.Field<int>("invsuf");
    entity.invdt = row.Field<DateTime?>("invdt");
    entity.invamt = row.IsNull("invamt") ? decimal.Zero : row.Field<decimal>("invamt");
    entity.type = row.IsNull("type") ? string.Empty : row.Field<string>("type");
    entity.originvno = row.IsNull("originvno") ? 0 : row.Field<int>("originvno");
    entity.originvsuf = row.IsNull("originvsuf") ? 0 : row.Field<int>("originvsuf");
    entity.origapplyamt = row.IsNull("origapplyamt") ? decimal.Zero : row.Field<decimal>("origapplyamt");
    entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field<int>("recordcountlimit");
    entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field<string>("userfield");
    return entity;
 }