private void FindClick_Extend(object sender, UIActionEventArgs e) { //调用模版定义的默认实现方法.如需扩展,请直接在此编程. this.FindClick_DefaultImpl(sender,e); }
private void OnPrint_Extend(object sender, UIActionEventArgs e) { //调用模版定义的默认实现方法.如需扩展,请直接在此编程. this.OnPrint_DefaultImpl(sender,e); }
private void OnGridRowDbClick_Extend(object sender, UIActionEventArgs e) { //List Grid RowDbClic Code Demo... //string DataID = this.CurrentModel.PositionType.FocusedRecord.ID.ToString(); //string CardPageID="Test";//在这里CardPageID表示卡片的URI //OnNavigatCard("Browse", DataID, CardPageID); //调用模版定义的默认实现方法.如需扩展,请直接在此编程. this.OnGridRowDbClick_DefaultImpl(sender,e); }
//数据加载的扩展 private void OnLoadData_Extend(object sender, UIActionEventArgs e) { this.OnLoadData_DefaultImpl(sender,e); }
private void LastPage_Extend(object sender, UIActionEventArgs e) { //调用模版定义的默认实现方法.如需扩展,请直接在此编程. this.LastPage_DefaultImpl(sender,e); }
private void FindClick_Extend(object sender, UIActionEventArgs e) { //调用模版定义的默认实现方法.如需扩展,请直接在此编程. this.FindClick_DefaultImpl(sender, e); }
//数据加载的扩展 private void OnLoadData_Extend(object sender, UIActionEventArgs e) { this.OnLoadData_DefaultImpl(sender, e); }
private void OutputClick_Extend(object sender, UIActionEventArgs e) { //调用模版定义的默认实现方法.如需扩展,请直接在此编程. //this.OutputClick_DefaultImpl(sender,e); IExportSettings settings = ExportServiceFactory.GetInstance().CreateExportSettingsObject(); settings.PrintTemplateCatalogType = this.CurrentModel.FollowService.EntityFullName; //settings.DefaultPrintTemplateID = "6bb70641-a2e2-4e16-87f0-88594cecb86c"; FollowServiceRecord focusedRecord = this.CurrentModel.FollowService.FocusedRecord; if (!((focusedRecord == null) || string.IsNullOrEmpty(focusedRecord.DocumentType_PrintTemplate_TemplateID))) { settings.DefaultPrintTemplateID = focusedRecord.DocumentType_PrintTemplate_TemplateID; // settings.PrintTemplateCatalogType = this.CurrentModel.FollowService.EntityFullName; } // 有需要可去参考: UFIDA.U9.SCM.SD.ShipUIModel.ShipUIModelAction.GetPrintShipDataSet(); //settings.UserDataCallBack(new DataCallBackHandle(this, (IntPtr)this.GetPrintData)); //settings.get_ReportContext().Add("CurrencySymbol", "SAY " + this.CurrentModel.Branching.FocusedRecord.TC_Symbol + " "); settings.UserDataCallBack = new DataCallBackHandle(this.GetPrintData); e.Tag = settings; this.OutputClick_DefaultImpl(sender, e); }
private void BtnShowContent_Extend(object sender, UIActionEventArgs e) { //调用模版定义的默认实现方法.如需扩展,请直接在此编程. BtnShowContent_DefaultImpl(sender, e); }
private void LastPage_DefaultImpl(object sender, UIActionEventArgs e) { //加入{action.Name}的代码模版:.\UITpls\UICommonAction.tpl,参数:LastPage UFIDA.U9.UI.Commands.CommandFactory.DoCommand("LastPage", this, sender, e); }
/// <summary> /// Help: /// </summary> public void LastPage(object sender, UIActionEventArgs e) { //调用基类委托.. this.InvokeAction(sender, e, this.LastPage_Extend); }
/// <summary> /// 试算2功能 region之外的代码都是copy的U9反编译的代码 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public void TryCalc_Extend(object sender, UIActionEventArgs e) { #region Add by liufei string ids = "";//拼接请购行ID字符串 #endregion ListPRToPOUIModelAction listPRToPO = ((ListPRToPOUIModelAction)this.iPart.Action); listPRToPO.ClearErrorMessage(); listPRToPO.CalAmountAndSetRFQForCalcBtn(); IList <IUIRecord> selectRecordFromCache = UIRuntimeHelper.Instance.GetSelectRecordFromCache(listPRToPO.CurrentModel.PRLine); if (selectRecordFromCache == null || selectRecordFromCache.Count == 0) { throw new Exception(UFIDA.U9.SCM.PM.PRToPOUIModel.PRToPOUIModelRes.NoSelectedRecord); } listPRToPO.CurrentModel.TryCalcView.Records.Clear(); string text = ""; GetSupplierQuotaSVProxy getSupplierQuotaSVProxy = new GetSupplierQuotaSVProxy(); getSupplierQuotaSVProxy.QuotaReqList = new List <QuotaReqDTOData>(); int num = 1; Dictionary <long, int> dictionary = new Dictionary <long, int>(); using (IEnumerator <IUIRecord> enumerator = selectRecordFromCache.GetEnumerator()) { while (enumerator.MoveNext()) { PRLineRecord pRLineRecord = (PRLineRecord)enumerator.Current; #region Add by liufei ids += pRLineRecord.ID.ToString() + ","; #endregion if (!(pRLineRecord.ToPOQtyTU * pRLineRecord.TUToTBURate + pRLineRecord.ToPOQtyTBU <= 0m)) { if (!pRLineRecord.ItemInfo_ItemID_PurchaseInfo_IsNeedInquire || !(pRLineRecord.ItemInfo_ItemID_PurchaseInfo_InquireRule == InquireRuleEnum.EveryTime.Value)) { if ((!(pRLineRecord.ItemInfo_ItemID_PurchaseInfo_PurchaseQuotaMode == 6) && pRLineRecord.BizType != BusinessTypeEnum.PM050.Value) || !pRLineRecord.SuggestedSupplier_Supplier.HasValue || !pRLineRecord.SuggestedSupplier_Supplier.HasValue || pRLineRecord.SuggestedSupplier_Supplier.Value <= 0L) { QuotaReqDTOData quotaReqDTOData = new QuotaReqDTOData(); quotaReqDTOData.Item = new ItemInfoData(); if (pRLineRecord.BizType == BusinessTypeEnum.PM050.Value) { quotaReqDTOData.Item.ItemCode = pRLineRecord.ProcessItem_ItemCode; quotaReqDTOData.Item.ItemID = pRLineRecord.ProcessItem_ItemID.Value; quotaReqDTOData.Item.ItemName = pRLineRecord.ProcessItem_ItemName; if (pRLineRecord.ProcessItem_ItemOpt1.HasValue && pRLineRecord.ProcessItem_ItemOpt1.HasValue) { quotaReqDTOData.Item.ItemOpt1 = pRLineRecord.ProcessItem_ItemOpt1.Value; } if (pRLineRecord.ProcessItem_ItemOpt2.HasValue && pRLineRecord.ProcessItem_ItemOpt2.HasValue) { quotaReqDTOData.Item.ItemOpt2 = pRLineRecord.ProcessItem_ItemOpt2.Value; } if (pRLineRecord.ProcessItem_ItemOpt3.HasValue && pRLineRecord.ProcessItem_ItemOpt3.HasValue) { quotaReqDTOData.Item.ItemOpt3 = pRLineRecord.ProcessItem_ItemOpt3.Value; } if (pRLineRecord.ProcessItem_ItemOpt4.HasValue && pRLineRecord.ProcessItem_ItemOpt4.HasValue) { quotaReqDTOData.Item.ItemOpt4 = pRLineRecord.ProcessItem_ItemOpt4.Value; } if (pRLineRecord.ProcessItem_ItemOpt5.HasValue && pRLineRecord.ProcessItem_ItemOpt5.HasValue) { quotaReqDTOData.Item.ItemOpt5 = pRLineRecord.ProcessItem_ItemOpt5.Value; } if (pRLineRecord.ProcessItem_ItemOpt6.HasValue && pRLineRecord.ProcessItem_ItemOpt6.HasValue) { quotaReqDTOData.Item.ItemOpt6 = pRLineRecord.ProcessItem_ItemOpt6.Value; } if (pRLineRecord.ProcessItem_ItemOpt7.HasValue && pRLineRecord.ProcessItem_ItemOpt7.HasValue) { quotaReqDTOData.Item.ItemOpt7 = pRLineRecord.ProcessItem_ItemOpt7.Value; } if (pRLineRecord.ProcessItem_ItemOpt8.HasValue && pRLineRecord.ProcessItem_ItemOpt8.HasValue) { quotaReqDTOData.Item.ItemOpt8 = pRLineRecord.ProcessItem_ItemOpt8.Value; } if (pRLineRecord.ProcessItem_ItemOpt9.HasValue && pRLineRecord.ProcessItem_ItemOpt9.HasValue) { quotaReqDTOData.Item.ItemOpt9 = pRLineRecord.ProcessItem_ItemOpt9.Value; } if (pRLineRecord.ProcessItem_ItemOpt10.HasValue && pRLineRecord.ProcessItem_ItemOpt10.HasValue) { quotaReqDTOData.Item.ItemOpt10 = pRLineRecord.ProcessItem_ItemOpt10.Value; } if (pRLineRecord.ProcessItem_ItemPotency.HasValue && pRLineRecord.ProcessItem_ItemPotency.HasValue) { quotaReqDTOData.Item.ItemPotency = pRLineRecord.ProcessItem_ItemPotency.Value; } if (pRLineRecord.ProcessItem_ItemGrade.HasValue && pRLineRecord.ProcessItem_ItemGrade.HasValue) { quotaReqDTOData.Item.ItemGrade = pRLineRecord.ProcessItem_ItemGrade.Value; } if (pRLineRecord.ProcessItem_ItemVersion != null) { quotaReqDTOData.Item.ItemVersion = pRLineRecord.ProcessItem_ItemVersion; } } else { quotaReqDTOData.Item.ItemCode = pRLineRecord.ItemInfo_ItemCode; quotaReqDTOData.Item.ItemID = pRLineRecord.ItemInfo_ItemID.Value; quotaReqDTOData.Item.ItemName = pRLineRecord.ItemInfo_ItemName; if (pRLineRecord.ItemInfo_ItemOpt1.HasValue && pRLineRecord.ItemInfo_ItemOpt1.HasValue) { quotaReqDTOData.Item.ItemOpt1 = pRLineRecord.ItemInfo_ItemOpt1.Value; } if (pRLineRecord.ItemInfo_ItemOpt2.HasValue && pRLineRecord.ItemInfo_ItemOpt2.HasValue) { quotaReqDTOData.Item.ItemOpt2 = pRLineRecord.ItemInfo_ItemOpt2.Value; } if (pRLineRecord.ItemInfo_ItemOpt3.HasValue && pRLineRecord.ItemInfo_ItemOpt3.HasValue) { quotaReqDTOData.Item.ItemOpt3 = pRLineRecord.ItemInfo_ItemOpt3.Value; } if (pRLineRecord.ItemInfo_ItemOpt4.HasValue && pRLineRecord.ItemInfo_ItemOpt4.HasValue) { quotaReqDTOData.Item.ItemOpt4 = pRLineRecord.ItemInfo_ItemOpt4.Value; } if (pRLineRecord.ItemInfo_ItemOpt5.HasValue && pRLineRecord.ItemInfo_ItemOpt5.HasValue) { quotaReqDTOData.Item.ItemOpt5 = pRLineRecord.ItemInfo_ItemOpt5.Value; } if (pRLineRecord.ItemInfo_ItemOpt6.HasValue && pRLineRecord.ItemInfo_ItemOpt6.HasValue) { quotaReqDTOData.Item.ItemOpt6 = pRLineRecord.ItemInfo_ItemOpt6.Value; } if (pRLineRecord.ItemInfo_ItemOpt7.HasValue && pRLineRecord.ItemInfo_ItemOpt7.HasValue) { quotaReqDTOData.Item.ItemOpt7 = pRLineRecord.ItemInfo_ItemOpt7.Value; } if (pRLineRecord.ItemInfo_ItemOpt8.HasValue && pRLineRecord.ItemInfo_ItemOpt8.HasValue) { quotaReqDTOData.Item.ItemOpt8 = pRLineRecord.ItemInfo_ItemOpt8.Value; } if (pRLineRecord.ItemInfo_ItemOpt9.HasValue && pRLineRecord.ItemInfo_ItemOpt9.HasValue) { quotaReqDTOData.Item.ItemOpt9 = pRLineRecord.ItemInfo_ItemOpt9.Value; } if (pRLineRecord.ItemInfo_ItemOpt10.HasValue && pRLineRecord.ItemInfo_ItemOpt10.HasValue) { quotaReqDTOData.Item.ItemOpt10 = pRLineRecord.ItemInfo_ItemOpt10.Value; } if (pRLineRecord.ItemInfo_ItemPotency.HasValue && pRLineRecord.ItemInfo_ItemPotency.HasValue) { quotaReqDTOData.Item.ItemPotency = pRLineRecord.ItemInfo_ItemPotency.Value; } if (pRLineRecord.ItemInfo_ItemGrade.HasValue && pRLineRecord.ItemInfo_ItemGrade.HasValue) { quotaReqDTOData.Item.ItemGrade = pRLineRecord.ItemInfo_ItemGrade.Value; } if (pRLineRecord.ItemInfo_ItemVersion != null) { quotaReqDTOData.Item.ItemVersion = pRLineRecord.ItemInfo_ItemVersion; } } quotaReqDTOData.PurType = 3; quotaReqDTOData.ReqAmount = new DoubleQuantityData(); quotaReqDTOData.ReqAmount.Amount1 = pRLineRecord.ToPOQtyTU; quotaReqDTOData.ReqAmount.UOM1 = new UOMInfoDTOData(); if (pRLineRecord.BizType == BusinessTypeEnum.PM050.Value) { quotaReqDTOData.ReqAmount.UOM1.UOMMain = pRLineRecord.PM050Uom.Value; quotaReqDTOData.ReqAmount.UOM1.UOMSub = pRLineRecord.PM050BaseUom.Value; quotaReqDTOData.UsageQuantityType = Convert.ToInt32(pRLineRecord.ChargeBasis); quotaReqDTOData.ItemEntityKey = pRLineRecord.ProcessItem_ItemID.GetValueOrDefault(); quotaReqDTOData.PerProcessQty = pRLineRecord.RatioPerProduct.GetValueOrDefault(); quotaReqDTOData.OperationQty = new DoubleQuantityData(); quotaReqDTOData.OperationQty.UOM1 = new UOMInfoDTOData(); quotaReqDTOData.OperationQty.UOM2 = new UOMInfoDTOData(); quotaReqDTOData.OperationQty.Amount1 = pRLineRecord.PM050ForTOPOQtyTU.GetValueOrDefault(); quotaReqDTOData.OperationQty.Amount2 = pRLineRecord.PM050ForTOPOQtyTBU.GetValueOrDefault(); quotaReqDTOData.OperationQty.UOM1.UOMMain = pRLineRecord.PM050Uom.GetValueOrDefault(); quotaReqDTOData.OperationQty.UOM1.UOMSub = pRLineRecord.PM050BaseUom.GetValueOrDefault(); quotaReqDTOData.OperationQty.UOM1.Rate = pRLineRecord.TUToTBURate.GetValueOrDefault(); quotaReqDTOData.OperationQty.UOM2.UOMMain = pRLineRecord.PM050BaseUom.GetValueOrDefault(); quotaReqDTOData.OperationQty.UOM2.UOMSub = pRLineRecord.PM050BaseUom.GetValueOrDefault(); quotaReqDTOData.OperationQty.UOM2.Rate = 1m; } else { quotaReqDTOData.ReqAmount.UOM1.UOMMain = pRLineRecord.TradeUOM.Value; quotaReqDTOData.ReqAmount.UOM1.UOMSub = pRLineRecord.TradeBaseUOM.Value; } quotaReqDTOData.ReqAmount.Amount2 = pRLineRecord.ToPOQtyTBU; quotaReqDTOData.ReqAmount.UOM1.Rate = pRLineRecord.TUToTBURate.Value; quotaReqDTOData.ReqTime = pRLineRecord.RequiredDeliveryDate.Value; if (pRLineRecord.SrcDocType.HasValue && pRLineRecord.SrcDocType.GetValueOrDefault(-1) == 1) { quotaReqDTOData.VMIType = 0; } else { quotaReqDTOData.VMIType = 2; } if (pRLineRecord.ItemInfo_ItemID_ItemFormAttribute == 0) { if (pRLineRecord.SelectedResult_EntityID.HasValue) { quotaReqDTOData.BOMID = pRLineRecord.SelectedResult_EntityID.GetValueOrDefault(-1L); } } else if (pRLineRecord.BomID.HasValue) { quotaReqDTOData.BOMID = pRLineRecord.BomID.GetValueOrDefault(-1L); } if (pRLineRecord.Mfc.HasValue && pRLineRecord.Mfc.GetValueOrDefault(-1L) > 0L) { quotaReqDTOData.Mfc = pRLineRecord.Mfc.Value; } quotaReqDTOData.Index_1 = num; if (pRLineRecord.SuggestedSupplier_Supplier.HasValue && pRLineRecord.SuggestedSupplier_Supplier.HasValue && pRLineRecord.SuggestedSupplier_Supplier.Value > 0L) { quotaReqDTOData.Supplier = pRLineRecord.SuggestedSupplier_Supplier.Value; } getSupplierQuotaSVProxy.QuotaReqList.Add(quotaReqDTOData); dictionary.Add(pRLineRecord.ID, num); num++; } } } } } List <QuotaDTOData> list = getSupplierQuotaSVProxy.Do(); #region Add by liufei DataParamList dp = new DataParamList(); ids = ids.Substring(0, ids.Length - 1); dp.Add(DataParamFactory.Create("PRIDS", ids, ParameterDirection.Input, DbType.String, 50000)); dp.Add(DataParamFactory.CreateOutput("Result", DbType.String)); DataSet ds = new DataSet(); DataAccessor.RunSP("sp_Auctus_UI_GetSupplySource", dp, out ds); //按固定比例分配的料品是否存无厂商价目表、无供应商-料品交叉数据(即无MPQ) string result = dp["Result"].Value.ToString(); if (result != "0") { throw new Exception(UFIDA.U9.SCM.PM.PRToPOUIModel.PRToPOUIModelRes.DataError + result); } #endregion Dictionary <int, List <QuotaDTOData> > dictionary2 = new Dictionary <int, List <QuotaDTOData> >(); foreach (QuotaDTOData current in list) { if (dictionary2.ContainsKey(current.Index_1)) { dictionary2[current.Index_1].Add(current); } else { List <QuotaDTOData> list2 = new List <QuotaDTOData>(); list2.Add(current); dictionary2.Add(current.Index_1, list2); } } using (IEnumerator <IUIRecord> enumerator = selectRecordFromCache.GetEnumerator()) { while (enumerator.MoveNext()) { PRLineRecord pRLineRecord = (PRLineRecord)enumerator.Current; if (!(pRLineRecord.ToPOQtyTU * pRLineRecord.TUToTBURate + pRLineRecord.ToPOQtyTBU <= 0m)) { if (!pRLineRecord.ItemInfo_ItemID_PurchaseInfo_IsNeedInquire || !(pRLineRecord.ItemInfo_ItemID_PurchaseInfo_InquireRule == InquireRuleEnum.EveryTime.Value)) { if (text == "") { text = pRLineRecord.ID.ToString(); } else { text = text + "," + pRLineRecord.ID.ToString(); } if ((pRLineRecord.ItemInfo_ItemID_PurchaseInfo_PurchaseQuotaMode == 6 || pRLineRecord.BizType == BusinessTypeEnum.PM050.Value) && pRLineRecord.SuggestedSupplier_Supplier.HasValue && pRLineRecord.SuggestedSupplier_Supplier.HasValue && pRLineRecord.SuggestedSupplier_Supplier.Value > 0L) { TryCalcViewRecord tryCalcViewRecord = listPRToPO.CurrentModel.TryCalcView.AddNewUIRecord(); tryCalcViewRecord.RFQStatus = pRLineRecord.RFQStatus; tryCalcViewRecord.RFQ_SrcDocNo = pRLineRecord.RFQInfo_SrcDocNo; tryCalcViewRecord.Currency = pRLineRecord.PR_AC; tryCalcViewRecord.PRDocNo = pRLineRecord.PR_DocNo; tryCalcViewRecord.LineEntityID = new long?(pRLineRecord.ID); tryCalcViewRecord.ItemCode = pRLineRecord.ItemInfo_ItemCode; tryCalcViewRecord.ItemID = pRLineRecord.ItemInfo_ItemID; tryCalcViewRecord.ItemName = pRLineRecord.ItemInfo_ItemName; tryCalcViewRecord.ItemIsDual = new bool?(pRLineRecord.ItemInfo_ItemID_IsDualQuantity); tryCalcViewRecord.PRDocLineNo = new long?((long)pRLineRecord.DocLineNo); tryCalcViewRecord.RequiredDeliveryDate = pRLineRecord.RequiredDeliveryDate; tryCalcViewRecord.Supplier = pRLineRecord.SuggestedSupplier_Supplier; tryCalcViewRecord.Supplier_Code = pRLineRecord.SuggestedSupplier_Code; tryCalcViewRecord.Supplier_Name = pRLineRecord.SuggestedSupplier_Name; tryCalcViewRecord.DemandCode = pRLineRecord.DemandCode; tryCalcViewRecord.SPECS = pRLineRecord.ItemInfo_ItemID_SPECS; if (pRLineRecord.BizType == BusinessTypeEnum.PM050.Value) { tryCalcViewRecord.ToPOQtyTBU = 0m; tryCalcViewRecord.TradeBaseUom = new long?(0L); tryCalcViewRecord.TradeBaseUom_Code = ""; tryCalcViewRecord.TradeBaseUom_Name = ""; tryCalcViewRecord.TradeBaseUOM_Round_Precision = new int?(0); tryCalcViewRecord.TradeBaseUOM_Round_RoundType = new int?(0); tryCalcViewRecord.TradeBaseUOM_Round_RoundValue = new int?(0); } else { tryCalcViewRecord.ToPOQtyTBU = pRLineRecord.ToPOQtyTBU; tryCalcViewRecord.TradeBaseUom = pRLineRecord.TradeBaseUOM; tryCalcViewRecord.TradeBaseUom_Code = pRLineRecord.TradeBaseUOM_Code; tryCalcViewRecord.TradeBaseUom_Name = pRLineRecord.TradeBaseUOM_Name; tryCalcViewRecord.TradeBaseUOM_Round_Precision = new int?(pRLineRecord.TradeBaseUOM_Round_Precision); tryCalcViewRecord.TradeBaseUOM_Round_RoundType = new int?(pRLineRecord.TradeBaseUOM_Round_RoundType); tryCalcViewRecord.TradeBaseUOM_Round_RoundValue = pRLineRecord.TradeBaseUOM_Round_RoundValue; } tryCalcViewRecord.ToPOQtyTU = pRLineRecord.ToPOQtyTU; tryCalcViewRecord.TradeUom = pRLineRecord.TradeUOM; tryCalcViewRecord.TradeUom_Code = pRLineRecord.TradeUOM_Code; tryCalcViewRecord.TradeUom_Name = pRLineRecord.TradeUOM_Name; tryCalcViewRecord.TradeUOM_Round_Precision = new int?(pRLineRecord.TradeUOM_Round_Precision); tryCalcViewRecord.TradeUOM_Round_RoundType = new int?(pRLineRecord.TradeUOM_Round_RoundType); tryCalcViewRecord.TradeUOM_Round_RoundValue = pRLineRecord.TradeUOM_Round_RoundValue; tryCalcViewRecord.BizType = pRLineRecord.BizType; if (pRLineRecord.ItemInfo_ItemID_ItemFormAttribute == 16) { tryCalcViewRecord.IsMisc = new bool?(true); } else { tryCalcViewRecord.IsMisc = new bool?(false); } } else { try { if (dictionary.ContainsKey(pRLineRecord.ID) && dictionary2.ContainsKey(dictionary[pRLineRecord.ID])) { List <QuotaDTOData> list2 = dictionary2[dictionary[pRLineRecord.ID]]; #region ADD By liufei //固定比例分配模式的请购单 if (pRLineRecord.ItemInfo_ItemID_PurchaseInfo_PurchaseQuotaMode == 4)//固定比例分配模式 { DataRow[] dr = ds.Tables[0].Select("PRLineID=" + pRLineRecord.ID); if (dr.Length > 0) { foreach (DataRow item in dr) { if (Convert.ToDecimal(item["ActualReq"]) == 0) { list2.Remove(list2.Where(m => m.Supplier == Convert.ToInt64(item["Supplier"]) && m.SupplySource == Convert.ToInt64(item["SupplySource"])).Select(m => m).First()); } else { for (int i = 0; i < list2.Count; i++) { if (item["Supplier"].ToString() == list2[i].Supplier.ToString() && item["SupplySource"].ToString() == list2[i].SupplySource.ToString()) { list2[i].PurNum.Amount1 = Convert.ToDecimal(item["ActualReq"]); } } } } } } #endregion foreach (QuotaDTOData current2 in list2) { if (current2.PurNum.Amount1 == 0m && current2.PurNum.Amount2 == 0m) { throw new Exception(UFIDA.U9.SCM.PM.PRToPOUIModel.PRToPOUIModelRes.SupQtyZeroCannotGenPO); } TryCalcViewRecord tryCalcViewRecord = listPRToPO.CurrentModel.TryCalcView.AddNewUIRecord(); tryCalcViewRecord.RFQStatus = pRLineRecord.RFQStatus; tryCalcViewRecord.RFQ_SrcDocNo = pRLineRecord.RFQInfo_SrcDocNo; tryCalcViewRecord.Currency = pRLineRecord.PR_AC; tryCalcViewRecord.PRDocNo = pRLineRecord.PR_DocNo; tryCalcViewRecord.ItemID = pRLineRecord.ItemInfo_ItemID; tryCalcViewRecord.ItemCode = pRLineRecord.ItemInfo_ItemCode; tryCalcViewRecord.ItemName = pRLineRecord.ItemInfo_ItemName; tryCalcViewRecord.ItemIsDual = new bool?(pRLineRecord.ItemInfo_ItemID_IsDualQuantity); tryCalcViewRecord.PRDocLineNo = new long?((long)pRLineRecord.DocLineNo); tryCalcViewRecord.RequiredDeliveryDate = pRLineRecord.RequiredDeliveryDate; tryCalcViewRecord.TradeUom = pRLineRecord.TradeUOM; tryCalcViewRecord.TradeUom_Code = pRLineRecord.TradeUOM_Code; tryCalcViewRecord.TradeUom_Name = pRLineRecord.TradeUOM_Name; tryCalcViewRecord.LineEntityID = new long?(pRLineRecord.ID); tryCalcViewRecord.TradeUOM_Round_Precision = new int?(pRLineRecord.TradeUOM_Round_Precision); tryCalcViewRecord.TradeUOM_Round_RoundType = new int?(pRLineRecord.TradeUOM_Round_RoundType); tryCalcViewRecord.TradeUOM_Round_RoundValue = pRLineRecord.TradeUOM_Round_RoundValue; tryCalcViewRecord.DemandCode = pRLineRecord.DemandCode; tryCalcViewRecord.SPECS = pRLineRecord.ItemInfo_ItemID_SPECS; if (pRLineRecord.BizType == BusinessTypeEnum.PM050.Value) { tryCalcViewRecord.ToPOQtyTBU = 0m; tryCalcViewRecord.TradeBaseUom = new long?(0L); tryCalcViewRecord.TradeBaseUom_Code = ""; tryCalcViewRecord.TradeBaseUom_Name = ""; tryCalcViewRecord.TradeBaseUOM_Round_Precision = new int?(0); tryCalcViewRecord.TradeBaseUOM_Round_RoundType = new int?(0); tryCalcViewRecord.TradeBaseUOM_Round_RoundValue = new int?(0); if (pRLineRecord.ItemInfo_ItemID_IsDualQuantity) { tryCalcViewRecord.ToPOQtyTU = current2.PurNum.Amount1; } else { tryCalcViewRecord.ToPOQtyTU = current2.PurNum.Amount1; } } else { tryCalcViewRecord.TradeBaseUom = pRLineRecord.TradeBaseUOM; tryCalcViewRecord.TradeBaseUom_Code = pRLineRecord.TradeBaseUOM_Code; tryCalcViewRecord.TradeBaseUom_Name = pRLineRecord.TradeBaseUOM_Name; tryCalcViewRecord.TradeBaseUOM_Round_Precision = new int?(pRLineRecord.TradeBaseUOM_Round_Precision); tryCalcViewRecord.TradeBaseUOM_Round_RoundType = new int?(pRLineRecord.TradeBaseUOM_Round_RoundType); tryCalcViewRecord.TradeBaseUOM_Round_RoundValue = pRLineRecord.TradeBaseUOM_Round_RoundValue; if (pRLineRecord.ItemInfo_ItemID_IsDualQuantity) { tryCalcViewRecord.ToPOQtyTBU = current2.PurNum.Amount2; tryCalcViewRecord.ToPOQtyTU = current2.PurNum.Amount1; } else { tryCalcViewRecord.ToPOQtyTBU = 0m; tryCalcViewRecord.ToPOQtyTU = current2.PurNum.Amount1; } } tryCalcViewRecord.BizType = pRLineRecord.BizType; tryCalcViewRecord.Supplier = new long?(current2.Supplier); tryCalcViewRecord.Supplier_Code = current2.SupplierCode; tryCalcViewRecord.Supplier_Name = current2.SupplierName; } } else { TryCalcViewRecord tryCalcViewRecord = listPRToPO.CurrentModel.TryCalcView.AddNewUIRecord(); tryCalcViewRecord.RFQStatus = pRLineRecord.RFQStatus; tryCalcViewRecord.RFQ_SrcDocNo = pRLineRecord.RFQInfo_SrcDocNo; tryCalcViewRecord.Currency = pRLineRecord.PR_AC; tryCalcViewRecord.PRDocNo = pRLineRecord.PR_DocNo; tryCalcViewRecord.LineEntityID = new long?(pRLineRecord.ID); tryCalcViewRecord.ItemCode = pRLineRecord.ItemInfo_ItemCode; tryCalcViewRecord.ItemID = pRLineRecord.ItemInfo_ItemID; tryCalcViewRecord.ItemName = pRLineRecord.ItemInfo_ItemName; tryCalcViewRecord.ItemIsDual = new bool?(pRLineRecord.ItemInfo_ItemID_IsDualQuantity); tryCalcViewRecord.PRDocLineNo = new long?((long)pRLineRecord.DocLineNo); tryCalcViewRecord.RequiredDeliveryDate = pRLineRecord.RequiredDeliveryDate; tryCalcViewRecord.DemandCode = pRLineRecord.DemandCode; tryCalcViewRecord.SPECS = pRLineRecord.ItemInfo_ItemID_SPECS; if (pRLineRecord.BizType == BusinessTypeEnum.PM050.Value) { tryCalcViewRecord.ToPOQtyTBU = 0m; tryCalcViewRecord.TradeBaseUom = new long?(0L); tryCalcViewRecord.TradeBaseUom_Code = ""; tryCalcViewRecord.TradeBaseUom_Name = ""; tryCalcViewRecord.TradeBaseUOM_Round_Precision = new int?(0); tryCalcViewRecord.TradeBaseUOM_Round_RoundType = new int?(0); tryCalcViewRecord.TradeBaseUOM_Round_RoundValue = new int?(0); } else { tryCalcViewRecord.TradeBaseUom = pRLineRecord.TradeBaseUOM; tryCalcViewRecord.TradeBaseUom_Code = pRLineRecord.TradeBaseUOM_Code; tryCalcViewRecord.TradeBaseUom_Name = pRLineRecord.TradeBaseUOM_Name; tryCalcViewRecord.TradeBaseUOM_Round_Precision = new int?(pRLineRecord.TradeBaseUOM_Round_Precision); tryCalcViewRecord.TradeBaseUOM_Round_RoundType = new int?(pRLineRecord.TradeBaseUOM_Round_RoundType); tryCalcViewRecord.TradeBaseUOM_Round_RoundValue = pRLineRecord.TradeBaseUOM_Round_RoundValue; tryCalcViewRecord.ToPOQtyTBU = pRLineRecord.ToPOQtyTBU; } tryCalcViewRecord.ToPOQtyTU = pRLineRecord.ToPOQtyTU; tryCalcViewRecord.TradeUom = pRLineRecord.TradeUOM; tryCalcViewRecord.TradeUom_Code = pRLineRecord.TradeUOM_Code; tryCalcViewRecord.TradeUom_Name = pRLineRecord.TradeUOM_Name; tryCalcViewRecord.TradeUOM_Round_Precision = new int?(pRLineRecord.TradeUOM_Round_Precision); tryCalcViewRecord.TradeUOM_Round_RoundType = new int?(pRLineRecord.TradeUOM_Round_RoundType); tryCalcViewRecord.TradeUOM_Round_RoundValue = pRLineRecord.TradeUOM_Round_RoundValue; tryCalcViewRecord.BizType = pRLineRecord.BizType; if (pRLineRecord.ItemInfo_ItemID_ItemFormAttribute == 16) { tryCalcViewRecord.IsMisc = new bool?(true); } else { tryCalcViewRecord.IsMisc = new bool?(false); } listPRToPO.SetErrorMsg(tryCalcViewRecord, "Supplier", string.Concat(new string[] { UFIDA.U9.SCM.PM.PRToPOUIModel.PRToPOUIModelRes.LineNum1, tryCalcViewRecord.PRDocLineNo.GetValueOrDefault().ToString(), UFIDA.U9.SCM.PM.PRToPOUIModel.PRToPOUIModelRes.LineNum2, UFIDA.U9.SCM.PM.PRToPOUIModel.PRToPOUIModelRes.ItemCode, tryCalcViewRecord.ItemCode, UFIDA.U9.SCM.PM.PRToPOUIModel.PRToPOUIModelRes.SupplierBeNull })); } } catch (Exception ex) { throw ex; } } } } } } string partId = "6b00deb4-fdb4-4a1d-9848-398735643139"; string parentTaskId = listPRToPO.CurrentPart.TaskId.ToString(); string width = "810"; string height = "465"; listPRToPO.CurrentState["PRToPO_SelectedPrLineIDs"] = text; listPRToPO.CurrentPart.ShowModalDialog(partId, UFIDA.U9.SCM.PM.PRToPOUIModel.PRToPOUIModelRes.TryCalc, width, height, parentTaskId, null, false, true); }
private void OnOutPut_DefaultImpl(object sender, UIActionEventArgs e) { //加入{action.Name}的代码模版:.\UITpls\UICommonAction.tpl,参数:OnOutPut UFIDA.U9.UI.Commands.CommandFactory.DoCommand("OnOutPut", this, sender, e); }
private void OnCaseChanged_DefaultImpl(object sender, UIActionEventArgs e) { QryService.OnCaseChangedDefault("DDLCase", this.CurrentPart); QueryAdjust(); }
/// <summary> /// Help: /// </summary> public void OnCaseChanged(object sender, UIActionEventArgs e) { //调用基类委托.. this.InvokeAction(sender, e, this.OnCaseChanged_Extend); }
private void OnLoadData_DefaultImpl(object sender, UIActionEventArgs e) { InitCaseModel(); }
private void OnPrintBarCode_DefaultImpl(object sender, UIActionEventArgs e) { }
/// <summary> /// Help: /// </summary> public void AttachmentClick(object sender, UIActionEventArgs e) { //调用基类委托.. this.InvokeAction(sender, e, this.AttachmentClick_Extend); }
private void btnSaveCurrentQueryCase_Extend(object sender, UIActionEventArgs e) { //调用模版定义的默认实现方法.如需扩展,请直接在此编程. btnSaveCurrentQueryCase_DefaultImpl(sender, e); }
/// <summary> /// Help: /// </summary> public void OnClose(object sender, UIActionEventArgs e) { //调用基类委托.. this.InvokeAction(sender, e, this.OnClose_Extend); }
private void OnClose_Extend(object sender, UIActionEventArgs e) { //调用模版定义的默认实现方法.如需扩展,请直接在此编程. this.OnClose_DefaultImpl(sender, e); }
private void OnClose_DefaultImpl(object sender, UIActionEventArgs e) { }
//数据收集的扩展 private void OnDataCollect_Extend(object sender, UIActionEventArgs e) { this.OnDataCollect_DefaultImpl(sender, e); }
/// <summary> /// Help: 数据加载(发生在Form的初始化加载时) /// </summary> public void OnLoadData(object sender, UIActionEventArgs e) { //UBF扩展处... this.OnLoadData_Extend(sender, e); }
private void PrintClick_Extend(object sender, UIActionEventArgs e) { //调用模版定义的默认实现方法.如需扩展,请直接在此编程. //this.PrintClick_DefaultImpl(sender,e); this.CurrentModel.ClearErrorMessage(); this.CurrentPart.ShowWindowStatus(""); if (this.IsCanBePrintByStatus(this.CurrentModel.Feedback.FocusedRecord)) { IExportSettings exportSettings = PDPrintHelper.GetExportSettings(this.CurrentModel.Feedback.FocusedRecord); if (exportSettings != null) { //exportSettings.PrintTemplateCatalogType = "U9.SCM.SD.ShipPlan"; exportSettings.PrintTemplateCatalogType = this.CurrentModel.Feedback.EntityFullName; //exportSettings.UserDataCallBack = new DataCallBackHandle(this.GetPrintData); //exportSettings.OnFinished = new FinishCallBackHandle(this.OnPrintFinished_EX); //exportSettings.AfterLoadPrintTemplate = new PrintTemplateLoadedHandle(this.PrintTemplateLoadedHandle); e.Tag = exportSettings; this.PrintClick_DefaultImpl(sender, e); } } }
/// <summary> /// Help: 数据收集(发生在Form的CallBack或者是PostBack时) /// </summary> public void OnDataCollect(object sender, UIActionEventArgs e) { //UBF扩展处... this.OnDataCollect_Extend(sender, e); }
private void OnDataCollect_DefaultImpl(object sender, UIActionEventArgs e) { UFIDA.U9.UI.Commands.CommandFactory.DoCommand("DataCollect", this, sender, e); }
/// <summary> /// Help: /// </summary> public void DeleteClick(object sender, UIActionEventArgs e) { //调用基类委托.. this.InvokeAction(sender, e, this.DeleteClick_Extend); }
private void OnOk_Extend(object sender, UIActionEventArgs e) { //调用模版定义的默认实现方法.如需扩展,请直接在此编程. //this.OnOk_DefaultImpl(sender, e); /* // UFIDA.U9.FI.FN.FundsReceiveDocTypeUIModel.FNFundsReceiveDocTypeMainUIFormWebPart private void BtnOk_Click_DefaultImpl(object sender, EventArgs e) */ UFIDA.U9.UI.Commands.CommandFactory.DoCommand("OKClick", this, sender, e); }
private void DeleteClick_DefaultImpl(object sender, UIActionEventArgs e) { //加入{action.Name}的代码模版:.\UITpls\UICommonAction.tpl,参数:DeleteClick UFIDA.U9.UI.Commands.CommandFactory.DoCommand("DeleteClick", this, sender, e); }
//数据收集的扩展 private void OnDataCollect_Extend(object sender, UIActionEventArgs e) { this.OnDataCollect_DefaultImpl(sender,e); }
private void OnCaseChanged_Extend(object sender, UIActionEventArgs e) { //调用模版定义的默认实现方法.如需扩展,请直接在此编程. OnCaseChanged_DefaultImpl(sender, e); }
private void ListClick_Extend(object sender, UIActionEventArgs e) { //List Click Code Demo... //this.CurrentPart.NavigatePage("TestList", null); //this.ListClick_DefaultImpl(sender,e) ; //调用模版定义的默认实现方法.如需扩展,请直接在此编程. this.ListClick_DefaultImpl(sender,e); }
/// <summary> /// Help: /// </summary> public void OnPrintBarCode(object sender, UIActionEventArgs e) { //调用基类委托.. this.InvokeAction(sender, e, this.OnPrintBarCode_Extend); }