Beispiel #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOelinerebateresults(ref DataRow row, Oelinerebateresults entity)
 {
     row.SetField("rebrecno", entity.rebrecno);
     row.SetField("rebateamt", entity.rebateamt);
     row.SetField("altrebrecno", entity.altrebrecno);
     row.SetField("contractno", entity.contractno);
     row.SetField("contractlineno", entity.contractlineno);
     row.SetField("sharefl", entity.sharefl);
     row.SetField("sharepct", entity.sharepct);
     row.SetField("capsellprice", entity.capsellprice);
     row.SetField("manualfl", entity.manualfl);
     row.SetField("netbillfl", entity.netbillfl);
     row.SetField("netbillamt", entity.netbillamt);
     row.SetField("origrebamt", entity.origrebamt);
     row.SetField("statustype", entity.statustype);
     row.SetField("userfield", entity.userfield);
 }
Beispiel #2
0
        public static Oelinerebateresults BuildOelinerebateresultsFromRow(DataRow row)
        {
            Oelinerebateresults entity = new Oelinerebateresults();

            entity.rebrecno       = row.IsNull("rebrecno") ? decimal.Zero : row.Field <decimal>("rebrecno");
            entity.rebateamt      = row.IsNull("rebateamt") ? decimal.Zero : row.Field <decimal>("rebateamt");
            entity.altrebrecno    = row.IsNull("altrebrecno") ? decimal.Zero : row.Field <decimal>("altrebrecno");
            entity.contractno     = row.IsNull("contractno") ? string.Empty : row.Field <string>("contractno");
            entity.contractlineno = row.IsNull("contractlineno") ? 0 : row.Field <int>("contractlineno");
            entity.sharefl        = row.Field <bool>("sharefl");
            entity.sharepct       = row.IsNull("sharepct") ? decimal.Zero : row.Field <decimal>("sharepct");
            entity.capsellprice   = row.IsNull("capsellprice") ? decimal.Zero : row.Field <decimal>("capsellprice");
            entity.manualfl       = row.Field <bool>("manualfl");
            entity.netbillfl      = row.Field <bool>("netbillfl");
            entity.netbillamt     = row.IsNull("netbillamt") ? decimal.Zero : row.Field <decimal>("netbillamt");
            entity.origrebamt     = row.IsNull("origrebamt") ? decimal.Zero : row.Field <decimal>("origrebamt");
            entity.statustype     = row.IsNull("statustype") ? string.Empty : row.Field <string>("statustype");
            entity.userfield      = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }