Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromArexchrate(ref DataRow row, Arexchrate entity)
 {
     row.SetField("bankno", entity.bankno);
     row.SetField("custno", entity.custno);
     row.SetField("functionname", entity.functionname);
     row.SetField("exchrate", entity.exchrate);
     row.SetField("continuefl", entity.continuefl);
     row.SetField("currencyty", entity.currencyty);
     row.SetField("currencytydesc", entity.currencytydesc);
     row.SetField("origexchrate", entity.origexchrate);
     row.SetField("updrate", entity.updrate);
     row.SetField("updrateenable", entity.updrateenable);
     row.SetField("userfield", entity.userfield);
 }
Beispiel #2
0
        public static Arexchrate BuildArexchrateFromRow(DataRow row)
        {
            Arexchrate entity = new Arexchrate();

            entity.bankno         = row.IsNull("bankno") ? 0 : row.Field <int>("bankno");
            entity.custno         = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.functionname   = row.IsNull("functionname") ? string.Empty : row.Field <string>("functionname");
            entity.exchrate       = row.IsNull("exchrate") ? decimal.Zero : row.Field <decimal>("exchrate");
            entity.continuefl     = row.Field <bool>("continuefl");
            entity.currencyty     = row.IsNull("currencyty") ? string.Empty : row.Field <string>("currencyty");
            entity.currencytydesc = row.IsNull("currencytydesc") ? string.Empty : row.Field <string>("currencytydesc");
            entity.origexchrate   = row.IsNull("origexchrate") ? decimal.Zero : row.Field <decimal>("origexchrate");
            entity.updrate        = row.Field <bool>("updrate");
            entity.updrateenable  = row.Field <bool>("updrateenable");
            entity.userfield      = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }