Exemple #1
0
        /// <summary>
        /// Updates the title.
        /// </summary>
        /// <param name="entities">The auto-generated <see cref="Microsoft.SharePoint.Linq.DataContext"/> object.</param>
        public void UpdateTitle(Entities entities)
        {
            string _quantity = String.Empty;
            IEnumerable <Disposal> _dspsls = this.Disposal(entities);

            if (_dspsls != null && _dspsls.Count() > 0)
            {
                _quantity = _dspsls.Sum <Disposal>(x => x.SettledQuantity.Value).ToString("F2");
            }
            else
            {
                _quantity = " --- ";
            }
            string _ClearanceTitleFormat = Settings.GetParameter(entities, SettingsEntry.ClearanceTitleFormat);

            Title = String.Format(_ClearanceTitleFormat, this.ProcedureCode, Entities.ToString(ClearenceProcedure.GetValueOrDefault(Linq.ClearenceProcedure.Invalid)),
                                  ReferenceNumber.NotAvailable(), _quantity, Id.GetValueOrDefault(-999));
        }
Exemple #2
0
        /// <summary>
        /// Updates the title.
        /// </summary>
        /// <param name="entities">The auto-generated <see cref="Microsoft.SharePoint.Linq.DataContext"/> object.</param>
        public void UpdateTitle(Entities entities, NamedTraceLogger.TraceAction traceEvent)
        {
            string _quantity = String.Empty;

            //IQueryable<CustomsWarehouseDisposal> _Dspsls = from _Dspx in entities.CustomsWarehouseDisposal where _Dspx == this.Id select {ssss = _d.s }
            //if ( this.Disposal.Any() )
            //  _quantity = this.Disposal.Sum<Disposal>( x => x.SettledQuantity.Value ).ToString( "F2" );
            //else
            //  _quantity = " --- ";
            traceEvent("Starting Clearence.UpdateTitle", 57, TraceSeverity.Verbose);
            string _ClearanceTitleFormat = Settings.GetParameter(entities, SettingsEntry.ClearanceTitleFormatCW);

            Title = String.Format(_ClearanceTitleFormat,
                                  this.ProcedureCode,                                                                     //0
                                  ClearenceProcedure.GetValueOrDefault(Linq.ClearenceProcedure.Invalid).Convert2String(), //1
                                  ReferenceNumber.NotAvailable(),                                                         //2
                                  Id.GetValueOrDefault(-999));                                                            //3
            traceEvent("Finished Clearence.UpdateTitle; new Title: " + Title, 66, TraceSeverity.Verbose);
        }