internal void AdjustTobaccoQuantity(ref decimal totalQuantity, NamedTraceLogger.TraceAction trace) { trace("Entering Material.AdjustTobaccoQuantity", 135, TraceSeverity.Verbose); decimal _available = Accounts2Dispose.Sum(y => y.TobaccoNotAllocatedDec) + Disposed; if (Math.Abs(_available - TobaccoQuantityDec) > Settings.MinimalOveruse) { return; } totalQuantity += _available - TobaccoQuantityDec; decimal _startingTobaccoQuantity = this.TobaccoQuantityDec; this.TobaccoQuantityDec = _available; Warnning _warnning = null; if (Accounts2Dispose.Count > 0) { string _tmpl = "Adjusted TobaccoQuantity of material: batch {0} IPR: {1}"; _warnning = new Warnning(String.Format(_tmpl, this.Batch, String.Concat(Accounts2Dispose.Select <IPR, string>(x => x.DocumentNo).ToArray <string>())), false); } else { string _tmpl = "Cleared TobaccoQuantity of {0}kg for the material: batch {1} because no account to adjust found."; _warnning = new Warnning(String.Format(_tmpl, _startingTobaccoQuantity, this.Batch), false); } trace("Wanning at Material.AdjustTobaccoQuantity: " + _warnning.Message, 135, TraceSeverity.Monitorable); }
/// <summary> /// Clear through customs. /// </summary> /// <param name="commonClearanceData">The common clearance data.</param> /// <param name="warnings">The warnings.</param> /// <param name="requestedUrl">The requested URL.</param> void ICWAccountFactory.ClearThroughCustoms(CommonClearanceData commonClearanceData, List <Warnning> warnings, string requestedUrl) { WebsiteModelExtensions.TraceEvent("Starting CWAccountData.ICWAccountFactory.ClearThroughCustoms", 159, TraceSeverity.Verbose, WebsiteModelExtensions.LoggingCategories.CloseAccount); string _at = "Beginning"; try { using (Entities _edc = new Entities(requestedUrl)) { _at = "ClearanceLookup"; Clearence _Clearance = Element.GetAtIndex <Clearence>(_edc.Clearence, commonClearanceData.ClearenceLookup); _Clearance.FinishClearThroughCustoms(_edc, (message, eventId, severity) => WebsiteModelExtensions.TraceEvent(message, eventId, severity, WebsiteModelExtensions.LoggingCategories.CloseAccount)); WebsiteModelExtensions.TraceEvent("ICWAccountFactory.ClearThroughCustoms at SubmitChanges", 168, TraceSeverity.Verbose, WebsiteModelExtensions.LoggingCategories.CloseAccount); _edc.SubmitChanges(); } } catch (Exception ex) { string _msg = string.Format(Properties.Resources.UnexpectedExceptionMessage, "ICWAccountFactory.CreateCWAccount", _at, ex.Message); WebsiteModelExtensions.TraceEvent(_msg, 173, TraceSeverity.High, WebsiteModelExtensions.LoggingCategories.CloseAccount); Warnning _wrn = new Warnning(_msg, true); warnings.Add(_wrn); } WebsiteModelExtensions.TraceEvent("Finishing CWAccountData.ICWAccountFactory.ClearThroughCustoms", 179, TraceSeverity.Verbose, WebsiteModelExtensions.LoggingCategories.CloseAccount); }
// Use this for initialization void Start() { /* * tryCreate = (GameObject)Resources.Load("EmptyObject"); * Instantiate(tryCreate); * tryCreate.transform.name = "tryCreate"; */ NCCodeFormat_Script = GameObject.Find("MainScript").GetComponent <NCCodeFormat>(); ProgramModule_Script = GameObject.Find("MainScript").GetComponent <ProgramModule>(); CooSystem_Script = GameObject.Find("MainScript").GetComponent <CooSystem>(); Main = GameObject.Find("MainScript").GetComponent <ControlPanel>(); Auto_Script = GameObject.Find("AutoMove").GetComponent <AutoMoveModule>(); Move_Script = GameObject.Find("move_control").GetComponent <MoveControl>(); SpindleControl_script = GameObject.Find("spindle_control").GetComponent <SpindleControl>(); PathLineDraw_Script = GameObject.Find("Main Camera").GetComponent <PathLineDraw>(); AutoToolChange_Script = GameObject.Find("ToolChange").GetComponent <AutoToolChangeModule>(); Warnning_Script = gameObject.GetComponent <Warnning>(); Softkey_Script = gameObject.GetComponent <SoftkeyModule>(); CooZeroPoint = new Vector3(0, 0, 0); singleStepEnd = 100; CurrentModal = new ModalCode_Fanuc_M(); // CurrentModal.RotateSpeed = 3000; GameObject ForCuttingWork = GameObject.Find("GameObject"); if (ForCuttingWork == null) { Debug.LogError("请添加空物体GameObject!"); return; } ForCuttingWork.name = "CuttingWork"; ForCuttingWork.AddComponent <CuttingWork>(); CuttingWork_Script = ForCuttingWork.GetComponent <CuttingWork>(); }
/// <summary> /// Creates the Customs Warehousing account. /// </summary> /// <param name="accountData">The account data.</param> /// <param name="warnings">The warnings collection.</param> /// <param name="requestedUrl">The The URL of a Windows SharePoint Services "14" Web site.</param> /// <exception cref="System.NotImplementedException"></exception> void ICWAccountFactory.CreateCWAccount(CommonAccountData accountData, List <Customs.Warnning> warnings, string requestedUrl) { string _at = "Beginning"; try { using (Entities _edc = new Entities(requestedUrl)) { if (Linq.CustomsWarehouse.RecordExist(_edc, accountData.DocumentNo)) { string _msg = "CW record with the same SAD document number: {0} exist"; throw new CreateCWAccountException(String.Format(_msg, accountData.DocumentNo)); } _at = "CommonAccountData"; this.CommonAccountData = accountData; _at = "ClearanceLookup"; this.ClearenceLookup = Element.GetAtIndex <Clearence>(_edc.Clearence, accountData.ClearenceLookup); _at = "ConsentLookup"; this.ConsentLookup = Element.GetAtIndex <Consent>(_edc.Consent, CommonAccountData.ConsentLookup); _at = "VendorLookup"; VendorLookup = Vendor.FirstOrDefault(_edc); _at = "PCNTariffCodeLookup"; PCNTariffCodeLookup = Element.GetAtIndex <PCNCode>(_edc.PCNCode, accountData.PCNTariffCodeLookup); _at = "AnalyzeGoodsDescription"; AnalizeGoodsDescription(_edc, ClearenceLookup.Clearence2SadGoodID.GoodsDescription, warnings); _at = "AnalyzeGoodsDescription"; AnalyzeCertificates(_edc, ClearenceLookup.Clearence2SadGoodID.SADRequiredDocuments(_edc, false), warnings); this.EntryDate = DateTime.Today; bool _fatal = (from _wx in warnings where _wx.Fatal select _wx).Any <Warnning>(); if (_fatal) { throw new CreateCWAccountException("There are fatal errors in the message - CW account is not created."); } CustomsWarehouse _cw = new CustomsWarehouse(_edc, this); _at = "InsertOnSubmit"; _edc.CustomsWarehouse.InsertOnSubmit(_cw); _at = "SubmitChanges #1"; _edc.SubmitChanges(); _at = "UpdateTitle"; _cw.UpdateTitle(); _at = "SubmitChanges #2"; _edc.SubmitChanges(); } } catch (CreateCWAccountException _ccwe) { Warnning _wrn = new Warnning(_ccwe.Message, true); warnings.Add(_wrn); } catch (Exception ex) { string _msg = string.Format(Properties.Resources.UnexpectedExceptionMessage, "ICWAccountFactory.CreateCWAccount", _at, ex.Message); Warnning _wrn = new Warnning(_msg, true); warnings.Add(_wrn); } }
public void warnning() { Aviso.SetActive(true); Warnning.GetComponent <TextMesh>().text = "Voce nao tem" + "\n" + " nenhum item desses!"; StartCoroutine(fecharAviso(1.5F)); }
public void warnning2() { Aviso.SetActive(true); Warnning.GetComponent <TextMesh>().text = "Voce nao escolheu" + "\n" + " nenhum item p/ vender"; StartCoroutine(fecharAviso(1.5F)); }
public void warnning() { Aviso.SetActive(true); Warnning.GetComponent <TextMesh>().text = "Voce nao tem" + "\n" + " dinheiro suficicente!"; StartCoroutine(fecharAviso(1.5F)); }