Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromApemaupdate(ref DataRow row, Apemaupdate entity)
 {
     row.SetField("vendno", entity.vendno);
     row.SetField("postdt", entity.postdt);
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("apinvno", entity.apinvno);
     row.SetField("proof", entity.proof);
     row.SetField("updatefl", entity.updatefl);
     row.SetField("divno", entity.divno);
     row.SetField("refer", entity.refer);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Apemaupdate BuildApemaupdateFromRow(DataRow row)
        {
            Apemaupdate entity = new Apemaupdate();

            entity.vendno    = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.postdt    = row.Field <DateTime?>("postdt");
            entity.jrnlno    = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno");
            entity.apinvno   = row.IsNull("apinvno") ? string.Empty : row.Field <string>("apinvno");
            entity.proof     = row.IsNull("proof") ? decimal.Zero : row.Field <decimal>("proof");
            entity.updatefl  = row.Field <bool>("updatefl");
            entity.divno     = row.IsNull("divno") ? 0 : row.Field <int>("divno");
            entity.refer     = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }