Exemple #1
0
        public static Arecesimcdiv BuildArecesimcdivFromRow(DataRow row)
        {
            Arecesimcdiv entity = new Arecesimcdiv();

            entity.recno     = row.IsNull("recno") ? 0 : row.Field <long>("recno");
            entity.amount    = row.IsNull("amount") ? decimal.Zero : row.Field <decimal>("amount");
            entity.refer     = row.IsNull("refer") ? string.Empty : row.Field <string>("refer");
            entity.divno1    = row.IsNull("divno1") ? 0 : row.Field <int>("divno1");
            entity.divno2    = row.IsNull("divno2") ? 0 : row.Field <int>("divno2");
            entity.divno3    = row.IsNull("divno3") ? 0 : row.Field <int>("divno3");
            entity.divno4    = row.IsNull("divno4") ? 0 : row.Field <int>("divno4");
            entity.divno5    = row.IsNull("divno5") ? 0 : row.Field <int>("divno5");
            entity.divno6    = row.IsNull("divno6") ? 0 : row.Field <int>("divno6");
            entity.divno7    = row.IsNull("divno7") ? 0 : row.Field <int>("divno7");
            entity.divno8    = row.IsNull("divno8") ? 0 : row.Field <int>("divno8");
            entity.divno9    = row.IsNull("divno9") ? 0 : row.Field <int>("divno9");
            entity.divamt1   = row.IsNull("divamt1") ? decimal.Zero : row.Field <decimal>("divamt1");
            entity.divamt2   = row.IsNull("divamt2") ? decimal.Zero : row.Field <decimal>("divamt2");
            entity.divamt3   = row.IsNull("divamt3") ? decimal.Zero : row.Field <decimal>("divamt3");
            entity.divamt4   = row.IsNull("divamt4") ? decimal.Zero : row.Field <decimal>("divamt4");
            entity.divamt5   = row.IsNull("divamt5") ? decimal.Zero : row.Field <decimal>("divamt5");
            entity.divamt6   = row.IsNull("divamt6") ? decimal.Zero : row.Field <decimal>("divamt6");
            entity.divamt7   = row.IsNull("divamt7") ? decimal.Zero : row.Field <decimal>("divamt7");
            entity.divamt8   = row.IsNull("divamt8") ? decimal.Zero : row.Field <decimal>("divamt8");
            entity.divamt9   = row.IsNull("divamt9") ? decimal.Zero : row.Field <decimal>("divamt9");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
Exemple #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromArecesimcdiv(ref DataRow row, Arecesimcdiv entity)
 {
     row.SetField("recno", entity.recno);
     row.SetField("amount", entity.amount);
     row.SetField("refer", entity.refer);
     row.SetField("divno1", entity.divno1);
     row.SetField("divno2", entity.divno2);
     row.SetField("divno3", entity.divno3);
     row.SetField("divno4", entity.divno4);
     row.SetField("divno5", entity.divno5);
     row.SetField("divno6", entity.divno6);
     row.SetField("divno7", entity.divno7);
     row.SetField("divno8", entity.divno8);
     row.SetField("divno9", entity.divno9);
     row.SetField("divamt1", entity.divamt1);
     row.SetField("divamt2", entity.divamt2);
     row.SetField("divamt3", entity.divamt3);
     row.SetField("divamt4", entity.divamt4);
     row.SetField("divamt5", entity.divamt5);
     row.SetField("divamt6", entity.divamt6);
     row.SetField("divamt7", entity.divamt7);
     row.SetField("divamt8", entity.divamt8);
     row.SetField("divamt9", entity.divamt9);
     row.SetField("userfield", entity.userfield);
 }