Exemple #1
0
      /// <summary>
      /// Update a database row from a class
      /// </summary>
      public static void UpdateRowFromIcscupdpd(ref DataRow row, Icscupdpd entity)
      {
         row.SetField("catalog", entity.catalog);
         row.SetField("oSpeccostty", entity.oSpeccostty);
         row.SetField("oCsunperstk", entity.oCsunperstk);
         row.SetField("oPrccostper", entity.oPrccostper);
         row.SetField("nSpeccostty", entity.nSpeccostty);
         row.SetField("nCsunperstk", entity.nCsunperstk);
         row.SetField("nPrccostper", entity.nPrccostper);
         row.SetField("lUpdate", entity.lUpdate);
         row.SetField("userfield", entity.userfield);

      }
Exemple #2
0
 public static Icscupdpd BuildIcscupdpdFromRow(DataRow row)
 {
    Icscupdpd entity = new Icscupdpd();
    entity.catalog = row.IsNull("catalog") ? string.Empty : row.Field<string>("catalog");
    entity.oSpeccostty = row.IsNull("oSpeccostty") ? string.Empty : row.Field<string>("oSpeccostty");
    entity.oCsunperstk = row.IsNull("oCsunperstk") ? decimal.Zero : row.Field<decimal>("oCsunperstk");
    entity.oPrccostper = row.IsNull("oPrccostper") ? string.Empty : row.Field<string>("oPrccostper");
    entity.nSpeccostty = row.IsNull("nSpeccostty") ? string.Empty : row.Field<string>("nSpeccostty");
    entity.nCsunperstk = row.IsNull("nCsunperstk") ? decimal.Zero : row.Field<decimal>("nCsunperstk");
    entity.nPrccostper = row.IsNull("nPrccostper") ? string.Empty : row.Field<string>("nPrccostper");
    entity.lUpdate = row.Field<bool>("lUpdate");
    entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field<string>("userfield");
    return entity;
 }