Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCcimpact(ref DataRow row, Ccimpact entity)
 {
     row.SetField("co_num", entity.coNum);
     row.SetField("wh_num", entity.whNum);
     row.SetField("emp_num", entity.empNum);
     row.SetField("i_num_items", entity.iNumItems);
     row.SetField("i_num_inv", entity.iNumInv);
     row.SetField("iEmptyBins", entity.iEmptyBins);
     row.SetField("i_bin_in_wv", entity.iBinInWv);
     row.SetField("i_itm_in_wv", entity.iItmInWv);
     row.SetField("iEmptyInWave", entity.iEmptyInWave);
     row.SetField("i_inv_in_wv", entity.iInvInWv);
     row.SetField("lSerialOkay", entity.lSerialOkay);
     row.SetField("cBadSerialItem", entity.cBadSerialItem);
     row.SetField("LotsExist", entity.lotsExist);
     row.SetField("build_type_lot", entity.buildTypeLot);
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Ccimpact BuildCcimpactFromRow(DataRow row)
        {
            Ccimpact entity = new Ccimpact();

            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.empNum         = row.IsNull("emp_num") ? string.Empty : row.Field <string>("emp_num");
            entity.iNumItems      = row.IsNull("i_num_items") ? 0 : row.Field <int>("i_num_items");
            entity.iNumInv        = row.IsNull("i_num_inv") ? 0 : row.Field <int>("i_num_inv");
            entity.iEmptyBins     = row.IsNull("iEmptyBins") ? 0 : row.Field <int>("iEmptyBins");
            entity.iBinInWv       = row.IsNull("i_bin_in_wv") ? 0 : row.Field <int>("i_bin_in_wv");
            entity.iItmInWv       = row.IsNull("i_itm_in_wv") ? 0 : row.Field <int>("i_itm_in_wv");
            entity.iEmptyInWave   = row.IsNull("iEmptyInWave") ? 0 : row.Field <int>("iEmptyInWave");
            entity.iInvInWv       = row.IsNull("i_inv_in_wv") ? 0 : row.Field <int>("i_inv_in_wv");
            entity.lSerialOkay    = row.Field <bool>("lSerialOkay");
            entity.cBadSerialItem = row.IsNull("cBadSerialItem") ? string.Empty : row.Field <string>("cBadSerialItem");
            entity.lotsExist      = row.Field <bool>("LotsExist");
            entity.buildTypeLot   = row.IsNull("build_type_lot") ? string.Empty : row.Field <string>("build_type_lot");
            entity.userfield      = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }