예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPorrarreptrefreshdocrepts(ref DataRow row, Porrarreptrefreshdocrepts entity)
 {
     row.SetField("rowid-poerah", entity.rowidPoerah.ToByteArray());
     row.SetField("pcttarget", entity.pcttarget);
     row.SetField("totlineamtd", entity.totlineamtd);
     row.SetField("totcubesd", entity.totcubesd);
     row.SetField("totweightd", entity.totweightd);
     row.SetField("totqtyordd", entity.totqtyordd);
     row.SetField("totlineamti", entity.totlineamti);
     row.SetField("totcubesi", entity.totcubesi);
     row.SetField("totweighti", entity.totweighti);
     row.SetField("totqtyordi", entity.totqtyordi);
     row.SetField("purchprio", entity.purchprio);
     row.SetField("pridesc", entity.pridesc);
     row.SetField("totties", entity.totties);
 }
예제 #2
0
        public static Porrarreptrefreshdocrepts BuildPorrarreptrefreshdocreptsFromRow(DataRow row)
        {
            Porrarreptrefreshdocrepts entity = new Porrarreptrefreshdocrepts();

            entity.rowidPoerah = row.Field <byte[]>("rowid-poerah").ToStringEncoded();
            entity.pcttarget   = row.IsNull("pcttarget") ? 0 : row.Field <int>("pcttarget");
            entity.totlineamtd = row.IsNull("totlineamtd") ? decimal.Zero : row.Field <decimal>("totlineamtd");
            entity.totcubesd   = row.IsNull("totcubesd") ? decimal.Zero : row.Field <decimal>("totcubesd");
            entity.totweightd  = row.IsNull("totweightd") ? decimal.Zero : row.Field <decimal>("totweightd");
            entity.totqtyordd  = row.IsNull("totqtyordd") ? decimal.Zero : row.Field <decimal>("totqtyordd");
            entity.totlineamti = row.IsNull("totlineamti") ? 0 : row.Field <int>("totlineamti");
            entity.totcubesi   = row.IsNull("totcubesi") ? 0 : row.Field <int>("totcubesi");
            entity.totweighti  = row.IsNull("totweighti") ? 0 : row.Field <int>("totweighti");
            entity.totqtyordi  = row.IsNull("totqtyordi") ? 0 : row.Field <int>("totqtyordi");
            entity.purchprio   = row.IsNull("purchprio") ? string.Empty : row.Field <string>("purchprio");
            entity.pridesc     = row.IsNull("pridesc") ? string.Empty : row.Field <string>("pridesc");
            entity.totties     = row.IsNull("totties") ? 0 : row.Field <int>("totties");
            return(entity);
        }