示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOecopyquotecriteria(ref DataRow row, Oecopyquotecriteria entity)
 {
     row.SetField("custno", entity.custno);
     row.SetField("custpo", entity.custpo);
     row.SetField("fpcustno", entity.fpcustno);
     row.SetField("lumpbillamt", entity.lumpbillamt);
     row.SetField("orderdisp", entity.orderdisp);
     row.SetField("orderno", entity.orderno);
     row.SetField("ordersuf", entity.ordersuf);
     row.SetField("savefl", entity.savefl);
     row.SetField("shipto", entity.shipto);
     row.SetField("slsrepin", entity.slsrepin);
     row.SetField("slsrepout", entity.slsrepout);
     row.SetField("transtype", entity.transtype);
     row.SetField("whse", entity.whse);
 }
示例#2
0
        public static Oecopyquotecriteria BuildOecopyquotecriteriaFromRow(DataRow row)
        {
            Oecopyquotecriteria entity = new Oecopyquotecriteria();

            entity.custno      = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.custpo      = row.IsNull("custpo") ? string.Empty : row.Field <string>("custpo");
            entity.fpcustno    = row.IsNull("fpcustno") ? decimal.Zero : row.Field <decimal>("fpcustno");
            entity.lumpbillamt = row.IsNull("lumpbillamt") ? decimal.Zero : row.Field <decimal>("lumpbillamt");
            entity.orderdisp   = row.IsNull("orderdisp") ? string.Empty : row.Field <string>("orderdisp");
            entity.orderno     = row.IsNull("orderno") ? 0 : row.Field <int>("orderno");
            entity.ordersuf    = row.IsNull("ordersuf") ? 0 : row.Field <int>("ordersuf");
            entity.savefl      = row.Field <bool>("savefl");
            entity.shipto      = row.IsNull("shipto") ? string.Empty : row.Field <string>("shipto");
            entity.slsrepin    = row.IsNull("slsrepin") ? string.Empty : row.Field <string>("slsrepin");
            entity.slsrepout   = row.IsNull("slsrepout") ? string.Empty : row.Field <string>("slsrepout");
            entity.transtype   = row.IsNull("transtype") ? string.Empty : row.Field <string>("transtype");
            entity.whse        = row.IsNull("whse") ? string.Empty : row.Field <string>("whse");
            return(entity);
        }