Ejemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSasttslst(ref DataRow row, Sasttslst entity)
 {
     row.SetField("codeiden", entity.codeiden);
     row.SetField("codeval", entity.codeval);
     row.SetField("descrip", entity.descrip);
     row.SetField("speccostty", entity.speccostty);
     row.SetField("csunperstk", entity.csunperstk);
     row.SetField("prccostper", entity.prccostper);
     row.SetField("unitediuom", entity.unitediuom);
     row.SetField("unitfl", entity.unitfl);
     row.SetField("userfield", entity.userfield);
 }
Ejemplo n.º 2
0
        public static Sasttslst BuildSasttslstFromRow(DataRow row)
        {
            Sasttslst entity = new Sasttslst();

            entity.codeiden   = row.IsNull("codeiden") ? string.Empty : row.Field <string>("codeiden");
            entity.codeval    = row.IsNull("codeval") ? string.Empty : row.Field <string>("codeval");
            entity.descrip    = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.speccostty = row.IsNull("speccostty") ? string.Empty : row.Field <string>("speccostty");
            entity.csunperstk = row.IsNull("csunperstk") ? decimal.Zero : row.Field <decimal>("csunperstk");
            entity.prccostper = row.IsNull("prccostper") ? string.Empty : row.Field <string>("prccostper");
            entity.unitediuom = row.IsNull("unitediuom") ? string.Empty : row.Field <string>("unitediuom");
            entity.unitfl     = row.Field <bool>("unitfl");
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }