예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromGlvalidateparse(ref DataRow row, Glvalidateparse entity)
 {
     row.SetField("glno", entity.glno);
     row.SetField("yr", entity.yr);
     row.SetField("gldivno", entity.gldivno);
     row.SetField("gldeptno", entity.gldeptno);
     row.SetField("glacctno", entity.glacctno);
     row.SetField("glsubno", entity.glsubno);
     row.SetField("gltitle", entity.gltitle);
     row.SetField("glsarowid", entity.glsarowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Glvalidateparse BuildGlvalidateparseFromRow(DataRow row)
        {
            Glvalidateparse entity = new Glvalidateparse();

            entity.glno      = row.IsNull("glno") ? string.Empty : row.Field <string>("glno");
            entity.yr        = row.IsNull("yr") ? 0 : row.Field <int>("yr");
            entity.gldivno   = row.IsNull("gldivno") ? 0 : row.Field <int>("gldivno");
            entity.gldeptno  = row.IsNull("gldeptno") ? 0 : row.Field <int>("gldeptno");
            entity.glacctno  = row.IsNull("glacctno") ? 0 : row.Field <int>("glacctno");
            entity.glsubno   = row.IsNull("glsubno") ? 0 : row.Field <int>("glsubno");
            entity.gltitle   = row.IsNull("gltitle") ? string.Empty : row.Field <string>("gltitle");
            entity.glsarowid = row.Field <byte[]>("glsarowid").ToStringEncoded();
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }