Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcepesavecriteria(ref DataRow row, Icepesavecriteria entity)
 {
     row.SetField("whse", entity.whse);
     row.SetField("prod", entity.prod);
     row.SetField("runno", entity.runno);
     row.SetField("ticketno", entity.ticketno);
     row.SetField("uticketno", entity.uticketno);
     row.SetField("qtycnt", entity.qtycnt);
     row.SetField("qtyexp", entity.qtyexp);
     row.SetField("uticketenabled", entity.uticketenabled);
     row.SetField("setnotcountedfl", entity.setnotcountedfl);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Icepesavecriteria BuildIcepesavecriteriaFromRow(DataRow row)
        {
            Icepesavecriteria entity = new Icepesavecriteria();

            entity.whse            = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            entity.prod            = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.runno           = row.IsNull("runno") ? 0 : row.Field <int>("runno");
            entity.ticketno        = row.IsNull("ticketno") ? 0 : row.Field <int>("ticketno");
            entity.uticketno       = row.IsNull("uticketno") ? 0 : row.Field <int>("uticketno");
            entity.qtycnt          = row.IsNull("qtycnt") ? decimal.Zero : row.Field <decimal>("qtycnt");
            entity.qtyexp          = row.IsNull("qtyexp") ? decimal.Zero : row.Field <decimal>("qtyexp");
            entity.uticketenabled  = row.Field <bool>("uticketenabled");
            entity.setnotcountedfl = row.Field <bool>("setnotcountedfl");
            entity.userfield       = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }