Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromApvendorglfetchresults(ref DataRow row, Apvendorglfetchresults entity)
 {
     row.SetField("vendno", entity.vendno);
     row.SetField("apcontrolglacct", entity.apcontrolglacct);
     row.SetField("apcontrolglacctdesc", entity.apcontrolglacctdesc);
     row.SetField("bankglacct", entity.bankglacct);
     row.SetField("bankglacctdesc", entity.bankglacctdesc);
     row.SetField("discountglacct", entity.discountglacct);
     row.SetField("discountglacctdesc", entity.discountglacctdesc);
     row.SetField("expense1glacct", entity.expense1glacct);
     row.SetField("expense1glacctdesc", entity.expense1glacctdesc);
     row.SetField("expense2glacct", entity.expense2glacct);
     row.SetField("expense2glacctdesc", entity.expense2glacctdesc);
     row.SetField("expense3glacct", entity.expense3glacct);
     row.SetField("expense3glacctdesc", entity.expense3glacctdesc);
     row.SetField("expense1glacct2", entity.expense1glacct2);
     row.SetField("expense1glacct2desc", entity.expense1glacct2desc);
     row.SetField("expense2glacct2", entity.expense2glacct2);
     row.SetField("expense2glacct2desc", entity.expense2glacct2desc);
     row.SetField("user1", entity.user1);
     row.SetField("user2", entity.user2);
     row.SetField("user3", entity.user3);
     row.SetField("user4", entity.user4);
     row.SetField("user5", entity.user5);
     row.SetField("user6", entity.user6);
     row.SetField("user7", entity.user7);
     row.SetField("user8", entity.user8);
     row.SetField("user9", entity.user9);
     row.SetField("rowid-arsc", entity.rowidArsc.ToByteArray());
 }
Exemple #2
0
        public static Apvendorglfetchresults BuildApvendorglfetchresultsFromRow(DataRow row)
        {
            Apvendorglfetchresults entity = new Apvendorglfetchresults();

            entity.vendno              = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.apcontrolglacct     = row.IsNull("apcontrolglacct") ? string.Empty : row.Field <string>("apcontrolglacct");
            entity.apcontrolglacctdesc = row.IsNull("apcontrolglacctdesc") ? string.Empty : row.Field <string>("apcontrolglacctdesc");
            entity.bankglacct          = row.IsNull("bankglacct") ? string.Empty : row.Field <string>("bankglacct");
            entity.bankglacctdesc      = row.IsNull("bankglacctdesc") ? string.Empty : row.Field <string>("bankglacctdesc");
            entity.discountglacct      = row.IsNull("discountglacct") ? string.Empty : row.Field <string>("discountglacct");
            entity.discountglacctdesc  = row.IsNull("discountglacctdesc") ? string.Empty : row.Field <string>("discountglacctdesc");
            entity.expense1glacct      = row.IsNull("expense1glacct") ? string.Empty : row.Field <string>("expense1glacct");
            entity.expense1glacctdesc  = row.IsNull("expense1glacctdesc") ? string.Empty : row.Field <string>("expense1glacctdesc");
            entity.expense2glacct      = row.IsNull("expense2glacct") ? string.Empty : row.Field <string>("expense2glacct");
            entity.expense2glacctdesc  = row.IsNull("expense2glacctdesc") ? string.Empty : row.Field <string>("expense2glacctdesc");
            entity.expense3glacct      = row.IsNull("expense3glacct") ? string.Empty : row.Field <string>("expense3glacct");
            entity.expense3glacctdesc  = row.IsNull("expense3glacctdesc") ? string.Empty : row.Field <string>("expense3glacctdesc");
            entity.expense1glacct2     = row.IsNull("expense1glacct2") ? string.Empty : row.Field <string>("expense1glacct2");
            entity.expense1glacct2desc = row.IsNull("expense1glacct2desc") ? string.Empty : row.Field <string>("expense1glacct2desc");
            entity.expense2glacct2     = row.IsNull("expense2glacct2") ? string.Empty : row.Field <string>("expense2glacct2");
            entity.expense2glacct2desc = row.IsNull("expense2glacct2desc") ? string.Empty : row.Field <string>("expense2glacct2desc");
            entity.user1     = row.IsNull("user1") ? string.Empty : row.Field <string>("user1");
            entity.user2     = row.IsNull("user2") ? string.Empty : row.Field <string>("user2");
            entity.user3     = row.IsNull("user3") ? string.Empty : row.Field <string>("user3");
            entity.user4     = row.IsNull("user4") ? string.Empty : row.Field <string>("user4");
            entity.user5     = row.IsNull("user5") ? string.Empty : row.Field <string>("user5");
            entity.user6     = row.Field <decimal?>("user6");
            entity.user7     = row.Field <decimal?>("user7");
            entity.user8     = row.Field <DateTime?>("user8");
            entity.user9     = row.Field <DateTime?>("user9");
            entity.rowidArsc = row.Field <byte[]>("rowid-arsc").ToStringEncoded();
            return(entity);
        }