Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromVendorcurrencysingle(ref DataRow row, Vendorcurrencysingle entity)
 {
     row.SetField("currencyty", entity.currencyty);
     row.SetField("currencydesc", entity.currencydesc);
     row.SetField("exchgrate", entity.exchgrate);
     row.SetField("foreigncost", entity.foreigncost);
     row.SetField("shortdesc", entity.shortdesc);
     row.SetField("sastcfl", entity.sastcfl);
     row.SetField("customparam", entity.customparam);
     row.SetField("fiCurrencyTy-hidden", entity.fiCurrencyTyHidden);
     row.SetField("fiShortDesc-hidden", entity.fiShortDescHidden);
     row.SetField("fiExchgRate-hidden", entity.fiExchgRateHidden);
     row.SetField("fiForeignCost-hidden", entity.fiForeignCostHidden);
     row.SetField("btn_Cost-Calculator-hidden", entity.btnCostCalculatorHidden);
     row.SetField("btn_Cost-Calculator-sensitive", entity.btnCostCalculatorSensitive);
 }
Ejemplo n.º 2
0
        public static Vendorcurrencysingle BuildVendorcurrencysingleFromRow(DataRow row)
        {
            Vendorcurrencysingle entity = new Vendorcurrencysingle();

            entity.currencyty                 = row.IsNull("currencyty") ? string.Empty : row.Field <string>("currencyty");
            entity.currencydesc               = row.IsNull("currencydesc") ? string.Empty : row.Field <string>("currencydesc");
            entity.exchgrate                  = row.IsNull("exchgrate") ? decimal.Zero : row.Field <decimal>("exchgrate");
            entity.foreigncost                = row.IsNull("foreigncost") ? decimal.Zero : row.Field <decimal>("foreigncost");
            entity.shortdesc                  = row.IsNull("shortdesc") ? string.Empty : row.Field <string>("shortdesc");
            entity.sastcfl                    = row.Field <bool>("sastcfl");
            entity.customparam                = row.IsNull("customparam") ? string.Empty : row.Field <string>("customparam");
            entity.fiCurrencyTyHidden         = row.Field <bool>("fiCurrencyTy-hidden");
            entity.fiShortDescHidden          = row.Field <bool>("fiShortDesc-hidden");
            entity.fiExchgRateHidden          = row.Field <bool>("fiExchgRate-hidden");
            entity.fiForeignCostHidden        = row.Field <bool>("fiForeignCost-hidden");
            entity.btnCostCalculatorHidden    = row.Field <bool>("btn_Cost-Calculator-hidden");
            entity.btnCostCalculatorSensitive = row.Field <bool>("btn_Cost-Calculator-sensitive");
            return(entity);
        }