示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSaealistcust(ref DataRow row, Saealistcust entity)
 {
     row.SetField("listtype", entity.listtype);
     row.SetField("listvalue", entity.listvalue);
     row.SetField("listvalue2", entity.listvalue2);
     row.SetField("namedesc", entity.namedesc);
     row.SetField("custuser", entity.custuser);
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Saealistcust BuildSaealistcustFromRow(DataRow row)
        {
            Saealistcust entity = new Saealistcust();

            entity.listtype   = row.IsNull("listtype") ? string.Empty : row.Field <string>("listtype");
            entity.listvalue  = row.IsNull("listvalue") ? string.Empty : row.Field <string>("listvalue");
            entity.listvalue2 = row.IsNull("listvalue2") ? string.Empty : row.Field <string>("listvalue2");
            entity.namedesc   = row.IsNull("namedesc") ? string.Empty : row.Field <string>("namedesc");
            entity.custuser   = row.IsNull("custuser") ? string.Empty : row.Field <string>("custuser");
            entity.userfield  = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }