/// <summary> /// 将Grid中选中的数据赋值给【详情】Tab内的对应控件 /// </summary> private void SetGridDataToCardCtrls() { //判断是否允许将【列表】Grid数据设置到【详情】Tab内的对应控件 if (!IsAllowSetGridDataToCard()) { return; } var activeRowIndex = gdGrid.ActiveRow.Index; //判断Grid内[唯一标识]是否为空 if (gdGrid.Rows[activeRowIndex].Cells[SystemTableColumnEnums.SD_SalesForecastOrder.Code.SFO_ID].Value == null || string.IsNullOrEmpty(gdGrid.Rows[activeRowIndex].Cells[SystemTableColumnEnums.SD_SalesForecastOrder.Code.SFO_ID].Value.ToString())) { return; } //将选中的Grid行对应数据Model赋值给[DetailDS] //******************************************************************************** //**********************************【重要说明】********************************** //*****此处和上面的条件判断必须用HeadGridDS内能唯一标识一条记录的字段作为过滤条件***** //******************************************************************************** HeadDS = HeadGridDS.FirstOrDefault(x => x.SFO_ID == gdGrid.Rows[activeRowIndex].Cells[SystemTableColumnEnums.SD_SalesForecastOrder.Code.SFO_ID].Value?.ToString()); if (HeadDS == null || string.IsNullOrEmpty(HeadDS.SFO_ID)) { return; } //将DetailDS数据赋值给【详情】Tab内的对应控件 SetDetailDSToCardCtrls(); //选中【详情】Tab tabControlFull.Tabs[SysConst.EN_DETAIL].Selected = true; //查询明细Grid数据并绑定 QueryDetail(); //设置详情 SetDetailControl(); }
/// <summary> /// 刷新列表 /// </summary> /// <param name="paramIsDelete">是否是删除操作</param> private void RefreshList(bool paramIsDelete = false) { if (paramIsDelete) { if (tabControlFull.Tabs[SysConst.EN_LIST].Selected) { var removeList = HeadGridDS.Where(x => x.IsChecked == true).ToList(); foreach (var loopRemove in removeList) { HeadGridDS.Remove(loopRemove); } } else { var curHead = HeadGridDS.FirstOrDefault(x => x.WH_ID == HeadDS.WH_ID); if (curHead != null) { HeadGridDS.Remove(curHead); } } } else { var curHead = HeadGridDS.FirstOrDefault(x => x.WH_ID == HeadDS.WH_ID); if (curHead != null) { _bll.CopyModel(HeadDS, curHead); } else { HeadGridDS.Insert(0, HeadDS); } } gdGrid.DisplayLayout.Bands[0].PerformAutoResizeColumns(true, PerformAutoSizeType.VisibleRows); }
/// <summary> /// 转销售 /// </summary> public override void ToSalesOrderNavigate() { base.ToSalesOrderNavigate(); #region 验证及准备数据 //要跳转到销售的销售预测订单 SalesForecastOrderManageUIModel curForecastOrderToSalesOrder = new SalesForecastOrderManageUIModel(); if (tabControlFull.Tabs[SysConst.EN_DETAIL].Selected) { #region 中[详情]Tab的场合 //选中【详情】Tab的场合 _bll.CopyModel(HeadDS, curForecastOrderToSalesOrder); #endregion } else { #region 中[列表]Tab的场合 var selectedForecastOrderList = HeadGridDS.Where(x => x.IsChecked == true).ToList(); if (selectedForecastOrderList.Count == 1) { if (selectedForecastOrderList[0].SFO_StatusName != SalesForecastOrderStatusEnum.Name.YSC) { //请选择已生成的销售预测订单转销售 MessageBoxs.Show(Trans.SD, ToString(), MsgHelp.GetMsg(MsgCode.E_0013, new object[] { SalesForecastOrderStatusEnum.Name.YSC + MsgParam.OF + SystemTableEnums.Name.SD_SalesForecastOrder + SystemNavigateEnum.Name.TOSALESORDER }), MessageBoxButtons.OK, MessageBoxIcon.Information); selectedForecastOrderList[0].IsChecked = false; gdGrid.DataSource = HeadGridDS; gdGrid.DataBind(); return; } curForecastOrderToSalesOrder = selectedForecastOrderList[0]; } else { var tempCannotToSalesOrder = selectedForecastOrderList.Where(x => x.SFO_StatusName != SalesForecastOrderStatusEnum.Name.YSC).ToList(); //请选择一个已生成的销售预测订单转销售 MessageBoxs.Show(Trans.SD, ToString(), MsgHelp.GetMsg(MsgCode.E_0013, new object[] { MsgParam.ONE + SalesForecastOrderStatusEnum.Name.YSC + MsgParam.OF + SystemTableEnums.Name.SD_SalesForecastOrder + SystemNavigateEnum.Name.TOSALESORDER }), MessageBoxButtons.OK, MessageBoxIcon.Information); foreach (var loopCannotToLogistic in tempCannotToSalesOrder) { loopCannotToLogistic.IsChecked = false; gdGrid.DataSource = HeadGridDS; gdGrid.DataBind(); return; } return; } ////查询销售预测订单明细 //_bll.QueryForList<MDLSD_SalesForecastOrderDetail, SalesForecastOrderDetailUIModel>(new MDLSD_SalesForecastOrderDetail() //{ // WHERE_SFOD_IsValid = true, // WHERE_SFOD_ST_ID = curForecastOrderToSalesOrder.SFO_ID //}, _detailGridDS); #endregion } if (string.IsNullOrEmpty(curForecastOrderToSalesOrder.SFO_ID) || string.IsNullOrEmpty(curForecastOrderToSalesOrder.SFO_No)) { //没有获取到销售预测订单,转销售失败 MessageBoxs.Show(Trans.SD, ToString(), MsgHelp.GetMsg(MsgCode.W_0024, new object[] { SystemTableEnums.Name.SD_SalesForecastOrder, SystemNavigateEnum.Name.TOSALESORDER }), MessageBoxButtons.OK, MessageBoxIcon.Information); return; } #endregion //传入的销售订单 MDLSD_SalesForecastOrder argsSalesOrder = new MDLSD_SalesForecastOrder(); _bll.CopyModel(curForecastOrderToSalesOrder, argsSalesOrder); //#region 准备[销售订单]数据 //argsSalesOrder.SO_Org_ID = LoginInfoDAX.OrgID; ////[来源类型]为{销售预测} //argsSalesOrder.SO_SourceTypeName = SalesOrderSourceTypeEnum.Name.XSYC; //argsSalesOrder.SO_SourceTypeCode = SalesOrderSourceTypeEnum.Code.XSYC; //argsSalesOrder.SO_SourceNo = curForecastOrderToSalesOrder.SFO_No; ////[客户类型]为{平台内汽修商} //argsSalesOrder.SO_CustomerTypeCode = CustomerTypeEnum.Code.PTNQXSH; //argsSalesOrder.SO_CustomerTypeName = CustomerTypeEnum.Name.PTNQXSH; //argsSalesOrder.SO_CustomerID = curForecastOrderToSalesOrder.SFO_CustomerID; //argsSalesOrder.SO_CustomerName = curForecastOrderToSalesOrder.SFO_CustomerName; ////[单据状态]为{已生成} //argsSalesOrder.SO_StatusName = SalesOrderStatusEnum.Name.YSC; //argsSalesOrder.SO_StatusCode = SalesOrderStatusEnum.Code.YSC; ////[审核状态]为{待审核} //argsSalesOrder.SO_ApprovalStatusName = ApprovalStatusEnum.Name.DSH; //argsSalesOrder.SO_ApprovalStatusCode = ApprovalStatusEnum.Code.DSH; //argsSalesOrder.SO_IsValid = true; //argsSalesOrder.SO_CreatedBy = LoginInfoDAX.UserName; //argsSalesOrder.SO_UpdatedBy = LoginInfoDAX.UserName; //argsSalesOrder.SO_CreatedTime = BLLCom.GetCurStdDatetime(); //argsSalesOrder.SO_UpdatedTime = BLLCom.GetCurStdDatetime(); //argsSalesOrder.SO_VersionNo = 1; //#endregion //#region 准备[销售订单明细]数据 //decimal totalAmount = 0; //foreach (var loopDetail in _detailGridDS) //{ // if (string.IsNullOrEmpty(loopDetail.SFOD_ID)) // { // continue; // } // MDLSD_SalesOrderDetail addSalesOrderDetail = new MDLSD_SalesOrderDetail // { // SOD_PriceIsIncludeTax = loopDetail.SFOD_PriceIsIncludeTax, // SOD_TaxRate = loopDetail.SFOD_TaxRate, // SOD_TotalTax = loopDetail.SFOD_TotalTax, // SOD_Qty = loopDetail.SFOD_Qty, // SOD_UnitPrice = loopDetail.SFOD_UnitPrice, // SOD_TotalAmount = loopDetail.SFOD_TotalAmount, // SOD_Barcode = loopDetail.SFOD_Barcode, // SOD_Name = loopDetail.SFOD_Name, // SOD_Specification = loopDetail.SFOD_Specification, // SOD_UOM = loopDetail.SFOD_UOM, // SOD_StockInOrgID = loopDetail.SFOD_AutoFactoryOrgID, // SOD_StockInOrgName = loopDetail.SFOD_AutoFactoryOrgName, // SOD_StatusName = argsSalesOrder.SO_StatusName, // SOD_StatusCode = argsSalesOrder.SO_StatusCode, // SOD_IsValid = true, // SOD_CreatedBy = LoginInfoDAX.UserName, // SOD_UpdatedBy = LoginInfoDAX.UserName, // SOD_CreatedTime = BLLCom.GetCurStdDatetime(), // SOD_UpdatedTime = BLLCom.GetCurStdDatetime(), // SOD_VersionNo = 1 // }; // totalAmount += addSalesOrderDetail.SOD_TotalAmount ?? 0; // argsSalesOrderDetailList.Add(addSalesOrderDetail); //} //argsSalesOrder.SO_TotalAmount = totalAmount; //#endregion Dictionary <string, object> paramViewParameters = new Dictionary <string, object> { //销售预测订单 { SDViewParamKey.SalesForecastOrder.ToString(), argsSalesOrder }, //销售订单明细 //{SDViewParamKey.SalesOrderDetail.ToString(), argsSalesOrderDetailList}, }; //跳转到[主动销售管理] SystemFunction.ShowViewFromView(MsgParam.PROACTIVE_SALES_MANAGER, ViewClassFullNameConst.SD_FrmProactiveSalesManager, true, PageDisplayMode.TabPage, paramViewParameters, null); }
/// <summary> /// 转采购 /// </summary> public override void ToPurchaseOrderNavigate() { base.ToPurchaseOrderNavigate(); //获取采购预测数据 PurchaseForecastOrderQueryUIModel curPurchaseForecastOrderToPurchaseOrder = new PurchaseForecastOrderQueryUIModel(); if (tabControlFull.Tabs[SysConst.EN_LIST].Selected) { var purchaseForecastOrderList = HeadGridDS.Where(x => x.IsChecked == true).ToList(); if (purchaseForecastOrderList.Count == 1) { curPurchaseForecastOrderToPurchaseOrder = purchaseForecastOrderList[0]; } } else if (tabControlFull.Tabs[SysConst.EN_DETAIL].Selected) { _bll.CopyModel(HeadDS, curPurchaseForecastOrderToPurchaseOrder); } if (string.IsNullOrEmpty(curPurchaseForecastOrderToPurchaseOrder.PFO_ID) || string.IsNullOrEmpty(curPurchaseForecastOrderToPurchaseOrder.PFO_No)) { //没有获取到采购预测,转采购失败 MessageBoxs.Show(Trans.PIS, this.ToString(), MsgHelp.GetMsg(MsgCode.W_0024, new object[] { SystemTableEnums.Name.PIS_PurchaseForecastOrder, SystemNavigateEnum.Name.TOPURCHASEORDER }), MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } //传入采购单数据 MDLPIS_PurchaseOrder argsPurchaseOrder = new MDLPIS_PurchaseOrder(); //传入采购单明细数据 List <MDLPIS_PurchaseOrderDetail> argsMdlpisPurchaseOrderDetailList = new List <MDLPIS_PurchaseOrderDetail>(); #region 准备[采购单]数据 argsPurchaseOrder.PO_Org_ID = LoginInfoDAX.OrgID; argsPurchaseOrder.PO_SUPP_ID = curPurchaseForecastOrderToPurchaseOrder.PFO_SUPP_ID; argsPurchaseOrder.PO_SUPP_Name = curPurchaseForecastOrderToPurchaseOrder.PFO_SUPP_Name; argsPurchaseOrder.PO_SourceTypeCode = PurchaseOrderSourceTypeEnum.Code.CGYC; argsPurchaseOrder.PO_SourceTypeName = PurchaseOrderSourceTypeEnum.Name.CGYC; argsPurchaseOrder.PO_SourceNo = curPurchaseForecastOrderToPurchaseOrder.PFO_No; argsPurchaseOrder.PO_TotalAmount = curPurchaseForecastOrderToPurchaseOrder.PFO_TotalAmount; #endregion #region 准备[采购单明细]数据 List <PurchaseForecastOrderQueryDetailUIModel> purchaseForecastOrderQueryDetailList = new List <PurchaseForecastOrderQueryDetailUIModel>(); MDLPIS_PurchaseForecastOrderDetail purchaseForecastOrder = new MDLPIS_PurchaseForecastOrderDetail() { WHERE_PFOD_PFO_ID = curPurchaseForecastOrderToPurchaseOrder.PFO_ID, }; _bll.QueryForList <MDLPIS_PurchaseForecastOrderDetail, PurchaseForecastOrderQueryDetailUIModel>(purchaseForecastOrder, purchaseForecastOrderQueryDetailList); foreach (var loopPurchaseForecastOrder in purchaseForecastOrderQueryDetailList) { MDLPIS_PurchaseOrderDetail purchaseOrderDetail = new MDLPIS_PurchaseOrderDetail(); purchaseOrderDetail.POD_AutoPartsBarcode = loopPurchaseForecastOrder.PFOD_AutoPartsBarcode; purchaseOrderDetail.POD_ThirdCode = loopPurchaseForecastOrder.PFOD_ThirdCode; purchaseOrderDetail.POD_OEMCode = loopPurchaseForecastOrder.PFOD_OEMCode; purchaseOrderDetail.POD_AutoPartsName = loopPurchaseForecastOrder.PFOD_AutoPartsName; purchaseOrderDetail.POD_AutoPartsBrand = loopPurchaseForecastOrder.PFOD_AutoPartsBrand; purchaseOrderDetail.POD_AutoPartsSpec = loopPurchaseForecastOrder.PFOD_AutoPartsSpec; purchaseOrderDetail.POD_AutoPartsLevel = loopPurchaseForecastOrder.PFOD_AutoPartsLevel; purchaseOrderDetail.POD_UOM = loopPurchaseForecastOrder.PFOD_UOM; purchaseOrderDetail.POD_VehicleBrand = loopPurchaseForecastOrder.PFOD_VehicleBrand; purchaseOrderDetail.POD_VehicleInspire = loopPurchaseForecastOrder.PFOD_VehicleInspire; purchaseOrderDetail.POD_VehicleCapacity = loopPurchaseForecastOrder.PFOD_VehicleCapacity; purchaseOrderDetail.POD_VehicleYearModel = loopPurchaseForecastOrder.PFOD_VehicleYearModel; purchaseOrderDetail.POD_VehicleGearboxType = loopPurchaseForecastOrder.PFOD_VehicleGearboxType; purchaseOrderDetail.POD_OrderQty = loopPurchaseForecastOrder.PFOD_Qty; purchaseOrderDetail.POD_UnitPrice = loopPurchaseForecastOrder.PFOD_LastUnitPrice; argsMdlpisPurchaseOrderDetailList.Add(purchaseOrderDetail); } #endregion Dictionary <string, object> paramViewParameters = new Dictionary <string, object> { { PISViewParamKey.PurchaseOrder.ToString(), argsPurchaseOrder }, { PISViewParamKey.PurchaseOrderDetail.ToString(), argsMdlpisPurchaseOrderDetailList }, }; //跳转到[采购单管理] SystemFunction.ShowViewFromView(MsgParam.PURCHASEORDER_MANAGER, ViewClassFullNameConst.PIS_FrmPurchaseOrderManager, true, PageDisplayMode.TabPage, paramViewParameters, null); }
/// <summary> /// 将Grid中选中的数据赋值给【详情】Tab内的对应控件 /// </summary> private void SetGridDataToCardCtrls() { //判断是否允许将【列表】Grid数据设置到【详情】Tab内的对应控件 if (!IsAllowSetGridDataToCard()) { return; } SetCardCtrlsToDetailDS(); base.NewUIModel = HeadDS; var activeRowIndex = gdGrid.ActiveRow.Index; //判断Grid内[唯一标识]是否为空 if (gdGrid.Rows[activeRowIndex].Cells[SystemTableColumnEnums.PIS_Warehouse.Code.WH_ID].Value == null || string.IsNullOrEmpty(gdGrid.Rows[activeRowIndex].Cells[SystemTableColumnEnums.PIS_Warehouse.Code.WH_ID].Value.ToString())) { return; } //将选中的Grid行对应数据Model赋值给[DetailDS] //******************************************************************************** //**********************************【重要说明】********************************** //*****此处和上面的条件判断必须用GridDS内能唯一标识一条记录的字段作为过滤条件***** //******************************************************************************** HeadDS = HeadGridDS.FirstOrDefault(x => x.WH_ID == gdGrid.Rows[activeRowIndex].Cells[SystemTableColumnEnums.PIS_Warehouse.Code.WH_ID].Value); if (HeadDS == null || string.IsNullOrEmpty(HeadDS.WH_ID)) { return; } if (txtWH_ID.Text != HeadDS.WH_ID || (txtWH_ID.Text == HeadDS.WH_ID && txtWH_VersionNo.Text != HeadDS.WH_VersionNo?.ToString())) { if (txtWH_ID.Text == HeadDS.WH_ID && txtWH_VersionNo.Text != HeadDS.WH_VersionNo?.ToString()) { //数据版本已过期,将加载最新详情。 MessageBoxs.Show(Trans.PIS, ToString(), MsgHelp.GetMsg(MsgCode.I_0000, new object[] { MsgParam.DataHasOverdue }), MessageBoxButtons.OKCancel, MessageBoxIcon.Information); } else if (ViewHasChanged() || _warehouseBinList.InsertList.Count > 0 || _warehouseBinList.UpdateList.Count > 0 || _warehouseBinList.DeleteList.Count > 0) { //将放弃之前的修改,是否继续? DialogResult dialogResult = MessageBoxs.Show(Trans.PIS, ToString(), MsgHelp.GetMsg(MsgCode.I_0000, new object[] { MsgParam.ConfirmGiveUpEdit }), MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if (dialogResult != DialogResult.OK) { //选中【详情】Tab tabControlFull.Tabs[SysConst.EN_DETAIL].Selected = true; return; } } //将DetailDS数据赋值给【详情】Tab内的对应控件 SetDetailDSToCardCtrls(); } //选中【详情】Tab tabControlFull.Tabs[SysConst.EN_DETAIL].Selected = true; //将最新的值Copy到初始UIModel this.AcceptUIModelChanges(); //设置详情是否可编辑 SetDetailControl(); //查询仓位 QueryWarehouseBin(); }
/// <summary> /// 删除仓库 /// </summary> public override void DeleteAction() { #region 准备数据 //待删除的仓库列表 List<MDLPIS_Warehouse> deleteWarehouseList = new List<MDLPIS_Warehouse>(); //待删除的仓位列表 List<MDLPIS_WarehouseBin> deleteWarehouseBinList = new List<MDLPIS_WarehouseBin>(); if (tabControlFull.Tabs[SysConst.EN_DETAIL].Selected) { #region 详情删除 #region 验证 if (string.IsNullOrEmpty(txtWH_ID.Text.Trim())) { //选择要删除的数据 MessageBoxs.Show(Trans.PIS, this.ToString(), MsgHelp.GetMsg(MsgCode.W_0006, new object[] { SystemTableEnums.Name.PIS_Warehouse, SystemActionEnum.Name.DELETE }), MessageBoxButtons.OK, MessageBoxIcon.Information); return; } //验证仓库是否已被使用 StringBuilder warehouseIDs = new StringBuilder(); warehouseIDs.Append(SysConst.Semicolon_DBC + txtWH_ID.Text + SysConst.Semicolon_DBC); //已被使用的仓库 List<MDLPIS_Warehouse> usedWarehouseList = new List<MDLPIS_Warehouse>(); _bll.QueryForList(SQLID.PIS_WarehouseManager_SQL01, new MDLPIS_Warehouse { WHERE_WH_ID = warehouseIDs.ToString() }, usedWarehouseList); if (usedWarehouseList.Count > 0) { //仓库已经被使用,不能删除 MessageBoxs.Show(Trans.PIS, this.ToString(), MsgHelp.GetMsg(MsgCode.W_0007, new object[] { txtWH_Name.Text, MsgParam.APPLY, SystemActionEnum.Name.DELETE }), MessageBoxButtons.OK, MessageBoxIcon.Information); return; } //确认删除操作 DialogResult dialogResult = MessageBoxs.Show(Trans.PIS, this.ToString(), MsgHelp.GetMsg(MsgCode.W_0012), MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if (dialogResult != DialogResult.OK) { return; } #endregion MDLPIS_Warehouse deleteWarehouse = new MDLPIS_Warehouse() { WHERE_WH_ID = txtWH_ID.Text.Trim() }; deleteWarehouseList.Add(deleteWarehouse); foreach (var loopWarehouseBin in _warehouseBinList) { MDLPIS_WarehouseBin deleteWarehouseBin = new MDLPIS_WarehouseBin() { WHERE_WHB_ID = loopWarehouseBin.WHB_ID, }; deleteWarehouseBinList.Add(deleteWarehouseBin); } #endregion } else { #region 列表删除 #region 验证 gdGrid.UpdateData(); var checkedWarehouseList = HeadGridDS.Where(p => p.IsChecked == true).ToList(); if (checkedWarehouseList.Count == 0) { //请至少勾选一条仓库信息进行删除 MessageBoxs.Show(Trans.PIS, this.ToString(), MsgHelp.GetMsg(MsgCode.W_0017, new object[] { SystemTableEnums.Name.PIS_Warehouse, SystemActionEnum.Name.DELETE }), MessageBoxButtons.OK, MessageBoxIcon.Information); return; } //验证仓库是否已被使用 StringBuilder warehouseIDs = new StringBuilder(); warehouseIDs.Append(SysConst.Semicolon_DBC); foreach (var loopSelectedItem in checkedWarehouseList) { warehouseIDs.Append(loopSelectedItem.WH_ID + SysConst.Semicolon_DBC); } //已被使用的仓库 List<MDLPIS_Warehouse> usedWarehouseList = new List<MDLPIS_Warehouse>(); _bll.QueryForList(SQLID.PIS_WarehouseManager_SQL01, new MDLPIS_Warehouse { WHERE_WH_ID = warehouseIDs.ToString() }, usedWarehouseList); if (usedWarehouseList.Count > 0) { StringBuilder warehouseName = new StringBuilder(); int i = 0; foreach (var loopWarehouse in usedWarehouseList) { i++; if (i == 1) { warehouseName.Append(loopWarehouse.WH_Name); } else { warehouseName.Append(SysConst.Comma_DBC + loopWarehouse.WH_Name); } } //仓库已经被使用,不能删除 MessageBoxs.Show(Trans.PIS, this.ToString(), MsgHelp.GetMsg(MsgCode.W_0007, new object[] { warehouseName, MsgParam.APPLY, SystemActionEnum.Name.DELETE }), MessageBoxButtons.OK, MessageBoxIcon.Information); return; } //确认删除 DialogResult dialogResult = MessageBoxs.Show(Trans.PIS, this.ToString(), MsgHelp.GetMsg(MsgCode.W_0013, new object[] { checkedWarehouseList.Count }), MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if (dialogResult != DialogResult.OK) { return; } #endregion _bll.CopyModelList(checkedWarehouseList, deleteWarehouseList); string warehouseIdStr = string.Empty; foreach (var loopSelectedItem in deleteWarehouseList) { if (string.IsNullOrEmpty(loopSelectedItem.WH_ID)) { continue; } loopSelectedItem.WHERE_WH_ID = loopSelectedItem.WH_ID; warehouseIdStr += loopSelectedItem.WH_ID + SysConst.Semicolon_DBC; } //根据仓库ID查询仓位列表 _bll.QueryForList(SQLID.PIS_WarehouseManager_SQL03, warehouseIdStr, deleteWarehouseBinList); #endregion } #endregion #region 删除数据 if (deleteWarehouseList.Count > 0) { var deleteWarehouseResult = _bll.DeleteWarehouseAndBin(deleteWarehouseList, deleteWarehouseBinList); if (!deleteWarehouseResult) { //删除失败 MessageBoxs.Show(Trans.PIS, this.ToString(), _bll.ResultMsg, MessageBoxButtons.OK, MessageBoxIcon.Error); return; } //删除成功 MessageBoxs.Show(Trans.PIS, this.ToString(), MsgHelp.GetMsg(MsgCode.I_0001, new object[] { SystemActionEnum.Name.DELETE }), MessageBoxButtons.OK, MessageBoxIcon.Information); } #endregion //4.清空【详情】画面数据 InitializeDetailTabControls(); //刷新列表 RefreshList(true); //4.将DetailDS数据赋值给【详情】Tab内的对应控件 SetDetailDSToCardCtrls(); //将最新的值Copy到初始UIModel this.AcceptUIModelChanges(); }