Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromEmaillistforedicriteria(ref DataRow row, Emaillistforedicriteria entity)
 {
     row.SetField("custno", entity.custno);
     row.SetField("shipto", entity.shipto);
     row.SetField("sendtocustomer", entity.sendtocustomer);
     row.SetField("vendno", entity.vendno);
     row.SetField("shipfmno", entity.shipfmno);
     row.SetField("sendtovendor", entity.sendtovendor);
 }
Пример #2
0
        public static Emaillistforedicriteria BuildEmaillistforedicriteriaFromRow(DataRow row)
        {
            Emaillistforedicriteria entity = new Emaillistforedicriteria();

            entity.custno         = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.shipto         = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.sendtocustomer = row.Field <bool>("sendtocustomer");
            entity.vendno         = row.IsNull("vendno") ? decimal.Zero : row.Field <decimal>("vendno");
            entity.shipfmno       = row.IsNull("shipfmno") ? 0 : row.Field <int>("shipfmno");
            entity.sendtovendor   = row.Field <bool>("sendtovendor");
            return(entity);
        }