public Shipping addShipping(Shipping item) { try { T_Shipping data = new T_Shipping() { trackingCode = item.trackingCode, orderCode = item.orderCode, isActive = item.isActive, isShipping = item.isShipping, shippingDate = item.shippingDate, email = item.email, tel = item.tel, firstName = item.firstName, lastName = item.lastName, address = item.address, province = item.province, zipCode = item.zipCode, createDate = DateTime.Now, createBy = item.createBy, updateDate = DateTime.Now, updateBy = item.updateBy, printCoverQty = item.printCoverQty }; return(ConvertToScreenModel.Transactions.shipping(dao.addShipping(data))); } catch (Exception ex) { JLog.write(LOG_TYPE.ERROR, LOG_POSITION.BO, this, JLog.GetCurrentMethod(), ex); return(null); } }
public static Shipping shipping(T_Shipping item) { if (item == null) { return(null); } return(new Shipping() { id = item.id, trackingCode = item.trackingCode, orderCode = item.orderCode, isActive = item.isActive, isShipping = item.isShipping, shippingDate = item.shippingDate, email = item.email, tel = item.tel, firstName = item.firstName, lastName = item.lastName, address = item.address, province = item.province, zipCode = item.zipCode, createDate = item.createDate, createBy = item.createBy, updateDate = item.updateDate, updateBy = item.updateBy, printCoverQty = item.printCoverQty, //order = Transactions.order(item.T_Order) }); }
public Shipping updateShipping(Shipping item) { T_Shipping data = new T_Shipping() { id = item.id, trackingCode = item.trackingCode, orderCode = item.orderCode, isActive = item.isActive, isShipping = item.isShipping, shippingDate = item.shippingDate, email = item.email, tel = item.tel, firstName = item.firstName, lastName = item.lastName, address = item.address, province = item.province, zipCode = item.zipCode, updateDate = DateTime.Now, updateBy = item.updateBy, printCoverQty = item.printCoverQty }; return(ConvertToScreenModel.Transactions.shipping(dao.updateShipping(data))); }