Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPderaddreceipt(ref DataRow row, Pderaddreceipt entity)
 {
     row.SetField("recordtype", entity.recordtype);
     row.SetField("claimno", entity.claimno);
     row.SetField("claimseqno", entity.claimseqno);
     row.SetField("statustype", entity.statustype);
     row.SetField("vendno", entity.vendno);
     row.SetField("divno", entity.divno);
     row.SetField("apinvno", entity.apinvno);
     row.SetField("receiptdt", entity.receiptdt);
     row.SetField("receiptamt", entity.receiptamt);
     row.SetField("sourcepros", entity.sourcepros);
     row.SetField("srcupdtty", entity.srcupdtty);
     row.SetField("refer", entity.refer);
     row.SetField("secure", entity.secure);
     row.SetField("vatamt", entity.vatamt);
     row.SetField("nettamt", entity.nettamt);
     row.SetField("userfield", entity.userfield);
 }
Example #2
0
        public static Pderaddreceipt BuildPderaddreceiptFromRow(DataRow row)
        {
            Pderaddreceipt entity = new Pderaddreceipt();

            entity.recordtype = row.IsNull("recordtype") ? string.Empty : row.Field <string>("recordtype");
            entity.claimno    = row.IsNull("claimno") ? 0 : row.Field <int>("claimno");
            entity.claimseqno = row.IsNull("claimseqno") ? 0 : row.Field <int>("claimseqno");
            entity.statustype = row.IsNull("statustype") ? string.Empty : row.Field <string>("statustype");
            entity.vendno     = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.divno      = row.IsNull("divno") ? 0 : row.Field <int>("divno");
            entity.apinvno    = row.IsNull("apinvno") ? string.Empty : row.Field <string>("apinvno");
            entity.receiptdt  = row.Field <DateTime?>("receiptdt");
            entity.receiptamt = row.IsNull("receiptamt") ? decimal.Zero : row.Field <decimal>("receiptamt");
            entity.sourcepros = row.IsNull("sourcepros") ? string.Empty : row.Field <string>("sourcepros");
            entity.srcupdtty  = row.IsNull("srcupdtty") ? string.Empty : row.Field <string>("srcupdtty");
            entity.refer      = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.secure     = row.IsNull("secure") ? 0 : row.Field <int>("secure");
            entity.vatamt     = row.IsNull("vatamt") ? decimal.Zero : row.Field <decimal>("vatamt");
            entity.nettamt    = row.IsNull("nettamt") ? decimal.Zero : row.Field <decimal>("nettamt");
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }