Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromGlsbreqrecalccriteria(ref DataRow row, Glsbreqrecalccriteria entity)
 {
     row.SetField("rowid-glsb", entity.rowidGlsb.ToByteArray());
     row.SetField("budgettype", entity.budgettype);
     row.SetField("annbud", entity.annbud);
     row.SetField("peramt1", entity.peramt1);
     row.SetField("peramt2", entity.peramt2);
     row.SetField("peramt3", entity.peramt3);
     row.SetField("peramt4", entity.peramt4);
     row.SetField("peramt5", entity.peramt5);
     row.SetField("peramt6", entity.peramt6);
     row.SetField("peramt7", entity.peramt7);
     row.SetField("peramt8", entity.peramt8);
     row.SetField("peramt9", entity.peramt9);
     row.SetField("peramt10", entity.peramt10);
     row.SetField("peramt11", entity.peramt11);
     row.SetField("peramt12", entity.peramt12);
     row.SetField("peramt13", entity.peramt13);
     row.SetField("budpct1", entity.budpct1);
     row.SetField("budpct2", entity.budpct2);
     row.SetField("budpct3", entity.budpct3);
     row.SetField("budpct4", entity.budpct4);
     row.SetField("budpct5", entity.budpct5);
     row.SetField("budpct6", entity.budpct6);
     row.SetField("budpct7", entity.budpct7);
     row.SetField("budpct8", entity.budpct8);
     row.SetField("budpct9", entity.budpct9);
     row.SetField("budpct10", entity.budpct10);
     row.SetField("budpct11", entity.budpct11);
     row.SetField("budpct12", entity.budpct12);
     row.SetField("budpct13", entity.budpct13);
     row.SetField("userfield", entity.userfield);
 }
Beispiel #2
0
        public static Glsbreqrecalccriteria BuildGlsbreqrecalccriteriaFromRow(DataRow row)
        {
            Glsbreqrecalccriteria entity = new Glsbreqrecalccriteria();

            entity.rowidGlsb  = row.Field <byte[]>("rowid-glsb").ToStringEncoded();
            entity.budgettype = row.Field <bool>("budgettype");
            entity.annbud     = row.IsNull("annbud") ? decimal.Zero : row.Field <decimal>("annbud");
            entity.peramt1    = row.IsNull("peramt1") ? decimal.Zero : row.Field <decimal>("peramt1");
            entity.peramt2    = row.IsNull("peramt2") ? decimal.Zero : row.Field <decimal>("peramt2");
            entity.peramt3    = row.IsNull("peramt3") ? decimal.Zero : row.Field <decimal>("peramt3");
            entity.peramt4    = row.IsNull("peramt4") ? decimal.Zero : row.Field <decimal>("peramt4");
            entity.peramt5    = row.IsNull("peramt5") ? decimal.Zero : row.Field <decimal>("peramt5");
            entity.peramt6    = row.IsNull("peramt6") ? decimal.Zero : row.Field <decimal>("peramt6");
            entity.peramt7    = row.IsNull("peramt7") ? decimal.Zero : row.Field <decimal>("peramt7");
            entity.peramt8    = row.IsNull("peramt8") ? decimal.Zero : row.Field <decimal>("peramt8");
            entity.peramt9    = row.IsNull("peramt9") ? decimal.Zero : row.Field <decimal>("peramt9");
            entity.peramt10   = row.IsNull("peramt10") ? decimal.Zero : row.Field <decimal>("peramt10");
            entity.peramt11   = row.IsNull("peramt11") ? decimal.Zero : row.Field <decimal>("peramt11");
            entity.peramt12   = row.IsNull("peramt12") ? decimal.Zero : row.Field <decimal>("peramt12");
            entity.peramt13   = row.IsNull("peramt13") ? decimal.Zero : row.Field <decimal>("peramt13");
            entity.budpct1    = row.IsNull("budpct1") ? decimal.Zero : row.Field <decimal>("budpct1");
            entity.budpct2    = row.IsNull("budpct2") ? decimal.Zero : row.Field <decimal>("budpct2");
            entity.budpct3    = row.IsNull("budpct3") ? decimal.Zero : row.Field <decimal>("budpct3");
            entity.budpct4    = row.IsNull("budpct4") ? decimal.Zero : row.Field <decimal>("budpct4");
            entity.budpct5    = row.IsNull("budpct5") ? decimal.Zero : row.Field <decimal>("budpct5");
            entity.budpct6    = row.IsNull("budpct6") ? decimal.Zero : row.Field <decimal>("budpct6");
            entity.budpct7    = row.IsNull("budpct7") ? decimal.Zero : row.Field <decimal>("budpct7");
            entity.budpct8    = row.IsNull("budpct8") ? decimal.Zero : row.Field <decimal>("budpct8");
            entity.budpct9    = row.IsNull("budpct9") ? decimal.Zero : row.Field <decimal>("budpct9");
            entity.budpct10   = row.IsNull("budpct10") ? decimal.Zero : row.Field <decimal>("budpct10");
            entity.budpct11   = row.IsNull("budpct11") ? decimal.Zero : row.Field <decimal>("budpct11");
            entity.budpct12   = row.IsNull("budpct12") ? decimal.Zero : row.Field <decimal>("budpct12");
            entity.budpct13   = row.IsNull("budpct13") ? decimal.Zero : row.Field <decimal>("budpct13");
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }