示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromApeiinvdetpolnproof(ref DataRow row, Apeiinvdetpolnproof entity)
 {
     row.SetField("proctype", entity.proctype);
     row.SetField("pono", entity.pono);
     row.SetField("posuf", entity.posuf);
     row.SetField("pototinvamt", entity.pototinvamt);
     row.SetField("pototqtyord", entity.pototqtyord);
     row.SetField("uncostamt", entity.uncostamt);
     row.SetField("uncostqty", entity.uncostqty);
     row.SetField("invproof", entity.invproof);
     row.SetField("addonproof", entity.addonproof);
     row.SetField("addonamt", entity.addonamt);
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Apeiinvdetpolnproof BuildApeiinvdetpolnproofFromRow(DataRow row)
        {
            Apeiinvdetpolnproof entity = new Apeiinvdetpolnproof();

            entity.proctype    = row.IsNull("proctype") ? string.Empty : row.Field <string>("proctype");
            entity.pono        = row.IsNull("pono") ? 0 : row.Field <int>("pono");
            entity.posuf       = row.IsNull("posuf") ? 0 : row.Field <int>("posuf");
            entity.pototinvamt = row.IsNull("pototinvamt") ? decimal.Zero : row.Field <decimal>("pototinvamt");
            entity.pototqtyord = row.IsNull("pototqtyord") ? decimal.Zero : row.Field <decimal>("pototqtyord");
            entity.uncostamt   = row.IsNull("uncostamt") ? decimal.Zero : row.Field <decimal>("uncostamt");
            entity.uncostqty   = row.IsNull("uncostqty") ? decimal.Zero : row.Field <decimal>("uncostqty");
            entity.invproof    = row.IsNull("invproof") ? decimal.Zero : row.Field <decimal>("invproof");
            entity.addonproof  = row.IsNull("addonproof") ? decimal.Zero : row.Field <decimal>("addonproof");
            entity.addonamt    = row.IsNull("addonamt") ? decimal.Zero : row.Field <decimal>("addonamt");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }