Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromGletentrycriteria(ref DataRow row, Gletentrycriteria entity)
 {
     row.SetField("batchnm", entity.batchnm);
     row.SetField("glno", entity.glno);
     row.SetField("amount", entity.amount);
     row.SetField("entrytype", entity.entrytype);
     row.SetField("refer", entity.refer);
     row.SetField("entDate", entity.entDate);
     row.SetField("crthist", entity.crthist);
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("setno", entity.setno);
     row.SetField("seqno", entity.seqno);
     row.SetField("transcd", entity.transcd);
     row.SetField("bankno", entity.bankno);
     row.SetField("crtype", entity.crtype);
     row.SetField("clearfl", entity.clearfl);
     row.SetField("custno", entity.custno);
     row.SetField("vendno", entity.vendno);
     row.SetField("invnoar", entity.invnoar);
     row.SetField("invsufar", entity.invsufar);
     row.SetField("apinvno", entity.apinvno);
     row.SetField("checkno", entity.checkno);
     row.SetField("glebt-recid", entity.glebtRecid);
     row.SetField("lholdfl", entity.lholdfl);
     row.SetField("updcancel", entity.updcancel);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Gletentrycriteria BuildGletentrycriteriaFromRow(DataRow row)
        {
            Gletentrycriteria entity = new Gletentrycriteria();

            entity.batchnm    = row.IsNull("batchnm") ? string.Empty : row.Field <string>("batchnm");
            entity.glno       = row.IsNull("glno") ? string.Empty : row.Field <string>("glno");
            entity.amount     = row.IsNull("amount") ? decimal.Zero : row.Field <decimal>("amount");
            entity.entrytype  = row.IsNull("entrytype") ? string.Empty : row.Field <string>("entrytype");
            entity.refer      = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.entDate    = row.Field <DateTime?>("entDate");
            entity.crthist    = row.Field <bool>("crthist");
            entity.jrnlno     = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno");
            entity.setno      = row.IsNull("setno") ? 0 : row.Field <int>("setno");
            entity.seqno      = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.transcd    = row.IsNull("transcd") ? 0 : row.Field <int>("transcd");
            entity.bankno     = row.IsNull("bankno") ? 0 : row.Field <int>("bankno");
            entity.crtype     = row.IsNull("crtype") ? 0 : row.Field <int>("crtype");
            entity.clearfl    = row.Field <bool>("clearfl");
            entity.custno     = row.IsNull("custno") ? 0 : row.Field <int>("custno");
            entity.vendno     = row.IsNull("vendno") ? 0 : row.Field <int>("vendno");
            entity.invnoar    = row.IsNull("invnoar") ? 0 : row.Field <int>("invnoar");
            entity.invsufar   = row.IsNull("invsufar") ? 0 : row.Field <int>("invsufar");
            entity.apinvno    = row.IsNull("apinvno") ? string.Empty : row.Field <string>("apinvno");
            entity.checkno    = row.IsNull("checkno") ? 0 : row.Field <int>("checkno");
            entity.glebtRecid = row.IsNull("glebt-recid") ? 0 : row.Field <long>("glebt-recid");
            entity.lholdfl    = row.Field <bool>("lholdfl");
            entity.updcancel  = row.Field <bool>("updcancel");
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }