Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSasttcodes(ref DataRow row, Sasttcodes entity)
 {
     row.SetField("codeid", entity.codeid);
     row.SetField("descrip", entity.descrip);
     row.SetField("fieldtype", entity.fieldtype);
     row.SetField("filename", entity.filename);
     row.SetField("fieldlabel", entity.fieldlabel);
     row.SetField("fieldlabel2", entity.fieldlabel2);
     row.SetField("fieldtype2", entity.fieldtype2);
     row.SetField("fieldsize2", entity.fieldsize2);
     row.SetField("fieldsize", entity.fieldsize);
     row.SetField("descsize", entity.descsize);
     row.SetField("extendedfl", entity.extendedfl);
     row.SetField("multlangfl", entity.multlangfl);
     row.SetField("codeval2fl", entity.codeval2fl);
     row.SetField("vendfl", entity.vendfl);
     row.SetField("pricefl", entity.pricefl);
     row.SetField("desclabel", entity.desclabel);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Sasttcodes BuildSasttcodesFromRow(DataRow row)
        {
            Sasttcodes entity = new Sasttcodes();

            entity.codeid      = row.IsNull("codeid") ? string.Empty : row.Field <string>("codeid");
            entity.descrip     = row.IsNull("descrip") ? string.Empty : row.Field <string>("descrip");
            entity.fieldtype   = row.IsNull("fieldtype") ? string.Empty : row.Field <string>("fieldtype");
            entity.filename    = row.IsNull("filename") ? string.Empty : row.Field <string>("filename");
            entity.fieldlabel  = row.IsNull("fieldlabel") ? string.Empty : row.Field <string>("fieldlabel");
            entity.fieldlabel2 = row.IsNull("fieldlabel2") ? string.Empty : row.Field <string>("fieldlabel2");
            entity.fieldtype2  = row.IsNull("fieldtype2") ? string.Empty : row.Field <string>("fieldtype2");
            entity.fieldsize2  = row.IsNull("fieldsize2") ? string.Empty : row.Field <string>("fieldsize2");
            entity.fieldsize   = row.IsNull("fieldsize") ? string.Empty : row.Field <string>("fieldsize");
            entity.descsize    = row.IsNull("descsize") ? string.Empty : row.Field <string>("descsize");
            entity.extendedfl  = row.IsNull("extendedfl") ? string.Empty : row.Field <string>("extendedfl");
            entity.multlangfl  = row.IsNull("multlangfl") ? string.Empty : row.Field <string>("multlangfl");
            entity.codeval2fl  = row.IsNull("codeval2fl") ? string.Empty : row.Field <string>("codeval2fl");
            entity.vendfl      = row.IsNull("vendfl") ? string.Empty : row.Field <string>("vendfl");
            entity.pricefl     = row.IsNull("pricefl") ? string.Empty : row.Field <string>("pricefl");
            entity.desclabel   = row.IsNull("desclabel") ? string.Empty : row.Field <string>("desclabel");
            entity.userfield   = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }