Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcsebcompnew(ref DataRow row, Icsebcompnew entity)
 {
     row.SetField("shipprod", entity.shipprod);
     row.SetField("descrip", entity.descrip);
     row.SetField("ICSpecRecNo", entity.iCSpecRecNo);
     row.SetField("quantity", entity.quantity);
     row.SetField("length", entity.length);
     row.SetField("mode", entity.mode);
     row.SetField("qtyship", entity.qtyship);
     row.SetField("qtyord", entity.qtyord);
     row.SetField("qtyavail", entity.qtyavail);
     row.SetField("seqno", entity.seqno);
     row.SetField("compseqno", entity.compseqno);
     row.SetField("lqtyerr", entity.lqtyerr);
     row.SetField("ldelayresrvfl", entity.ldelayresrvfl);
     row.SetField("origprod", entity.origprod);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Icsebcompnew BuildIcsebcompnewFromRow(DataRow row)
        {
            Icsebcompnew entity = new Icsebcompnew();

            entity.shipprod      = row.IsNull("shipprod") ? string.Empty : row.Field <string>("shipprod");
            entity.descrip       = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.iCSpecRecNo   = row.IsNull("ICSpecRecNo") ? 0 : row.Field <int>("ICSpecRecNo");
            entity.quantity      = row.IsNull("quantity") ? 0 : row.Field <int>("quantity");
            entity.length        = row.IsNull("length") ? 0 : row.Field <int>("length");
            entity.mode          = row.IsNull("mode") ? string.Empty : row.Field <string>("mode");
            entity.qtyship       = row.IsNull("qtyship") ? 0 : row.Field <int>("qtyship");
            entity.qtyord        = row.IsNull("qtyord") ? decimal.Zero : row.Field <decimal>("qtyord");
            entity.qtyavail      = row.IsNull("qtyavail") ? 0 : row.Field <int>("qtyavail");
            entity.seqno         = row.IsNull("seqno") ? 0 : row.Field <int>("seqno");
            entity.compseqno     = row.IsNull("compseqno") ? 0 : row.Field <int>("compseqno");
            entity.lqtyerr       = row.Field <bool>("lqtyerr");
            entity.ldelayresrvfl = row.Field <bool>("ldelayresrvfl");
            entity.origprod      = row.IsNull("origprod") ? string.Empty : row.Field <string>("origprod");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }