예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcsegreq(ref DataRow row, Icsegreq entity)
 {
     row.SetField("icsegrowid", entity.icsegrowid.ToByteArray());
     row.SetField("accttype", entity.accttype);
     row.SetField("glgrosssales", entity.glgrosssales);
     row.SetField("glgrosssalesdesc", entity.glgrosssalesdesc);
     row.SetField("gldirgrosssales", entity.gldirgrosssales);
     row.SetField("gldirgrosssalesdesc", entity.gldirgrosssalesdesc);
     row.SetField("gllinedisc", entity.gllinedisc);
     row.SetField("gllinediscdesc", entity.gllinediscdesc);
     row.SetField("glorderdisc", entity.glorderdisc);
     row.SetField("glorderdiscdesc", entity.glorderdiscdesc);
     row.SetField("glcogs", entity.glcogs);
     row.SetField("glcogsdesc", entity.glcogsdesc);
     row.SetField("gldircogs", entity.gldircogs);
     row.SetField("gldircogsdesc", entity.gldircogsdesc);
     row.SetField("glcogadj", entity.glcogadj);
     row.SetField("glcogadjdesc", entity.glcogadjdesc);
     row.SetField("glrestockchrg", entity.glrestockchrg);
     row.SetField("glrestockchrgdesc", entity.glrestockchrgdesc);
     row.SetField("glwtcogadj", entity.glwtcogadj);
     row.SetField("glwtcogadjdesc", entity.glwtcogadjdesc);
     row.SetField("glrebatecostadj", entity.glrebatecostadj);
     row.SetField("glrebatecostadjdesc", entity.glrebatecostadjdesc);
     row.SetField("glsalesreturns", entity.glsalesreturns);
     row.SetField("glsalesreturnsdesc", entity.glsalesreturnsdesc);
     row.SetField("glcoreconv", entity.glcoreconv);
     row.SetField("glcoreconvdesc", entity.glcoreconvdesc);
     row.SetField("glrebatewriteoff", entity.glrebatewriteoff);
     row.SetField("glrebatewriteoffdesc", entity.glrebatewriteoffdesc);
     row.SetField("glinventory", entity.glinventory);
     row.SetField("glinventorydesc", entity.glinventorydesc);
     row.SetField("gldirinventory", entity.gldirinventory);
     row.SetField("gldirinventorydesc", entity.gldirinventorydesc);
     row.SetField("glnsinventory", entity.glnsinventory);
     row.SetField("glnsinventorydesc", entity.glnsinventorydesc);
     row.SetField("glwipinventory", entity.glwipinventory);
     row.SetField("glwipinventorydesc", entity.glwipinventorydesc);
     row.SetField("glwipwriteoff", entity.glwipwriteoff);
     row.SetField("glwipwriteoffdesc", entity.glwipwriteoffdesc);
     row.SetField("gluninvoicedinv", entity.gluninvoicedinv);
     row.SetField("gluninvoicedinvdesc", entity.gluninvoicedinvdesc);
     row.SetField("glcorechrg", entity.glcorechrg);
     row.SetField("glcorechrgdesc", entity.glcorechrgdesc);
     row.SetField("gliccostadj", entity.gliccostadj);
     row.SetField("gliccostadjdesc", entity.gliccostadjdesc);
     row.SetField("glphysicaladj", entity.glphysicaladj);
     row.SetField("glphysicaladjdesc", entity.glphysicaladjdesc);
     row.SetField("glrebatedue", entity.glrebatedue);
     row.SetField("glrebateduedesc", entity.glrebateduedesc);
     row.SetField("glcustcoredue", entity.glcustcoredue);
     row.SetField("glcustcoreduedesc", entity.glcustcoreduedesc);
     row.SetField("glcustcoreliab", entity.glcustcoreliab);
     row.SetField("glcustcoreliabdesc", entity.glcustcoreliabdesc);
     row.SetField("glvendcoreliab", entity.glvendcoreliab);
     row.SetField("glvendcoreliabdesc", entity.glvendcoreliabdesc);
     row.SetField("glcorevariance", entity.glcorevariance);
     row.SetField("glcorevariancedesc", entity.glcorevariancedesc);
     row.SetField("gltallyvariance", entity.gltallyvariance);
     row.SetField("gltallyvariancedesc", entity.gltallyvariancedesc);
     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("userfield", entity.userfield);
 }
예제 #2
0
        public static Icsegreq BuildIcsegreqFromRow(DataRow row)
        {
            Icsegreq entity = new Icsegreq();

            entity.icsegrowid          = row.Field <byte[]>("icsegrowid").ToStringEncoded();
            entity.accttype            = row.Field <bool>("accttype");
            entity.glgrosssales        = row.IsNull("glgrosssales") ? string.Empty : row.Field <string>("glgrosssales");
            entity.glgrosssalesdesc    = row.IsNull("glgrosssalesdesc") ? string.Empty : row.Field <string>("glgrosssalesdesc");
            entity.gldirgrosssales     = row.IsNull("gldirgrosssales") ? string.Empty : row.Field <string>("gldirgrosssales");
            entity.gldirgrosssalesdesc = row.IsNull("gldirgrosssalesdesc") ? string.Empty : row.Field <string>("gldirgrosssalesdesc");
            entity.gllinedisc          = row.IsNull("gllinedisc") ? string.Empty : row.Field <string>("gllinedisc");
            entity.gllinediscdesc      = row.IsNull("gllinediscdesc") ? string.Empty : row.Field <string>("gllinediscdesc");
            entity.glorderdisc         = row.IsNull("glorderdisc") ? string.Empty : row.Field <string>("glorderdisc");
            entity.glorderdiscdesc     = row.IsNull("glorderdiscdesc") ? string.Empty : row.Field <string>("glorderdiscdesc");
            entity.glcogs               = row.IsNull("glcogs") ? string.Empty : row.Field <string>("glcogs");
            entity.glcogsdesc           = row.IsNull("glcogsdesc") ? string.Empty : row.Field <string>("glcogsdesc");
            entity.gldircogs            = row.IsNull("gldircogs") ? string.Empty : row.Field <string>("gldircogs");
            entity.gldircogsdesc        = row.IsNull("gldircogsdesc") ? string.Empty : row.Field <string>("gldircogsdesc");
            entity.glcogadj             = row.IsNull("glcogadj") ? string.Empty : row.Field <string>("glcogadj");
            entity.glcogadjdesc         = row.IsNull("glcogadjdesc") ? string.Empty : row.Field <string>("glcogadjdesc");
            entity.glrestockchrg        = row.IsNull("glrestockchrg") ? string.Empty : row.Field <string>("glrestockchrg");
            entity.glrestockchrgdesc    = row.IsNull("glrestockchrgdesc") ? string.Empty : row.Field <string>("glrestockchrgdesc");
            entity.glwtcogadj           = row.IsNull("glwtcogadj") ? string.Empty : row.Field <string>("glwtcogadj");
            entity.glwtcogadjdesc       = row.IsNull("glwtcogadjdesc") ? string.Empty : row.Field <string>("glwtcogadjdesc");
            entity.glrebatecostadj      = row.IsNull("glrebatecostadj") ? string.Empty : row.Field <string>("glrebatecostadj");
            entity.glrebatecostadjdesc  = row.IsNull("glrebatecostadjdesc") ? string.Empty : row.Field <string>("glrebatecostadjdesc");
            entity.glsalesreturns       = row.IsNull("glsalesreturns") ? string.Empty : row.Field <string>("glsalesreturns");
            entity.glsalesreturnsdesc   = row.IsNull("glsalesreturnsdesc") ? string.Empty : row.Field <string>("glsalesreturnsdesc");
            entity.glcoreconv           = row.IsNull("glcoreconv") ? string.Empty : row.Field <string>("glcoreconv");
            entity.glcoreconvdesc       = row.IsNull("glcoreconvdesc") ? string.Empty : row.Field <string>("glcoreconvdesc");
            entity.glrebatewriteoff     = row.IsNull("glrebatewriteoff") ? string.Empty : row.Field <string>("glrebatewriteoff");
            entity.glrebatewriteoffdesc = row.IsNull("glrebatewriteoffdesc") ? string.Empty : row.Field <string>("glrebatewriteoffdesc");
            entity.glinventory          = row.IsNull("glinventory") ? string.Empty : row.Field <string>("glinventory");
            entity.glinventorydesc      = row.IsNull("glinventorydesc") ? string.Empty : row.Field <string>("glinventorydesc");
            entity.gldirinventory       = row.IsNull("gldirinventory") ? string.Empty : row.Field <string>("gldirinventory");
            entity.gldirinventorydesc   = row.IsNull("gldirinventorydesc") ? string.Empty : row.Field <string>("gldirinventorydesc");
            entity.glnsinventory        = row.IsNull("glnsinventory") ? string.Empty : row.Field <string>("glnsinventory");
            entity.glnsinventorydesc    = row.IsNull("glnsinventorydesc") ? string.Empty : row.Field <string>("glnsinventorydesc");
            entity.glwipinventory       = row.IsNull("glwipinventory") ? string.Empty : row.Field <string>("glwipinventory");
            entity.glwipinventorydesc   = row.IsNull("glwipinventorydesc") ? string.Empty : row.Field <string>("glwipinventorydesc");
            entity.glwipwriteoff        = row.IsNull("glwipwriteoff") ? string.Empty : row.Field <string>("glwipwriteoff");
            entity.glwipwriteoffdesc    = row.IsNull("glwipwriteoffdesc") ? string.Empty : row.Field <string>("glwipwriteoffdesc");
            entity.gluninvoicedinv      = row.IsNull("gluninvoicedinv") ? string.Empty : row.Field <string>("gluninvoicedinv");
            entity.gluninvoicedinvdesc  = row.IsNull("gluninvoicedinvdesc") ? string.Empty : row.Field <string>("gluninvoicedinvdesc");
            entity.glcorechrg           = row.IsNull("glcorechrg") ? string.Empty : row.Field <string>("glcorechrg");
            entity.glcorechrgdesc       = row.IsNull("glcorechrgdesc") ? string.Empty : row.Field <string>("glcorechrgdesc");
            entity.gliccostadj          = row.IsNull("gliccostadj") ? string.Empty : row.Field <string>("gliccostadj");
            entity.gliccostadjdesc      = row.IsNull("gliccostadjdesc") ? string.Empty : row.Field <string>("gliccostadjdesc");
            entity.glphysicaladj        = row.IsNull("glphysicaladj") ? string.Empty : row.Field <string>("glphysicaladj");
            entity.glphysicaladjdesc    = row.IsNull("glphysicaladjdesc") ? string.Empty : row.Field <string>("glphysicaladjdesc");
            entity.glrebatedue          = row.IsNull("glrebatedue") ? string.Empty : row.Field <string>("glrebatedue");
            entity.glrebateduedesc      = row.IsNull("glrebateduedesc") ? string.Empty : row.Field <string>("glrebateduedesc");
            entity.glcustcoredue        = row.IsNull("glcustcoredue") ? string.Empty : row.Field <string>("glcustcoredue");
            entity.glcustcoreduedesc    = row.IsNull("glcustcoreduedesc") ? string.Empty : row.Field <string>("glcustcoreduedesc");
            entity.glcustcoreliab       = row.IsNull("glcustcoreliab") ? string.Empty : row.Field <string>("glcustcoreliab");
            entity.glcustcoreliabdesc   = row.IsNull("glcustcoreliabdesc") ? string.Empty : row.Field <string>("glcustcoreliabdesc");
            entity.glvendcoreliab       = row.IsNull("glvendcoreliab") ? string.Empty : row.Field <string>("glvendcoreliab");
            entity.glvendcoreliabdesc   = row.IsNull("glvendcoreliabdesc") ? string.Empty : row.Field <string>("glvendcoreliabdesc");
            entity.glcorevariance       = row.IsNull("glcorevariance") ? string.Empty : row.Field <string>("glcorevariance");
            entity.glcorevariancedesc   = row.IsNull("glcorevariancedesc") ? string.Empty : row.Field <string>("glcorevariancedesc");
            entity.gltallyvariance      = row.IsNull("gltallyvariance") ? string.Empty : row.Field <string>("gltallyvariance");
            entity.gltallyvariancedesc  = row.IsNull("gltallyvariancedesc") ? string.Empty : row.Field <string>("gltallyvariancedesc");
            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.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }