Exemple #1
0
        public static Itemlistcriteria BuildItemlistcriteriaFromRow(DataRow row)
        {
            Itemlistcriteria entity = new Itemlistcriteria();

            entity.coNum             = row.IsNull("co_num") ? string.Empty : row.Field <string>("co_num");
            entity.whNum             = row.IsNull("wh_num") ? string.Empty : row.Field <string>("wh_num");
            entity.absNum            = row.IsNull("abs_num") ? string.Empty : row.Field <string>("abs_num");
            entity.prodGrp           = row.IsNull("prod_grp") ? string.Empty : row.Field <string>("prod_grp");
            entity.upcNum            = row.IsNull("upc_num") ? string.Empty : row.Field <string>("upc_num");
            entity.whZone            = row.IsNull("wh_zone") ? string.Empty : row.Field <string>("wh_zone");
            entity.abc               = row.IsNull("abc") ? string.Empty : row.Field <string>("abc");
            entity.itemType          = row.IsNull("item_type") ? string.Empty : row.Field <string>("item_type");
            entity.checkMsds         = row.Field <bool>("check_msds");
            entity.msdsFlag          = row.Field <bool>("msds_flag");
            entity.checkSerial       = row.Field <bool>("check_serial");
            entity.serialFlag        = row.Field <bool>("serial_flag");
            entity.checkLot          = row.Field <bool>("check_lot");
            entity.lotCtrl           = row.Field <bool>("lot_ctrl");
            entity.checkKit          = row.Field <bool>("check_kit");
            entity.kitFlag           = row.Field <bool>("kit_flag");
            entity.kitType           = row.IsNull("kit_type") ? string.Empty : row.Field <string>("kit_type");
            entity.keywords          = row.IsNull("keywords") ? string.Empty : row.Field <string>("keywords");
            entity.itemlistuserfield = row.IsNull("itemlistuserfield") ? string.Empty : row.Field <string>("itemlistuserfield");
            entity.recordlimit       = row.IsNull("recordlimit") ? 0 : row.Field <int>("recordlimit");
            entity.userfield         = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
Exemple #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromItemlistcriteria(ref DataRow row, Itemlistcriteria entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("abs_num", entity.absNum);
     row.SetField("prod_grp", entity.prodGrp);
     row.SetField("upc_num", entity.upcNum);
     row.SetField("wh_zone", entity.whZone);
     row.SetField("abc", entity.abc);
     row.SetField("item_type", entity.itemType);
     row.SetField("check_msds", entity.checkMsds);
     row.SetField("msds_flag", entity.msdsFlag);
     row.SetField("check_serial", entity.checkSerial);
     row.SetField("serial_flag", entity.serialFlag);
     row.SetField("check_lot", entity.checkLot);
     row.SetField("lot_ctrl", entity.lotCtrl);
     row.SetField("check_kit", entity.checkKit);
     row.SetField("kit_flag", entity.kitFlag);
     row.SetField("kit_type", entity.kitType);
     row.SetField("keywords", entity.keywords);
     row.SetField("itemlistuserfield", entity.itemlistuserfield);
     row.SetField("recordlimit", entity.recordlimit);
     row.SetField("userfield", entity.userfield);
 }