Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSaeefldsamt(ref DataRow row, Saeefldsamt entity)
 {
     row.SetField("allowblankfl", entity.allowblankfl);
     row.SetField("arraypos", entity.arraypos);
     row.SetField("dataty", entity.dataty);
     row.SetField("eventname", entity.eventname);
     row.SetField("fieldlabel", entity.fieldlabel);
     row.SetField("fieldlength", entity.fieldlength);
     row.SetField("fieldname", entity.fieldname);
     row.SetField("keyindex", entity.keyindex);
     row.SetField("operinit", entity.operinit);
     row.SetField("pricecostty", entity.pricecostty);
     row.SetField("transdt", entity.transdt);
     row.SetField("transproc", entity.transproc);
     row.SetField("transtm", entity.transtm);
     row.SetField("validatelist", entity.validatelist);
     row.SetField("amtfield", entity.amtfield);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Saeefldsamt BuildSaeefldsamtFromRow(DataRow row)
        {
            Saeefldsamt entity = new Saeefldsamt();

            entity.allowblankfl = row.Field <bool>("allowblankfl");
            entity.arraypos     = row.IsNull("arraypos") ? 0 : row.Field <int>("arraypos");
            entity.dataty       = row.IsNull("dataty") ? string.Empty : row.Field <string>("dataty");
            entity.eventname    = row.IsNull("eventname") ? string.Empty : row.Field <string>("eventname");
            entity.fieldlabel   = row.IsNull("fieldlabel") ? string.Empty : row.Field <string>("fieldlabel");
            entity.fieldlength  = row.IsNull("fieldlength") ? 0 : row.Field <int>("fieldlength");
            entity.fieldname    = row.IsNull("fieldname") ? string.Empty : row.Field <string>("fieldname");
            entity.keyindex     = row.IsNull("keyindex") ? string.Empty : row.Field <string>("keyindex");
            entity.operinit     = row.IsNull("operinit") ? string.Empty : row.Field <string>("operinit");
            entity.pricecostty  = row.IsNull("pricecostty") ? string.Empty : row.Field <string>("pricecostty");
            entity.transdt      = row.Field <DateTime?>("transdt");
            entity.transproc    = row.IsNull("transproc") ? string.Empty : row.Field <string>("transproc");
            entity.transtm      = row.IsNull("transtm") ? string.Empty : row.Field <string>("transtm");
            entity.validatelist = row.IsNull("validatelist") ? string.Empty : row.Field <string>("validatelist");
            entity.amtfield     = row.IsNull("amtfield") ? decimal.Zero : row.Field <decimal>("amtfield");
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }