예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromCustbaldisplaycriteria(ref DataRow row, Custbaldisplaycriteria entity)
 {
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("groupid", entity.groupid);
     row.SetField("totalty", entity.totalty);
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Custbaldisplaycriteria BuildCustbaldisplaycriteriaFromRow(DataRow row)
        {
            Custbaldisplaycriteria entity = new Custbaldisplaycriteria();

            entity.custno    = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto    = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.groupid   = row.IsNull("groupid") ? string.Empty : row.Field <string>("groupid");
            entity.totalty   = row.IsNull("totalty") ? string.Empty : row.Field <string>("totalty");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }