Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromGliatransresults(ref DataRow row, Gliatransresults entity)
 {
     row.SetField("gldivno", entity.gldivno);
     row.SetField("gldeptno", entity.gldeptno);
     row.SetField("glacctno", entity.glacctno);
     row.SetField("glsubno", entity.glsubno);
     row.SetField("postdt", entity.postdt);
     row.SetField("perfisc", entity.perfisc);
     row.SetField("percal", entity.percal);
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("setno", entity.setno);
     row.SetField("dGLPostDt", entity.dGLPostDt);
     row.SetField("referfl", entity.referfl);
     row.SetField("transno", entity.transno);
     row.SetField("CurrProc", entity.currProc);
     row.SetField("operinit", entity.operinit);
     row.SetField("cCheckno", entity.cCheckno);
     row.SetField("cUpDglTy", entity.cUpDglTy);
     row.SetField("cTransCd", entity.cTransCd);
     row.SetField("dAmount", entity.dAmount);
     row.SetField("cRefer", entity.cRefer);
     row.SetField("cInvNo", entity.cInvNo);
     row.SetField("cLookUpNm", entity.cLookUpNm);
     row.SetField("cBacsRef", entity.cBacsRef);
     row.SetField("userfield", entity.userfield);
     row.SetField("rowid-glet", entity.rowidGlet.ToByteArray());
 }
Ejemplo n.º 2
0
        public static Gliatransresults BuildGliatransresultsFromRow(DataRow row)
        {
            Gliatransresults entity = new Gliatransresults();

            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.postdt    = row.Field <DateTime?>("postdt");
            entity.perfisc   = row.IsNull("perfisc") ? 0 : row.Field <int>("perfisc");
            entity.percal    = row.IsNull("percal") ? 0 : row.Field <int>("percal");
            entity.jrnlno    = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno");
            entity.setno     = row.IsNull("setno") ? 0 : row.Field <int>("setno");
            entity.dGLPostDt = row.Field <DateTime?>("dGLPostDt");
            entity.referfl   = row.Field <bool>("referfl");
            entity.transno   = row.IsNull("transno") ? 0 : row.Field <int>("transno");
            entity.currProc  = row.IsNull("CurrProc") ? string.Empty : row.Field <string>("CurrProc");
            entity.operinit  = row.IsNull("operinit") ? string.Empty : row.Field <string>("operinit");
            entity.cCheckno  = row.IsNull("cCheckno") ? string.Empty : row.Field <string>("cCheckno");
            entity.cUpDglTy  = row.IsNull("cUpDglTy") ? string.Empty : row.Field <string>("cUpDglTy");
            entity.cTransCd  = row.IsNull("cTransCd") ? string.Empty : row.Field <string>("cTransCd");
            entity.dAmount   = row.IsNull("dAmount") ? decimal.Zero : row.Field <decimal>("dAmount");
            entity.cRefer    = row.IsNull("cRefer") ? string.Empty : row.Field <string>("cRefer");
            entity.cInvNo    = row.IsNull("cInvNo") ? string.Empty : row.Field <string>("cInvNo");
            entity.cLookUpNm = row.IsNull("cLookUpNm") ? string.Empty : row.Field <string>("cLookUpNm");
            entity.cBacsRef  = row.IsNull("cBacsRef") ? string.Empty : row.Field <string>("cBacsRef");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            entity.rowidGlet = row.Field <byte[]>("rowid-glet").ToStringEncoded();
            return(entity);
        }