Exemplo n.º 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSaeefldsprc(ref DataRow row, Saeefldsprc 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("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("prcfield", entity.prcfield);
     row.SetField("userfield", entity.userfield);
 }
Exemplo n.º 2
0
        public static Saeefldsprc BuildSaeefldsprcFromRow(DataRow row)
        {
            Saeefldsprc entity = new Saeefldsprc();

            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.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.prcfield     = row.IsNull("prcfield") ? decimal.Zero : row.Field <decimal>("prcfield");
            entity.userfield    = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }