Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPtxsrpcatlist(ref DataRow row, Ptxsrpcatlist entity)
 {
     row.SetField("keytype", entity.keytype);
     row.SetField("vendno", entity.vendno);
     row.SetField("shipfmno", entity.shipfmno);
     row.SetField("srcrowpointer", entity.srcrowpointer);
     row.SetField("custrowpointer", entity.custrowpointer);
     row.SetField("shiptorowpointer", entity.shiptorowpointer);
     row.SetField("custno", entity.custno);
     row.SetField("custnotesfl", entity.custnotesfl);
     row.SetField("custname", entity.custname);
     row.SetField("shipto", entity.shipto);
     row.SetField("arssnotesfl", entity.arssnotesfl);
     row.SetField("prodcat", entity.prodcat);
     row.SetField("prodcatdesc", entity.prodcatdesc);
     row.SetField("vendnotesfl", entity.vendnotesfl);
     row.SetField("vendname", entity.vendname);
     row.SetField("hierarchy", entity.hierarchy);
     row.SetField("ptxrouterulerowid", entity.ptxrouterulerowid.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Ptxsrpcatlist BuildPtxsrpcatlistFromRow(DataRow row)
        {
            Ptxsrpcatlist entity = new Ptxsrpcatlist();

            entity.keytype           = row.IsNull("keytype") ? string.Empty : row.Field <string>("keytype");
            entity.vendno            = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.shipfmno          = row.IsNull("shipfmno") ? 0 : row.Field <int>("shipfmno");
            entity.srcrowpointer     = row.IsNull("srcrowpointer") ? string.Empty : row.Field <string>("srcrowpointer");
            entity.custrowpointer    = row.IsNull("custrowpointer") ? string.Empty : row.Field <string>("custrowpointer");
            entity.shiptorowpointer  = row.IsNull("shiptorowpointer") ? string.Empty : row.Field <string>("shiptorowpointer");
            entity.custno            = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.custnotesfl       = row.IsNull("custnotesfl") ? string.Empty : row.Field <string>("custnotesfl");
            entity.custname          = row.IsNull("custname") ? string.Empty : row.Field <string>("custname");
            entity.shipto            = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.arssnotesfl       = row.IsNull("arssnotesfl") ? string.Empty : row.Field <string>("arssnotesfl");
            entity.prodcat           = row.IsNull("prodcat") ? string.Empty : row.Field <string>("prodcat");
            entity.prodcatdesc       = row.IsNull("prodcatdesc") ? string.Empty : row.Field <string>("prodcatdesc");
            entity.vendnotesfl       = row.IsNull("vendnotesfl") ? string.Empty : row.Field <string>("vendnotesfl");
            entity.vendname          = row.IsNull("vendname") ? string.Empty : row.Field <string>("vendname");
            entity.hierarchy         = row.IsNull("hierarchy") ? 0 : row.Field <int>("hierarchy");
            entity.ptxrouterulerowid = row.Field <byte[]>("ptxrouterulerowid").ToStringEncoded();
            entity.userfield         = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }