示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOetenderhistoryresults(ref DataRow row, Oetenderhistoryresults 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("mediaauth", entity.mediaauth);
     row.SetField("checkno", entity.checkno);
     row.SetField("transtm", entity.transtm);
     row.SetField("paymentdesc", entity.paymentdesc);
 }
示例#2
0
        public static Oetenderhistoryresults BuildOetenderhistoryresultsFromRow(DataRow row)
        {
            Oetenderhistoryresults entity = new Oetenderhistoryresults();

            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.mediaauth   = row.IsNull("mediaauth") ? string.Empty : row.Field <string>("mediaauth");
            entity.checkno     = row.IsNull("checkno") ? decimal.Zero : row.Field <decimal>("checkno");
            entity.transtm     = row.IsNull("transtm") ? string.Empty : row.Field <string>("transtm");
            entity.paymentdesc = row.IsNull("paymentdesc") ? string.Empty : row.Field <string>("paymentdesc");
            return(entity);
        }