예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromLoadpoapdetailresults(ref DataRow row, Loadpoapdetailresults entity)
 {
     row.SetField("jrnlno", entity.jrnlno);
     row.SetField("setno", entity.setno);
     row.SetField("type", entity.type);
     row.SetField("apinvno", entity.apinvno);
     row.SetField("invdt", entity.invdt);
     row.SetField("paymtdt", entity.paymtdt);
     row.SetField("amount", entity.amount);
 }
예제 #2
0
        public static Loadpoapdetailresults BuildLoadpoapdetailresultsFromRow(DataRow row)
        {
            Loadpoapdetailresults entity = new Loadpoapdetailresults();

            entity.jrnlno  = row.IsNull("jrnlno") ? 0 : row.Field <int>("jrnlno");
            entity.setno   = row.IsNull("setno") ? 0 : row.Field <int>("setno");
            entity.type    = row.IsNull("type") ? string.Empty : row.Field <string>("type");
            entity.apinvno = row.IsNull("apinvno") ? string.Empty : row.Field <string>("apinvno");
            entity.invdt   = row.Field <DateTime?>("invdt");
            entity.paymtdt = row.Field <DateTime?>("paymtdt");
            entity.amount  = row.IsNull("amount") ? decimal.Zero : row.Field <decimal>("amount");
            return(entity);
        }