/// <summary>保存明细表 /// /// </summary> private void DoSaveDetail() { switch (m_detailStatus) { case EntityOperationType.新增明细: OrderDetail model = EntityOperateManager.AddEntity <OrderDetail>(this.grpDetail); model.OrderId = m_orderMaster.OrderId; int intReturn = m_orderDetailDAL.Add(model); if (intReturn > 0) { model.DetailId = intReturn; m_lstOrderDetail.Add(model); ListOrderDetail = m_lstOrderDetail; objListViewDetail.SetObjects(m_lstOrderDetail); objListViewDetail.Refresh(); objListViewDetail.SelectedIndex = m_lstOrderDetail.Count - 1; } break; case EntityOperationType.修改明细: OrderDetail modelDetail = this.objListViewDetail.SelectedObjects[0] as OrderDetail; EntityOperateManager.EditEntity(this.grpDetail, modelDetail); bool blnReturn = m_orderDetailDAL.Update(modelDetail); if (blnReturn) { ListOrderDetail = m_lstOrderDetail; } break; } SetMode(EntityOperationType.只读明细); }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(OrderDetail model) { return(dal.Add(model)); }
public void AddOrderDetail(OrderDetail orderDetail) { _orderDetailDAL.Add(orderDetail); }
public int Add(OrderDetailEntity entity) { return(dal.Add(entity)); }