Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromWlitorderlinecriteria(ref DataRow row, Wlitorderlinecriteria entity)
 {
     row.SetField("cono", entity.cono);
     row.SetField("whse", entity.whse);
     row.SetField("setno", entity.setno);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("ordertype", entity.ordertype);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Wlitorderlinecriteria BuildWlitorderlinecriteriaFromRow(DataRow row)
        {
            Wlitorderlinecriteria entity = new Wlitorderlinecriteria();

            entity.cono      = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.whse      = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.setno     = row.IsNull("setno") ? string.Empty : row.Field <string>("setno");
            entity.orderno   = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf  = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.ordertype = row.IsNull("ordertype") ? string.Empty : row.Field <string>("ordertype");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }