Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCommentsmnt(ref DataRow row, Commentsmnt entity)
 {
     row.SetField("cono", entity.cono);
     row.SetField("transtype", entity.transtype);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("lineno", entity.lineno);
     row.SetField("printfl", entity.printfl);
     row.SetField("comment", entity.comment);
 }
Example #2
0
        public static Commentsmnt BuildCommentsmntFromRow(DataRow row)
        {
            Commentsmnt entity = new Commentsmnt();

            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.lineno    = row.IsNull("lineno") ? 0 : row.Field <int>("lineno");
            entity.printfl   = row.Field <bool>("printfl");
            entity.comment   = row.IsNull("comment") ? string.Empty : row.Field <string>("comment");
            return(entity);
        }