コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcssforproductlookupresults(ref DataRow row, Icssforproductlookupresults entity)
 {
     row.SetField("prod", entity.prod);
     row.SetField("icspecrecno", entity.icspecrecno);
     row.SetField("statusfl", entity.statusfl);
     row.SetField("prccostper", entity.prccostper);
     row.SetField("csunperstk", entity.csunperstk);
     row.SetField("defaulttype", entity.defaulttype);
     row.SetField("speccosttype", entity.speccosttype);
     row.SetField("rowid-icss", entity.rowidIcss.ToByteArray());
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Icssforproductlookupresults BuildIcssforproductlookupresultsFromRow(DataRow row)
        {
            Icssforproductlookupresults entity = new Icssforproductlookupresults();

            entity.prod         = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.icspecrecno  = row.IsNull("icspecrecno") ? 0 : row.Field <int>("icspecrecno");
            entity.statusfl     = row.Field <bool>("statusfl");
            entity.prccostper   = row.IsNull("prccostper") ? string.Empty : row.Field <string>("prccostper");
            entity.csunperstk   = row.IsNull("csunperstk") ? decimal.Zero : row.Field <decimal>("csunperstk");
            entity.defaulttype  = row.IsNull("defaulttype") ? string.Empty : row.Field <string>("defaulttype");
            entity.speccosttype = row.IsNull("speccosttype") ? string.Empty : row.Field <string>("speccosttype");
            entity.rowidIcss    = row.Field <byte[]>("rowid-icss").ToStringEncoded();
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }