Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPdspnpupdcriteria(ref DataRow row, Pdspnpupdcriteria entity)
 {
     row.SetField("iRecno", entity.iRecno);
     row.SetField("cLevelcd", entity.cLevelcd);
     row.SetField("enddt", entity.enddt);
     row.SetField("statustype", entity.statustype);
     row.SetField("npcd", entity.npcd);
     row.SetField("descrip", entity.descrip);
     row.SetField("allowretfl", entity.allowretfl);
     row.SetField("programonlyfl", entity.programonlyfl);
     row.SetField("npcomcalctype", entity.npcomcalctype);
     row.SetField("npcombasedon", entity.npcombasedon);
     row.SetField("npcomamt", entity.npcomamt);
     row.SetField("npcomprod", entity.npcomprod);
     row.SetField("npcommtype", entity.npcommtype);
     row.SetField("user1", entity.user1);
     row.SetField("user2", entity.user2);
     row.SetField("user3", entity.user3);
     row.SetField("user4", entity.user4);
     row.SetField("user5", entity.user5);
     row.SetField("user6", entity.user6);
     row.SetField("user7", entity.user7);
     row.SetField("user8", entity.user8);
     row.SetField("user9", entity.user9);
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Pdspnpupdcriteria BuildPdspnpupdcriteriaFromRow(DataRow row)
        {
            Pdspnpupdcriteria entity = new Pdspnpupdcriteria();

            entity.iRecno        = row.IsNull("iRecno") ? 0 : row.Field <int>("iRecno");
            entity.cLevelcd      = row.IsNull("cLevelcd") ? string.Empty : row.Field <string>("cLevelcd");
            entity.enddt         = row.Field <DateTime?>("enddt");
            entity.statustype    = row.Field <bool>("statustype");
            entity.npcd          = row.IsNull("npcd") ? string.Empty : row.Field <string>("npcd");
            entity.descrip       = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.allowretfl    = row.Field <bool>("allowretfl");
            entity.programonlyfl = row.Field <bool>("programonlyfl");
            entity.npcomcalctype = row.IsNull("npcomcalctype") ? string.Empty : row.Field <string>("npcomcalctype");
            entity.npcombasedon  = row.IsNull("npcombasedon") ? string.Empty : row.Field <string>("npcombasedon");
            entity.npcomamt      = row.IsNull("npcomamt") ? decimal.Zero : row.Field <decimal>("npcomamt");
            entity.npcomprod     = row.IsNull("npcomprod") ? string.Empty : row.Field <string>("npcomprod");
            entity.npcommtype    = row.IsNull("npcommtype") ? string.Empty : row.Field <string>("npcommtype");
            entity.user1         = row.IsNull("user1") ? string.Empty : row.Field <string>("user1");
            entity.user2         = row.IsNull("user2") ? string.Empty : row.Field <string>("user2");
            entity.user3         = row.IsNull("user3") ? string.Empty : row.Field <string>("user3");
            entity.user4         = row.IsNull("user4") ? string.Empty : row.Field <string>("user4");
            entity.user5         = row.IsNull("user5") ? string.Empty : row.Field <string>("user5");
            entity.user6         = row.Field <decimal?>("user6");
            entity.user7         = row.Field <decimal?>("user7");
            entity.user8         = row.Field <DateTime?>("user8");
            entity.user9         = row.Field <DateTime?>("user9");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }