コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcspecprccost(ref DataRow row, Icspecprccost entity)
 {
     row.SetField("prod", entity.prod);
     row.SetField("speccostty", entity.speccostty);
     row.SetField("prccostper", entity.prccostper);
     row.SetField("csunperstk", entity.csunperstk);
     row.SetField("newicsprecord", entity.newicsprecord);
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Icspecprccost BuildIcspecprccostFromRow(DataRow row)
        {
            Icspecprccost entity = new Icspecprccost();

            entity.prod          = row.IsNull("prod") ? string.Empty : row.Field <string>("prod");
            entity.speccostty    = row.IsNull("speccostty") ? string.Empty : row.Field <string>("speccostty");
            entity.prccostper    = row.IsNull("prccostper") ? string.Empty : row.Field <string>("prccostper");
            entity.csunperstk    = row.IsNull("csunperstk") ? decimal.Zero : row.Field <decimal>("csunperstk");
            entity.newicsprecord = row.Field <bool>("newicsprecord");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }