예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromEtccdoclistoecriteria(ref DataRow row, Etccdoclistoecriteria entity)
 {
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("custpo", entity.custpo);
     row.SetField("whse", entity.whse);
     row.SetField("approvty", entity.approvty);
     row.SetField("slsrepout", entity.slsrepout);
     row.SetField("slsrepin", entity.slsrepin);
     row.SetField("duedt", entity.duedt);
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Etccdoclistoecriteria BuildEtccdoclistoecriteriaFromRow(DataRow row)
        {
            Etccdoclistoecriteria entity = new Etccdoclistoecriteria();

            entity.custno    = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto    = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.orderno   = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf  = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.custpo    = row.IsNull("custpo") ? string.Empty : row.Field <string>("custpo");
            entity.whse      = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.approvty  = row.IsNull("approvty") ? string.Empty : row.Field <string>("approvty");
            entity.slsrepout = row.IsNull("slsrepout") ? string.Empty : row.Field <string>("slsrepout");
            entity.slsrepin  = row.IsNull("slsrepin") ? string.Empty : row.Field <string>("slsrepin");
            entity.duedt     = row.Field <DateTime?>("duedt");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }