Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromTenderingglhist(ref DataRow row, Tenderingglhist entity)
 {
     row.SetField("cono", entity.cono);
     row.SetField("invno", entity.invno);
     row.SetField("transcd", entity.transcd);
     row.SetField("mediacd", entity.mediacd);
     row.SetField("amount", entity.amount);
     row.SetField("postdt", entity.postdt);
     row.SetField("setno", entity.setno);
     row.SetField("transno", entity.transno);
     row.SetField("invsuf", entity.invsuf);
     row.SetField("refer", entity.refer);
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("charmediaauth", entity.charmediaauth);
     row.SetField("checkno", entity.checkno);
     row.SetField("transtm", entity.transtm);
     row.SetField("transdesc", entity.transdesc);
     row.SetField("userfield", entity.userfield);
 }
Esempio n. 2
0
        public static Tenderingglhist BuildTenderingglhistFromRow(DataRow row)
        {
            Tenderingglhist entity = new Tenderingglhist();

            entity.cono          = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.invno         = row.IsNull("invno") ? 0 : row.Field <int>("invno");
            entity.transcd       = row.IsNull("transcd") ? 0 : row.Field <int>("transcd");
            entity.mediacd       = row.IsNull("mediacd") ? 0 : row.Field <int>("mediacd");
            entity.amount        = row.IsNull("amount") ? decimal.Zero : row.Field <decimal>("amount");
            entity.postdt        = row.Field <DateTime?>("postdt");
            entity.setno         = row.IsNull("setno") ? 0 : row.Field <int>("setno");
            entity.transno       = row.IsNull("transno") ? 0 : row.Field <int>("transno");
            entity.invsuf        = row.IsNull("invsuf") ? 0 : row.Field <int>("invsuf");
            entity.refer         = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.jrnlno        = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno");
            entity.charmediaauth = row.IsNull("charmediaauth") ? string.Empty : row.Field <string>("charmediaauth");
            entity.checkno       = row.IsNull("checkno") ? 0 : row.Field <int>("checkno");
            entity.transtm       = row.IsNull("transtm") ? string.Empty : row.Field <string>("transtm");
            entity.transdesc     = row.IsNull("transdesc") ? string.Empty : row.Field <string>("transdesc");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }