Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromArscCustomerbalance(ref DataRow row, ArscCustomerbalance entity)
 {
     row.SetField("cono", entity.cono);
     row.SetField("custno", entity.custno);
     row.SetField("pbperiod1text", entity.pbperiod1text);
     row.SetField("pbperiod1bal", entity.pbperiod1bal);
     row.SetField("pbperiod2text", entity.pbperiod2text);
     row.SetField("pbperiod2bal", entity.pbperiod2bal);
     row.SetField("pbperiod3text", entity.pbperiod3text);
     row.SetField("pbperiod3bal", entity.pbperiod3bal);
     row.SetField("pbperiod4text", entity.pbperiod4text);
     row.SetField("pbperiod4bal", entity.pbperiod4bal);
     row.SetField("pbperiod5text", entity.pbperiod5text);
     row.SetField("pbperiod5bal", entity.pbperiod5bal);
     row.SetField("pbfutbaltext", entity.pbfutbaltext);
     row.SetField("pbfutbal", entity.pbfutbal);
     row.SetField("pbper1tottext", entity.pbper1tottext);
     row.SetField("pbperiod1tot", entity.pbperiod1tot);
     row.SetField("pbper2tottext", entity.pbper2tottext);
     row.SetField("pbperiod2tot", entity.pbperiod2tot);
     row.SetField("pbper3tottext", entity.pbper3tottext);
     row.SetField("pbperiod3tot", entity.pbperiod3tot);
     row.SetField("pbper4tottext", entity.pbper4tottext);
     row.SetField("pbperiod4tot", entity.pbperiod4tot);
     row.SetField("pbper5tottext", entity.pbper5tottext);
     row.SetField("pbperiod5tot", entity.pbperiod5tot);
     row.SetField("arscRowID", entity.arscRowID.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static ArscCustomerbalance BuildArscCustomerbalanceFromRow(DataRow row)
        {
            ArscCustomerbalance entity = new ArscCustomerbalance();

            entity.cono          = row.IsNull("cono") ? 0 : row.Field <int>("cono");
            entity.custno        = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.pbperiod1text = row.IsNull("pbperiod1text") ? string.Empty : row.Field <string>("pbperiod1text");
            entity.pbperiod1bal  = row.IsNull("pbperiod1bal") ? decimal.Zero : row.Field <decimal>("pbperiod1bal");
            entity.pbperiod2text = row.IsNull("pbperiod2text") ? string.Empty : row.Field <string>("pbperiod2text");
            entity.pbperiod2bal  = row.IsNull("pbperiod2bal") ? decimal.Zero : row.Field <decimal>("pbperiod2bal");
            entity.pbperiod3text = row.IsNull("pbperiod3text") ? string.Empty : row.Field <string>("pbperiod3text");
            entity.pbperiod3bal  = row.IsNull("pbperiod3bal") ? decimal.Zero : row.Field <decimal>("pbperiod3bal");
            entity.pbperiod4text = row.IsNull("pbperiod4text") ? string.Empty : row.Field <string>("pbperiod4text");
            entity.pbperiod4bal  = row.IsNull("pbperiod4bal") ? decimal.Zero : row.Field <decimal>("pbperiod4bal");
            entity.pbperiod5text = row.IsNull("pbperiod5text") ? string.Empty : row.Field <string>("pbperiod5text");
            entity.pbperiod5bal  = row.IsNull("pbperiod5bal") ? decimal.Zero : row.Field <decimal>("pbperiod5bal");
            entity.pbfutbaltext  = row.IsNull("pbfutbaltext") ? string.Empty : row.Field <string>("pbfutbaltext");
            entity.pbfutbal      = row.IsNull("pbfutbal") ? decimal.Zero : row.Field <decimal>("pbfutbal");
            entity.pbper1tottext = row.IsNull("pbper1tottext") ? string.Empty : row.Field <string>("pbper1tottext");
            entity.pbperiod1tot  = row.IsNull("pbperiod1tot") ? decimal.Zero : row.Field <decimal>("pbperiod1tot");
            entity.pbper2tottext = row.IsNull("pbper2tottext") ? string.Empty : row.Field <string>("pbper2tottext");
            entity.pbperiod2tot  = row.IsNull("pbperiod2tot") ? decimal.Zero : row.Field <decimal>("pbperiod2tot");
            entity.pbper3tottext = row.IsNull("pbper3tottext") ? string.Empty : row.Field <string>("pbper3tottext");
            entity.pbperiod3tot  = row.IsNull("pbperiod3tot") ? decimal.Zero : row.Field <decimal>("pbperiod3tot");
            entity.pbper4tottext = row.IsNull("pbper4tottext") ? string.Empty : row.Field <string>("pbper4tottext");
            entity.pbperiod4tot  = row.IsNull("pbperiod4tot") ? decimal.Zero : row.Field <decimal>("pbperiod4tot");
            entity.pbper5tottext = row.IsNull("pbper5tottext") ? string.Empty : row.Field <string>("pbper5tottext");
            entity.pbperiod5tot  = row.IsNull("pbperiod5tot") ? decimal.Zero : row.Field <decimal>("pbperiod5tot");
            entity.arscRowID     = row.Field <byte[]>("arscRowID").ToStringEncoded();
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
Пример #3
0
        /// <summary>
        /// Build a class from a database row
        /// </summary>
        public static Arsc BuildArscFromRow(DataRow row)
        {
            var entity = BuildArscBaseFromRow <Arsc>(row);

            if (entity != null)
            {
                var childRowP_ttblarsc_customerbalance = row.GetChildRows("P_ttblarsc_customerbalance").FirstOrDefault();
                if (childRowP_ttblarsc_customerbalance != null)
                {
                    entity.arscCustomerbalance = (ArscCustomerbalance)SetKeyFields(entity, ArscCustomerbalance.BuildArscCustomerbalanceFromRow(childRowP_ttblarsc_customerbalance), "cono,custno", "cono,custno");
                }
            }
            return(entity);
        }