Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromNotesmnt(ref DataRow row, Notesmnt entity)
 {
     row.SetField("cono", entity.cono);
     row.SetField("transtype", entity.transtype);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("vendno", entity.vendno);
     row.SetField("prod", entity.prod);
     row.SetField("noteline", entity.noteline);
     row.SetField("pageno", entity.pageno);
     row.SetField("printfl", entity.printfl);
 }
Exemple #2
0
        public static Notesmnt BuildNotesmntFromRow(DataRow row)
        {
            Notesmnt entity = new Notesmnt();

            entity.cono      = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.transtype = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.orderno   = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf  = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.custno    = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto    = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.vendno    = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.prod      = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.noteline  = row.IsNull("noteline") ? string.Empty : row.Field <string>("noteline");
            entity.pageno    = row.IsNull("pageno") ? 0 : row.Field <int>("pageno");
            entity.printfl   = row.Field <bool>("printfl");
            return(entity);
        }