Beispiel #1
0
 public void AuditInfoConstructorTest1()
 {
     Resource author = null; // TODO: Initialize to an appropriate value
     DateTime auditTime = new DateTime(); // TODO: Initialize to an appropriate value
     string machineName = string.Empty; // TODO: Initialize to an appropriate value
     AuditInfo target = new AuditInfo(author, auditTime, machineName);
 }
Beispiel #2
0
	private void DrawTable(HtmlGenericControl place, AuditInfo info)
	{
		foreach (AuditBatch batch in info)
		{
			Control control = Page.LoadControl("~/Controls/AuditItem.ascx");
			control.GetType().InvokeMember("Initialise", System.Reflection.BindingFlags.InvokeMethod | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance,
				null, control, new Object[] { batch });

			place.Controls.Add(control);
		}
	}
Beispiel #3
0
	private void DrawPanel(HtmlGenericControl place, AuditInfo info)
	{
		if (info.Panel == null) return;

		place.Visible = true;
		edCreatedByID.Text = info.Panel.CreatedByID;
		edCreatedByScreenID.Text = info.Panel.CreatedByScreenID;
		edCreatedDateTime.Text = info.Panel.CreatedDateTime.ToString();
		edLastModifiedByID.Text = info.Panel.LastModifiedByID;		
		edLastModifiedByScreenID.Text = info.Panel.LastModifiedByScreenID;
		edLastModifiedDateTime.Text = info.Panel.LastModifiedDateTime.ToString();
	}
Beispiel #4
0
 /// <summary>
 /// Método encargado de crear objetos valor de tipo
 /// <see cref="IAuditInfo"/>
 /// </summary>
 /// <remarks>
 /// Sin comentarios especiales.
 /// </remarks>
 /// <param name="createdBy">
 /// Parámetro que indica el identificador del usuario
 /// que crea el registro.
 /// </param>
 /// <param name="updatedBy">
 /// Parámetro que indica el identificador del usuario
 /// que modifica el registro.
 /// </param>
 /// <param name="createTimestamp">
 /// Parámetro que indica la fecha de creación del registro.
 /// </param>
 /// <param name="updateTimestamp">
 /// Parámetro que indica la fecha de modificación del registro.
 /// </param>
 /// <returns>
 /// Devuelve el objeto valor <see cref="IAuditInfo"/> creado.
 /// </returns>
 public static IAuditInfo Create(
     string createdBy,
     string updatedBy,
     DateTime createTimestamp,
     DateTime? updateTimestamp)
 {
     // Creamos un objeto de tipo AuditInfo
     IAuditInfo auditInfo = new AuditInfo(
         createdBy,
         updatedBy,
         createTimestamp,
         updateTimestamp);
     // Devolvemos el resultado.
     return auditInfo;
 }
Beispiel #5
0
	private void DrawCaption(HtmlGenericControl place, AuditInfo info)
	{
		PXPanel panel = new PXPanel();
		panel.ContentLayout.Layout = LayoutType.Stack;
		panel.ContentLayout.Orientation = PX.Web.UI.Orientation.Horizontal;
		panel.RenderStyle = FieldsetStyle.Simple;
		panel.ContentLayout.InnerSpacing = true;
		panel.ContentLayout.SpacingSize = SpacingSize.Medium;
		panel.ContentLayout.OuterSpacing = SpacingDirection.Around;

		IParserAccessor pa = (IParserAccessor)panel;
		foreach (AuditValue value in info.Keys)
		{
			DrawItem(pa, value.DisplayName + ":", value.NewValue.ToString());
		}
		place.Controls.Add(panel);
	}
        /// <summary>
        /// Rolls the status report to the default date handled by the StatusRollProcessor
        /// </summary>
        /// <param name="report"></param>
        /// <param name="auditInfo"> </param>
        public StatusReport RollStatusReport(StatusReport report, AuditInfo auditInfo)
        {
            DateTime statusRollDate;
            if (!CanRollStatusReport(report, out statusRollDate)) throw new Exception("StatusReport already exists, cannot roll to that date");
            _logger.Debug("Rolling status report from {0:yyyy-mm-dd} started", report.PeriodStart);
            var rolledReport = new StatusReport
                                   {
                                       Caption = report.Caption,
                                       PeriodStart = statusRollDate,
                                       AuditInfo = auditInfo
                                   };

            report.Items.ToList().ForEach(
                si =>
                {
                    var mappedItem = RollStatusProcessor.MapStatusItem(si, rolledReport.PeriodStart);
                    // somehow the topic (and project too?) is an issue when mapping this item and storing via
                    // nhibernate.  the statusreport needs to share the same session.
                    if (mappedItem != null) rolledReport.Items.Add(mappedItem);
                });

            // var sess = this.StatusReportRepository.Session;

            using (var txn = this.StatusReportRepository.BeginTransaction())
            {
                try
                {
                    this.StatusReportRepository.Update(rolledReport);
                    txn.Commit();
                }
                catch (Exception exc)
                {
                    _logger.ErrorException("RollStatusReport error", exc);
                    txn.Rollback();
                    throw;
                }
            }
            _logger.Info("Rolled status report from {0:yyyy-mm-dd} to {1:yyyy-mm-dd}", report.PeriodStart, rolledReport.PeriodStart);
            return rolledReport;
        }
        public void SelectTemplate_Test()
        {
            // Arrange
            var richTemplate = new DataTemplate();
            object oldValue = "<p style=\"margin-top: 0px;margin-bottom: 0px;line-height: 1.15;\"><span style=\"font-family: 'Verdana';font-size: 11px;color: #FF0000;background-color: #8DB3E3;\">AB</span></p>";
            object newValue = "<p style=\"margin-top: 0px;margin-bottom: 0px;line-height: 1.15;\"><span style=\"font-family: 'Verdana';font-size: 11px;color: #FF0000;background-color: #8DB3E3;\">AB</span></p>";

            var item = new AuditInfo(1, null, 2, null, oldValue, newValue, DateTime.Now, null);
            var selector = new FieldAuditTemplateSelector { RichTextTemplate = richTemplate };

            // Assert
            Assert.AreEqual(selector.SelectTemplate(item, null), richTemplate);

            // Arrange
            oldValue = DateTime.Now;
            newValue = 1;
            item = new AuditInfo(1, null, 2, null, oldValue, newValue, DateTime.Now, null);

            // Assert
            Assert.IsNull(selector.SelectTemplate(item, null));

            // Arrange
            oldValue = "<p style=\"margin-top: 0px;margin-bottom: 0px;line-height: 1.15;\"><span style=\"font-family: 'Verdana';font-size: 11px;color: #FF0000;background-color: #8DB3E3;\">AB</span></p>";
            newValue = null;
            item = new AuditInfo(1, null, 2, null, oldValue, newValue, DateTime.Now, null);

            // Assert
            Assert.AreEqual(selector.SelectTemplate(item, null), richTemplate);

            // Arrange
            oldValue = null;
            newValue = "<p style=\"margin-top: 0px;margin-bottom: 0px;line-height: 1.15;\"><span style=\"font-family: 'Verdana';font-size: 11px;color: #FF0000;background-color: #8DB3E3;\">AB</span></p>";
            item = new AuditInfo(1, null, 2, null, oldValue, newValue, DateTime.Now, null);

            // Assert
            Assert.AreEqual(selector.SelectTemplate(item, null), richTemplate);
        }
Beispiel #8
0
        public IEntryBuilder AddFeederAudit(AuditInfo feederAudit)
        {
            _value.FeederAudit = feederAudit;

            return(this);
        }
 public Task SaveAsync(AuditInfo auditInfo)
 {
     Logs.Add(auditInfo);
     return(Task.FromResult(0));
 }
 /// <summary>
 /// 保存
 /// </summary>
 /// <param name="entity"></param>
 public void SaveAuditInfo(AuditInfo entity)
 {
     _auditInfoService.Save(entity);
 }
        public void ActionTestsParams()
        {
            
            var context = this.CreateWrappedContext<DefaultContainer>().Context;
            Employee e1 = new Employee {Salary = 300, Name = "bill", PersonId = 1005};
            Collection<string> specifications = new Collection<string> {"A", "B", "C"};
            DateTimeOffset purchaseTime = DateTimeOffset.Now;           
            ComputerDetail cd1 = new ComputerDetail {ComputerDetailId = 101, SpecificationsBag = new ObservableCollection<string>()};
            Customer c1 = new Customer { Name = "nill", CustomerId = 1007, Auditing = new AuditInfo { ModifiedBy = "No-one", ModifiedDate = DateTimeOffset.Now, Concurrency = new ConcurrencyInfo { Token = "Test", QueriedDateTime = DateTimeOffset.MinValue } } };
            AuditInfo a1 = new AuditInfo { ModifiedBy = "some-one", ModifiedDate =  DateTimeOffset.MinValue,Concurrency = new ConcurrencyInfo { Token = "Test", QueriedDateTime = DateTimeOffset.MinValue} };
            context.AddToCustomer(c1);
            context.AddToPerson(e1);
            context.AddToComputerDetail(cd1);
            var ar0 = context.BeginSaveChanges(null, null).EnqueueWait(this);
            context.EndSaveChanges(ar0);

            var ar1 = context.BeginExecute(new Uri("Person/Microsoft.Test.OData.Services.AstoriaDefaultService.Employee" + "/Microsoft.Test.OData.Services.AstoriaDefaultService.IncreaseSalaries", UriKind.Relative), null, null, "POST", new BodyOperationParameter("n", 100)).EnqueueWait(this);
            context.EndExecute(ar1);
            var ar11 = context.BeginLoadProperty(e1, "Salary", null, null).EnqueueWait(this);
            context.EndLoadProperty(ar11);
            Assert.AreEqual(400, e1.Salary);

            var ar2 = context.BeginExecute(new Uri("ComputerDetail(" + cd1.ComputerDetailId + ")" + "/Microsoft.Test.OData.Services.AstoriaDefaultService.ResetComputerDetailsSpecifications", UriKind.Relative), null, null, "POST", new BodyOperationParameter("specifications", specifications), new BodyOperationParameter("purchaseTime", purchaseTime)).EnqueueWait(this);
            context.EndExecute(ar2);
            var ar21 = context.BeginLoadProperty(cd1, "PurchaseDate", null, null).EnqueueWait(this);
            context.EndLoadProperty(ar21);
            var ar22 = context.BeginLoadProperty(cd1, "SpecificationsBag", null, null).EnqueueWait(this);
            context.EndLoadProperty(ar22);
            Assert.AreEqual(purchaseTime, cd1.PurchaseDate);
            Assert.AreEqual(specifications.Aggregate("", (current, item) => current + item),cd1.SpecificationsBag.Aggregate("", (current, item) => current + item));

            var ar3 = context.BeginExecute(new Uri("Customer(1007)/Microsoft.Test.OData.Services.AstoriaDefaultService.ChangeCustomerAuditInfo", UriKind.Relative), null, null, "POST", new BodyOperationParameter("auditInfo", a1)).EnqueueWait(this);
            context.EndExecute(ar3);
            var query = (from c in context.Customer where c.CustomerId == c1.CustomerId select c.Auditing ) as DataServiceQuery<AuditInfo>;
            var ar2222 = query.BeginExecute(null, null).EnqueueWait(this);
            var temp = (query.EndExecute(ar2222) as QueryOperationResponse<AuditInfo>);
            c1.Auditing = temp.SingleOrDefault();
            Assert.AreEqual(c1.Auditing.ModifiedBy , "some-one");
            Assert.AreEqual(c1.Auditing.ModifiedDate, DateTimeOffset.MinValue);
            this.EnqueueTestComplete();
        }
        public void MyTestInitialize()
        {
            _resourceRepository = _kernel.Get<IResourceRepository>();
            _projectRepository = _kernel.Get<IProjectRepository>();
            _statusReportRepository = _kernel.Get<IStatusReportRepository>();

            var resource = _resourceRepository.GetResourceByEmail("*****@*****.**");
            if (resource == null)
            {
                _resourceRepository.AddResource(new Resource()
                {
                    EmailAddress = "*****@*****.**",
                    FirstName = "Test",
                    LastName = "User"
                });
                resource = _resourceRepository.GetResourceByEmail("*****@*****.**");

            }
            _auditInfo = new AuditInfo(resource);
        }
Beispiel #13
0
 public Product()
 {
     ComplexConcurrency       = new ConcurrencyInfo();
     NestedComplexConcurrency = new AuditInfo();
 }
Beispiel #14
0
 public void AuditInfoConstructorTest2()
 {
     Resource author = null; // TODO: Initialize to an appropriate value
     AuditInfo target = new AuditInfo(author);
 }
Beispiel #15
0
 public PermissionBuilder WithCreated(AuditInfo created)
 {
     _created = created;
     return(this);
 }
Beispiel #16
0
 public void GetHashCodeTest()
 {
     var target = new AuditInfo(new Resource() {EmailAddress="*****@*****.**", FirstName = "Test", LastName = "User"});
     var target2 = new AuditInfo(new Resource() { EmailAddress = "*****@*****.**", FirstName = "Test", LastName = "User" });
     int expected = target2.GetHashCode();
     int actual = target.GetHashCode();
     Assert.AreEqual(expected, actual);
 }
Beispiel #17
0
 public void EqualsTest1()
 {
     AuditInfo target = new AuditInfo(new Resource() {EmailAddress="*****@*****.**", FirstName = "Test", LastName = "User"});
     object obj = null; // TODO: Initialize to an appropriate value
     bool expected = false; // TODO: Initialize to an appropriate value
     bool actual;
     actual = target.Equals(obj);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Beispiel #18
0
 public void EqualsTest()
 {
     var target = new AuditInfo(new Resource() { EmailAddress = "*****@*****.**", FirstName = "Test", LastName = "User" });
     var target2 = new AuditInfo(new Resource() { EmailAddress = "*****@*****.**", FirstName = "Test", LastName = "User" });
     Assert.IsTrue(target.Equals(target2));
 }
Beispiel #19
0
 public TestEntityModified(string id, AuditInfo auditInfo, string testProperty) : base(auditInfo, id)
 {
     TestProperty = testProperty;
 }
        private bool ExecuteFundsLoad(long id, long auditUserId, string auditWorkstation, int languageId, int cardIssueReasonId)
        {
            try
            {
                var fundsLoad = _fundsOperations.Retrieve(id, false, auditUserId, auditWorkstation);
                var auditInfo = new AuditInfo
                {
                    AuditUserId      = auditUserId,
                    AuditWorkStation = auditWorkstation,
                    LanguageId       = languageId
                };
                IntegrationController _integration = IntegrationController.Instance;
                var accountLookupLogic             = new Logic.AccountLookupLogic(_cardManService, _comsCore, _integration);
                log.Trace(t => t("ExecuteFundsLoad: CoreBankingAccountLookup"));
                var    cbsResponse = accountLookupLogic.CoreBankingAccountLookup(fundsLoad.IssuerId, fundsLoad.ProductId, cardIssueReasonId, fundsLoad.BranchId, fundsLoad.BankAccountNo, auditInfo);
                string responseMessage;

                if (cbsResponse.ResponseType == ResponseType.SUCCESSFUL)
                {
                    log.Trace(t => t("cbsResponse.ResponseType == ResponseType.SUCCESSFUL"));
                    CustomerDetails customerDetails = ExtractCustomerFromAccount(cbsResponse, fundsLoad.BranchId, fundsLoad.ProductId, fundsLoad.IssuerId, fundsLoad.Amount);
                    customerDetails.AccountNumber = fundsLoad.BankAccountNo;
                    customerDetails.FeeCharge     = fundsLoad.Amount;
                    customerDetails.TotalCharged  = fundsLoad.Amount;

                    bool accountLegDone = ExecuteBankAccountDebit(fundsLoad, customerDetails, auditUserId, auditWorkstation, languageId);
                    bool prepaidLegDone = false;
                    if (accountLegDone)
                    {
                        log.Trace(t => t("Account Leg Done"));
                        prepaidLegDone = ExecutePrepaidAccountCredit(fundsLoad);
                        if (prepaidLegDone)
                        {
                            log.Trace(t => t("Prepaid Leg Done"));
                            return(true);
                        }
                        else
                        {
                            //reverse the transaction to the main account
                            fundsLoad.Amount             = fundsLoad.Amount * -1;
                            customerDetails.TotalCharged = fundsLoad.Amount;

                            ExecuteBankAccountDebit(fundsLoad, customerDetails, auditUserId, auditWorkstation, languageId);
                            return(false);
                        }
                    }
                    else
                    {
                        log.Trace($"Account Leg Failed");
                    }
                }
                else
                {
                    log.Trace($"ExecuteFundLoad:cbsResponse.ResponseType <> ResponseType.SUCCESSFUL Actual Value is {cbsResponse.ResponseType} with message {cbsResponse.ResponseMessage}");
                    return(false);
                }
            }
            catch (Exception exp)
            {
                log.Error($"An exception occurred : { exp.Message}");
                return(false);
            }
            return(false);
        }
Beispiel #21
0
        //TODO: Method is too complex. Refactor!
        /// <summary>
        /// Builds the detail report.
        /// </summary>
        /// <param name="reportDocument">The report document.</param>
        public void BuildDetailReport(ICustomReport reportDocument)
        {
            var currentReport = reportDocument.Reports.First();

            var visibleSections = new List<Section>();
            var visibleFields = new List<PropertyInfo>();

            var textHeight = 0.2;
            var valueTextHeight = 0.6;
            var valueMargin = 0.1;
            var fieldMargin = 0.1;
            var sectionMargin = 0.3;

            //This report parameter holds id of the detail item
            _itemId = int.Parse(currentReport.ReportParameters["itemId"].Value.ToString());

            //This report parameter holds the current template system name.
            _processName = currentReport.ReportParameters["processName"].Value.ToString();

            GetEditableRoot(currentReport);

            var itemProperties = _item.GetAllPropertiesForInstance();
            var allItemSections = itemProperties.Where(x => x.Key.Name == "Sections").Reverse()
                                                .SelectMany(x => x.Key.GetValue(x.Value, null) as IList<ISection>)
                                                .Distinct(new SectionEqualityComparerByGuid());

            foreach (Section section in allItemSections)
            {
                var sections = currentReport.ReportParameters["sections"].Value.ToString().Split(';');
                var sectionIsVisible = false;
                var index = 0;

                while (!sectionIsVisible && index < sections.Length)
                {
                    if (sections[index] == section.Name)
                    {
                        sectionIsVisible = true;
                    }
                    index++;
                }

                if (sectionIsVisible)
                {
                    visibleSections.Add(section);
                }
            }

            _fieldAttrDict = GetFieldAttributes(itemProperties.Select(x => x.Key));
            
            var fields = _fieldAttrDict.Where(x => visibleSections.Select(s => s.Name).Contains(x.Value.SectionName))
                                       .Select(x => x.Key);

            foreach (var field in fields)
            {
                var fieldNames = currentReport.ReportParameters["fields"].Value.ToString().Split(';');
                var fieldIsVisible = false;
                var index = 0;

                while (!fieldIsVisible && index < fieldNames.Length)
                {
                    if (fieldNames[index] == field.Name)
                    {
                        fieldIsVisible = true;
                    }
                    index++;
                }

                if (fieldIsVisible)
                {
                    visibleFields.Add(field);
                }
            }

            double startY = 0;
            var availableWidth = currentReport.Width.Value;

            foreach (var section in visibleSections)
            {
                var sectionHeaderSize = new SizeU(new Unit(availableWidth, UnitType.Inch), new Unit(textHeight, UnitType.Inch));
                var headerLoc = new PointU(new Unit(0), new Unit(startY, UnitType.Inch));

                var sectionHeader = new TextBox { Value = section.Name, Location = headerLoc, Size = sectionHeaderSize, StyleName = "Section", Multiline = false, CanGrow = false };
                startY += textHeight + fieldMargin;

                currentReport.Items["detail"].Items.Add(sectionHeader);

                double percentageOfRowUsed = 0;
                var sectionFields = visibleFields.Where(x => _fieldAttrDict[x].SectionName == section.Name).OrderBy(y => _fieldAttrDict[y].FieldPosition).ToArray();

                for (var i = 0; i < sectionFields.Length; i++)
                {
                    if (percentageOfRowUsed + _fieldAttrDict[sectionFields[i]].WidthPercentage > 1.0)
                    {
                        startY += textHeight + valueMargin + valueTextHeight + fieldMargin;
                        percentageOfRowUsed = 0;
                    }

                    var location = new PointU(new Unit((availableWidth * percentageOfRowUsed), UnitType.Inch), new Unit(startY, UnitType.Inch));
                    var fieldPanel = new Panel { Location = location };

                    location = new PointU(Unit.Inch(0), Unit.Inch(0));
                    var fieldHeaderSize = new SizeU(new Unit((availableWidth * _fieldAttrDict[sectionFields[i]].WidthPercentage) - 0.1, UnitType.Inch), new Unit(textHeight, UnitType.Inch));
                    var fieldHeader = new TextBox { Location = location, Size = fieldHeaderSize, StyleName = "Field", Multiline = true, CanGrow = true };
                    fieldHeader.Value = GetDisplayName(sectionFields[i]);

                    var valueLocation = new PointU(Unit.Inch(0), Unit.Inch(textHeight + valueMargin));
                    var valueSize = new SizeU(new Unit((availableWidth * _fieldAttrDict[sectionFields[i]].WidthPercentage) - 0.1, UnitType.Inch), new Unit(valueTextHeight, UnitType.Inch));
                    var fieldValue = new TextBox { Location = valueLocation, Size = valueSize, StyleName = "Value", Multiline = true, CanGrow = true };

                    var backgroundProperty = _item.GetPropertyByName(sectionFields[i].Name + Constants.FieldBackColorPostfix);
                    if (backgroundProperty != null)
                    {
                        var colorAsLong = _item.GetValueByPropertyName(backgroundProperty.Name);

                        if (colorAsLong != 0)
                        {
                            var bytes = BitConverter.GetBytes(colorAsLong);
                            if (bytes[3] == 0) bytes[3] = 255;
                            var color = Color.FromArgb(bytes[3], bytes[2], bytes[1], bytes[0]);
                            fieldValue.Style.BackgroundColor = color;
                        }
                    }

                    var pictureBox = new PictureBox { Location = valueLocation, Size = valueSize, StyleName = "Value" };

                    List<Chart> chartsList = null;

                    Table fieldValueTable = null;

                    var displayFieldPath = string.Format("[{0}]", string.Join("].[", _item.GetFullPropertyPath(sectionFields[i].Name)));

                    if (_fieldAttrDict[sectionFields[i]].FieldEditor == "Approval")
                    {
                        fieldValue.Value = string.Format("=ApprovalEnumConverter({0}.ApprovalState)", displayFieldPath);
                    }
                    else if (_fieldAttrDict[sectionFields[i]].IsSingleCrossRef)
                    {
                        var displayField = _fieldAttrDict[sectionFields[i]].DisplayFieldList[0];
                        var crossRefMember =
                            itemProperties.FirstOrDefault(
                                x => x.Key.Name == string.Format("{0}Member", sectionFields[i].Name));

                        if (!crossRefMember.Equals(default(KeyValuePair<PropertyInfo, IDynamicObject>)))
                        {
                            var crossRefMemberValue = crossRefMember.Key.GetValue(crossRefMember.Value, null) as IDynamicObject;

                            if (crossRefMemberValue != null)
                            {
                                var infoList = TheDynamicTypeManager.GetInfoListById<IInfoList>(
                                                                        _fieldAttrDict[sectionFields[i]].CrossRefProcessName,
                                                                        ((IEditableRoot)crossRefMemberValue).Id);

                                if (infoList.Count > 0)
                                {
                                    var crossRefInfoValue = infoList[0] as IDynamicObject;
                                    var infoProps = crossRefInfoValue.GetAllPropertiesForInstance();

                                    var displayFieldProp = infoProps.FirstOrDefault(x => x.Key.Name == displayField).Key;
                                    if (displayFieldProp != null)
                                    {
                                        fieldValue.Value = displayFieldProp.GetValue(infoProps[displayFieldProp], null).ToString();
                                    }
                                }
                            }
                        }
                    }
                    else if (_fieldAttrDict[sectionFields[i]].IsMultiCrossRef)
                    {
                        var crList = _item.GetValueByPropertyName(sectionFields[i].Name) as ICrossRefItemList;
                        if (crList != null)
                        {
                            foreach (var item in crList)
                            {
                                fieldValue.Value += item + Environment.NewLine;
                            }
                        }
                    }
                    else if (_fieldAttrDict[sectionFields[i]].FieldEditor == typeof(DateTime).Name || _fieldAttrDict[sectionFields[i]].FieldEditor == "ScheduleDate")
                    {
                        fieldValue.Value = string.Format("=GetDateTimeValue({0}, \"{1}\")", displayFieldPath, _fieldAttrDict[sectionFields[i]].DateTimeFormat.Value);
                    }
                    else if (_fieldAttrDict[sectionFields[i]].FieldEditor == "Result")
                    {
                        var resultListFieldName = string.Format("{0}_ResultList", sectionFields[i].Name);
                        var resultist =
                            itemProperties.FirstOrDefault(
                                x => x.Key.Name == resultListFieldName);

                        if (!resultist.Equals(default(KeyValuePair<PropertyInfo, IDynamicObject>)))
                        {
                            var resultistValue = resultist.Key.GetValue(resultist.Value, null) as IEnumerable<ChoiceInfo>;

                            var resultistPath = string.Format("[{0}]", string.Join("].[", _item.GetFullPropertyPath(resultListFieldName)));

                            if (resultistValue != null)
                            {
                                fieldValue.Value = string.Format("=GetChoiceName({0}, {1})", resultistPath, displayFieldPath);
                            }
                        }
                        else
                            fieldValue.Value = string.Format("=Fields.{0}", displayFieldPath);
                    }
                    else if (_fieldAttrDict[sectionFields[i]].FieldEditor == "FileProcess")
                    {
                        if ((sectionFields[i].GetValue(itemProperties[sectionFields[i]], null) as IDynamicObject) != null)
                            fieldValue.Value = string.Format("=Fields.{0}.OriginalFileName", displayFieldPath);
                        else
                            fieldValue.Value = string.Format("=Fields.{0}", displayFieldPath);
                    }
                    else if (_fieldAttrDict[sectionFields[i]].FieldEditor == Constants.ChoiceFieldType)
                    {
                        var xml = sectionFields[i].GetValue(itemProperties[sectionFields[i]], null).ToString();

                        if (!string.IsNullOrEmpty(xml))
                        {
                            var choices = XElement.Parse(xml);
                            var isGlobal = choices.FirstAttribute.Value;

                            if (Convert.ToBoolean(isGlobal))
                            {
                                var id = choices.LastAttribute.Value;
                                var globalChoice = TheDynamicTypeManager.GetEditableRoot<IEditableRoot>(Constants.GlobalChoiceProcessName, Convert.ToInt32(id));

                                var newXml = (string)globalChoice.GetType().GetProperty("ChoiceDetails").GetValue(globalChoice, null);

                                if (!string.IsNullOrEmpty(newXml))
                                    choices = XElement.Parse(newXml);
                            }

                            if (choices.Descendants().Any())
                            {
                                var choiceInfoList = new List<ChoiceInfo>();

                                foreach (var element in choices.Descendants())
                                {
                                    choiceInfoList.Add(new ChoiceInfo
                                    {
                                        Choice = element.Attribute("Choice").Value,
                                        Score = double.Parse(element.Attribute("Score").Value),
                                        AcceptanceCriteria = (ChoiceInfo.AcceptanceCriterias)Enum.Parse(typeof(ChoiceInfo.AcceptanceCriterias), element.Attribute("AcceptanceCriteria").Value, false)
                                    });
                                }

                                var columns = new List<TableColumn>
                                    {
                                        new TableColumn("Choice", "Choice", fieldHeader.Size.Width * 0.5),
                                        new TableColumn("Score", "Score", fieldHeader.Size.Width * 0.2),
                                        new TableColumn("AcceptanceCriteria", "Criteria", fieldHeader.Size.Width * 0.3)
                                    };

                                fieldValueTable = CreateTable(columns);
                                fieldValueTable.Location = valueLocation;
                                fieldValueTable.DataSource = choiceInfoList;
                            }
                        }
                    }
                    else if (_fieldAttrDict[sectionFields[i]].FieldEditor == ColumnTypes.AuditTrail.ToString())
                    {
                        var columns = new List<TableColumn>
                        {
                            new TableColumn("UserName", "UserName", fieldHeader.Size.Width / 6),
                            new TableColumn("ChangeType", "Type", fieldHeader.Size.Width / 6),
                            new TableColumn("FieldName", "FieldName", fieldHeader.Size.Width / 6),
                            new TableColumn("OldValue", "OldValue", fieldHeader.Size.Width / 6),
                            new TableColumn("NewValue", "NewValue", fieldHeader.Size.Width / 6),
                            new TableColumn("UpdateDate", "UpdateDate", fieldHeader.Size.Width / 6)
                        };

                        fieldValueTable = CreateTable(columns);
                        fieldValueTable.Location = valueLocation;
                        var audits = sectionFields[i].GetValue(itemProperties[sectionFields[i]], null);

                        var auditList = ((IEnumerable)audits).Cast<AuditInfo>().ToList();
                        for (var j = 0; j < auditList.Count; j++)
                        {
                            if (!string.IsNullOrEmpty(auditList[j].FieldName))
                            {
                                foreach (var fieldParametrese in _fieldAttrDict)
                                {
                                    if (fieldParametrese.Key.Name == auditList[j].FieldName && fieldParametrese.Value.FieldEditor == "RichText")
                                    {
                                        var converter = new HtmlToText();
                                        var oldValue = converter.ConvertHtml(auditList[j].OldValue as string);
                                        var newValue = converter.ConvertHtml(auditList[j].NewValue as string);

                                        var newAudit = new AuditInfo(auditList[j].Id, auditList[j].ChangeType, auditList[j].ItemId, auditList[j].FieldName, oldValue, newValue, auditList[j].UpdateDate, auditList[j].UserName);
                                        auditList[j] = newAudit;
                                    }
                                }
                            }
                        }

                        fieldValueTable.DataSource = auditList;
                    }
                    else if (_fieldAttrDict[sectionFields[i]].IsReverseCrossRef)
                    {
                        //fieldValue.Value = string.Format("=Fields.{0}.ToString()", displayFieldPath);
                        var item = _item.GetValueByPropertyName(sectionFields[i].Name);

                        if (item != null)
                            fieldValue.Value = item.ToString();
                    }
                    else if (_fieldAttrDict[sectionFields[i]].IsMultiReverseCrossRef)
                    {
                        var list = _item.GetValueByPropertyName(sectionFields[i].Name) as IList;

                        if (list != null)
                        {
                            foreach (IReverseCrossReferenceItem item in list)
                            {
                                fieldValue.Value += item + "\n";
                            }
                        }
                    }
                    else if (_fieldAttrDict[sectionFields[i]].FieldEditor == "RichText")
                    {
                        fieldValue.Value = string.Format("=GetPlainTextValue({0})", displayFieldPath);
                    }
                    else if (_fieldAttrDict[sectionFields[i]].FieldEditor == ColumnTypes.Checklist.ToString())
                    {
                        var meta = new Dictionary<string, Type>();
                        var data = new List<object>();
                        short count = 0;

                        var checklistObject = (ChecklistEdit)sectionFields[i].GetValue(_item, null);

                        // checklist cache data
                        string resultPropertyName = null;
                        if (checklistObject.AnswerProcessList.Count > 0)
                        {
                            var tempProps = ((IEditableRoot)checklistObject.AnswerProcessList[0]).GetAllPropertiesForType();
                            foreach (var prop in tempProps)
                            {
                                var resultAttr = (FieldEditorAttribute)(from d in prop.GetCustomAttributes(typeof(FieldEditorAttribute), false) select d).FirstOrDefault();
                                if (resultAttr != null && resultAttr.DataType == Constants.ResultFieldType)
                                {
                                    resultPropertyName = prop.Name;
                                    break;
                                }
                            }
                        }
                        // end checklist cache

                        var displayFields = sectionFields[i].GetCustomAttributes<ChecklistDisplayFieldAttribute>().ToList();
                        
                        foreach (IEditableRoot editObject in checklistObject.AnswerProcessList)
                        {
                            var properties = editObject.GetAllPropertiesForType();
                            foreach (var property in properties)
                            {
                                if (displayFields.All(x => x.SystemName != property.Name))
                                {
                                    continue;
                                }

                                var csAttr = (CommonSettingsAttribute)(from d in property.GetCustomAttributes(typeof(CommonSettingsAttribute), false) select d).FirstOrDefault();
                                var feAttr = (FieldEditorAttribute)(from d in property.GetCustomAttributes(typeof(FieldEditorAttribute), false) select d).FirstOrDefault();
                                if (csAttr != null && csAttr.Section != null)
                                {
                                    if (checklistObject.AnswerProcessList.IndexOf(editObject) == 0)
                                    {
                                        var columnName = property.Name == resultPropertyName ? "Linked Item" : GetDisplayName(property);

                                        meta.Add(columnName, property.PropertyType == typeof(byte[]) ? typeof(byte[]) : typeof(string));
                                        count++;
                                    }

                                    var value = property.GetValue(editObject, null);
                                    if (value is string && string.IsNullOrWhiteSpace((string)value))
                                    {
                                        data.Add(string.Empty);
                                        continue;
                                    }

                                    //image
                                    if (property.PropertyType == typeof(byte[]))
                                    {
                                        data.Add(value);
                                        continue;
                                    }

                                    //file
                                    if (typeof(IFileProcess).IsAssignableFrom(property.PropertyType))
                                    {
                                        data.Add(((IFileProcess)value).OriginalFileName);
                                        continue;   
                                    }

                                    //sample
                                    if (typeof(ISampleList).IsAssignableFrom(property.PropertyType))
                                    {
                                        var answerList = _item.GetValueByPropertyName(string.Format("{0}List", sectionFields[i].Name));
                                        if (answerList is IEnumerable)
                                        {
                                            var sampleEdit = ((IEnumerable<IEditableRoot>)answerList).FirstOrDefault();

                                            if (sampleEdit != null)
                                            {
                                                var xml = sampleEdit.GetValueByPropertyName(string.Format("{0}{1}", property.Name, Constants.SampleSettingPostfix)) as string;
                                                if (!string.IsNullOrEmpty(xml))
                                                {
                                                    var sampleTypeFieldName = XElement.Parse(xml).Attribute("SampleTypeFieldName").Value;
                                                    var sampleTypeValue = sampleEdit.GetValueByPropertyName(sampleTypeFieldName);

                                                    if (sampleTypeValue != null)
                                                    {
                                                        var sampleType = (SampleTypes)Enum.Parse(typeof(SampleTypes), sampleTypeValue, false);

                                                        var result = new List<string>();
                                                        foreach (ISampleEdit item in (ISampleList)value)
                                                        {
                                                            switch (sampleType)
                                                            {
                                                                case SampleTypes.Boolean:
                                                                    result.Add(string.Format("{0} {1}", item.Label, item.SampleBoolean));
                                                                    break;

                                                                case SampleTypes.Number:
                                                                    result.Add(string.Format("{0} {1}", item.Label, item.SampleNumeric));
                                                                    break;

                                                                case SampleTypes.Alphanumeric:
                                                                    result.Add(string.Format("{0} {1}", item.Label, item.SampleAlphanumeric));
                                                                    break;
                                                            }
                                                        }
                                                        data.Add(string.Join(Environment.NewLine, result));
                                                        continue;
                                                    }
                                                }
                                            }
                                        }
                                    }

                                    if (feAttr != null && resultPropertyName != null && (feAttr.DataType == Constants.ChoiceFieldType || property.Name == resultPropertyName))
                                    {
                                        var choiceProperty = properties.FirstOrDefault(x => x.Name == resultPropertyName);
                                        double? choiceValue = null;
                                        if (choiceProperty != null)
                                        {
                                            choiceValue = (double?)choiceProperty.GetValue(editObject, null);
                                        }

                                        if (choiceValue.HasValue)
                                        {
                                            var resultProperty = properties.FirstOrDefault(x => x.Name == resultPropertyName + Constants.ResultListPostfix);

                                            var choiceInfoList = resultProperty.GetValue(editObject, null) as IEnumerable<ChoiceInfo>;
                                            if (choiceInfoList == null)
                                            {
                                                data.Add(string.Empty);
                                                continue;
                                            }

                                            var choiceInfo = choiceInfoList.FirstOrDefault(x => x.Score != null && x.Score == choiceValue);
                                            if (choiceInfo != null)
                                            {
                                                data.Add(property.Name == resultPropertyName ? choiceInfo.NewItemLinkContent : choiceInfo.Choice);
                                                continue;
                                            }

                                            if (choiceValue == default(double) && choiceInfo == null)
                                            {
                                                data.Add(string.Empty);
                                                continue;
                                            }
                                        }
                                    }

                                    try
                                    {
                                        data.Add(Convert.ToString(value));
                                    }
                                    catch
                                    {
                                        data.Add(string.Empty);
                                    }
                                }
                            }
                        }

                        // populate table
                        var workTable = new DataTable();
                        foreach (var column in meta)
                        {
                            workTable.Columns.Add(column.Key, column.Value);
                        }

                        for (var j = 0; j < data.Count; j += count)
                        {
                            var row = new object[count];
                            for (var k = 0; k < count; k++)
                            {
                                row[k] = data[j + k];
                            }
                            workTable.Rows.Add(row);
                        }

                        // create report table
                        var columns = meta.Select(x => new TableColumn(x.Key, x.Key, fieldHeader.Size.Width / meta.Count, x.Value)).ToList();

                        fieldValueTable = CreateTable(columns);
                        fieldValueTable.Location = valueLocation;
                        fieldValueTable.DataSource = workTable;
                    }
                    else if (_fieldAttrDict[sectionFields[i]].FieldEditor == "Image")
                    {
                        byte[] imageBytes = (byte[])sectionFields[i].GetValue(itemProperties[sectionFields[i]], null);
                        if (imageBytes != null)
                        {
                            var ms = new MemoryStream(imageBytes);

                            if (ms != null && ms.Length > 0)
                            {
                                pictureBox.Value = Image.FromStream(ms);
                                pictureBox.Height = new Unit(((Image) pictureBox.Value).Height, UnitType.Pixel);
                            }
                        }
                    }
                    else if (_fieldAttrDict[sectionFields[i]].FieldEditor == "Checkbox")
                    {
                        if ((bool)_fieldAttrDict[sectionFields[i]].IsSwitchToggle.Value)
                        {
                            fieldValue.Value = string.Format("=GetBoolValue(\"{0}\", \"{1}\", \"{2}\", {3})",
                                                             _fieldAttrDict[sectionFields[i]].UndefinedLabel.Value,
                                                             _fieldAttrDict[sectionFields[i]].TrueLabel.Value,
                                                             _fieldAttrDict[sectionFields[i]].FalseLabel.Value,
                                                             displayFieldPath);
                        }
                        else
                        {
                            fieldValue.Value = string.Format("={0}", displayFieldPath);
                        }
                    }
                    else if (_fieldAttrDict[sectionFields[i]].FieldEditor == Constants.SampleFieldType)
                    {
                        var xml = _item.GetValueByPropertyName(string.Format("{0}{1}", sectionFields[i].Name, Constants.SampleSettingPostfix)) as string;
                        if (!string.IsNullOrEmpty(xml))
                        {
                            var sampleTypeFieldName = XElement.Parse(xml).Attribute("SampleTypeFieldName").Value;
                            var sampleTypeValue = _item.GetValueByPropertyName(sampleTypeFieldName);

                            if (sampleTypeValue != null)
                            {
                                var sampleType = (SampleTypes)Enum.Parse(typeof(SampleTypes), sampleTypeValue, false);

                                var list = _item.GetValueByPropertyName(sectionFields[i].Name);

                                string sampleColumnName = null;
                                switch (sampleType)
                                {
                                    case SampleTypes.Boolean:
                                        sampleColumnName = "SampleBoolean";
                                        break;

                                    case SampleTypes.Number:
                                        sampleColumnName = "SampleNumeric";
                                        break;

                                    case SampleTypes.Alphanumeric:
                                        sampleColumnName = "SampleAlphanumeric";
                                        break;
                                }

                                var columns = new List<TableColumn>
                                    {
                                        new TableColumn("Label", "Nr", fieldHeader.Size.Width/2),
                                        new TableColumn(sampleColumnName, "Value", fieldHeader.Size.Width/2),
                                    };

                                fieldValueTable = CreateTable(columns);
                                fieldValueTable.Location = valueLocation;
                                fieldValueTable.DataSource = list;
                            }
                        }
                    }
                    else if (_fieldAttrDict[sectionFields[i]].FieldEditor == "SpcChart")
                    {
                        //var settings = sectionFields[i].GetValue(itemProperties[sectionFields[i]], null) as string;
                        //chartsList = GetCharts(sectionFields[i], settings, valueLocation, valueSize);

                        fieldValue.Value = "SPC Chart not supported on Easy Report";
                    }

                    else if (_fieldAttrDict[sectionFields[i]].FieldType.ColumnType == ColumnTypes.Numeric || 
                        _fieldAttrDict[sectionFields[i]].FieldType.ColumnType == ColumnTypes.Double || 
                        _fieldAttrDict[sectionFields[i]].FieldType.ColumnType == ColumnTypes.Integer)
                    {
                        fieldValue.Value = string.Format(@"=GetNumericValue(Fields.{0}, ""{1}"", ""{2}"")", displayFieldPath, _fieldAttrDict[sectionFields[i]].Numeric.NumericType, currentReport.ReportParameters["userCurrency"].Value );
                    }
                    else if (_fieldAttrDict[sectionFields[i]].DisplayListField != null)
                    {
                        var displayListProperty = sectionFields[i];
                        var processName = GetDeclaringProcessSystemName(displayListProperty);
                        var itemType = TheDynamicTypeManager.GetDisplayListItemType(processName, displayListProperty.Name);

                        var listOfFields = _fieldAttrDict[sectionFields[i]].DisplayListField.DisplayFieldList;
                        var displayFields = new List<string>();

                        if (!string.IsNullOrEmpty(listOfFields))
                        {
                            displayFields.AddRange(listOfFields.Split('|'));
                        }

                        // populate table
                        var workTable = new DataTable();

                        // Add table columns.
                        foreach (var propertyName in displayFields)
                        {
                            var property = itemType.GetPropertyByName(propertyName);
                            if (property == null)
                                continue;

                            var columnType = property.PropertyType;
                            if (columnType != typeof(byte[]))
                                columnType = typeof(string);

                            var column = workTable.Columns.Add(propertyName, columnType);

                            column.Caption = GetDisplayName(property);
                        }

                        // Add table rows.
                        foreach (IDynamicObject info in _item.GetValueByPropertyName(displayListProperty.Name))
                        {
                            var row = workTable.NewRow();

                            foreach (DataColumn column in workTable.Columns)
                            {
                                var value = info.GetValueByPropertyName(column.ColumnName);

                                if (value == null)
                                    continue;

                                if (value is byte[])
                                {
                                    row[column] = value;
                                }
                                else
                                {
                                    row[column] = value.ToString();
                                }
                            }

                            workTable.Rows.Add(row);
                        }

                        // create report table
                        var columns =
                            workTable.Columns.Cast<DataColumn>()
                                .Select(c => new TableColumn(c.ColumnName, c.Caption, fieldHeader.Size.Width / workTable.Columns.Count, c.DataType))
                                .ToList();

                        fieldValueTable = CreateTable(columns);
                        fieldValueTable.Location = valueLocation;
                        fieldValueTable.DataSource = workTable;
                    }
                    else
                    {
                        fieldValue.Value = string.Format("=Fields.{0}", displayFieldPath);
                    }

                    ReportItem valueItem;

                    if (fieldValueTable != null)
                        valueItem = fieldValueTable;
                    else
                        valueItem = fieldValue;

                    fieldPanel.Size = new SizeU(fieldHeaderSize.Width, Unit.Inch(textHeight + valueTextHeight));

                    if (pictureBox.Value != null)
                    {
                        fieldPanel.Items.AddRange(new ReportItemBase[] { fieldHeader, pictureBox });
                    }
                    else if (chartsList != null && chartsList.Count > 0)
                    {
                        fieldPanel.Items.Add(fieldHeader);
                        foreach (var chart in chartsList)
                            fieldPanel.Items.Add(chart);
                    }
                    else
                    {
                        fieldPanel.Items.AddRange(new[] { fieldHeader, valueItem });
                    }

                    currentReport.Items["detail"].Items.Add(fieldPanel);

                    percentageOfRowUsed += _fieldAttrDict[sectionFields[i]].WidthPercentage;
                }

                startY += sectionMargin + valueTextHeight;
            }
        }
        /// <summary>
        /// Execute actions with parameter ( Primitive, complex, collection, multiple ) Parms
        /// </summary>
        // github issuse: #896
        // [Fact, Asynchronous]
        public void ActionTestsParams()
        {
            var      context = this.CreateWrappedContext <DefaultContainer>().Context;
            Employee e1      = new Employee {
                Salary = 300, Name = "bill", PersonId = 1005
            };
            Collection <string> specifications = new Collection <string> {
                "A", "B", "C"
            };
            DateTimeOffset purchaseTime = DateTimeOffset.Now;
            ComputerDetail cd1          = new ComputerDetail {
                ComputerDetailId = 101, SpecificationsBag = new ObservableCollection <string>()
            };
            Customer c1 = new Customer {
                Name = "nill", CustomerId = 1007, Auditing = new AuditInfo {
                    ModifiedBy = "No-one", ModifiedDate = DateTimeOffset.Now, Concurrency = new ConcurrencyInfo {
                        Token = "Test", QueriedDateTime = DateTimeOffset.MinValue
                    }
                }
            };
            AuditInfo a1 = new AuditInfo {
                ModifiedBy = "some-one", ModifiedDate = DateTimeOffset.MinValue, Concurrency = new ConcurrencyInfo {
                    Token = "Test", QueriedDateTime = DateTimeOffset.MinValue
                }
            };

            context.AddToCustomer(c1);
            context.AddToPerson(e1);
            context.AddToComputerDetail(cd1);
            var ar0 = context.BeginSaveChanges(null, null).EnqueueWait(this);

            context.EndSaveChanges(ar0);

            var ar1 = context.BeginExecute(new Uri("Person/Microsoft.Test.OData.Services.AstoriaDefaultService.Employee" + "/Microsoft.Test.OData.Services.AstoriaDefaultService.IncreaseSalaries", UriKind.Relative), null, null, "POST", new BodyOperationParameter("n", 100)).EnqueueWait(this);

            context.EndExecute(ar1);
            var ar11 = context.BeginLoadProperty(e1, "Salary", null, null).EnqueueWait(this);

            context.EndLoadProperty(ar11);
            Assert.Equal(400, e1.Salary);

            var ar2 = context.BeginExecute(new Uri("ComputerDetail(" + cd1.ComputerDetailId + ")" + "/Microsoft.Test.OData.Services.AstoriaDefaultService.ResetComputerDetailsSpecifications", UriKind.Relative), null, null, "POST", new BodyOperationParameter("specifications", specifications), new BodyOperationParameter("purchaseTime", purchaseTime)).EnqueueWait(this);

            context.EndExecute(ar2);
            var ar21 = context.BeginLoadProperty(cd1, "PurchaseDate", null, null).EnqueueWait(this);

            context.EndLoadProperty(ar21);
            var ar22 = context.BeginLoadProperty(cd1, "SpecificationsBag", null, null).EnqueueWait(this);

            context.EndLoadProperty(ar22);
            Assert.Equal(purchaseTime, cd1.PurchaseDate);
            Assert.Equal(specifications.Aggregate("", (current, item) => current + item), cd1.SpecificationsBag.Aggregate("", (current, item) => current + item));

            var ar3 = context.BeginExecute(new Uri("Customer(1007)/Microsoft.Test.OData.Services.AstoriaDefaultService.ChangeCustomerAuditInfo", UriKind.Relative), null, null, "POST", new BodyOperationParameter("auditInfo", a1)).EnqueueWait(this);

            context.EndExecute(ar3);
            var query  = (from c in context.Customer where c.CustomerId == c1.CustomerId select c.Auditing) as DataServiceQuery <AuditInfo>;
            var ar2222 = query.BeginExecute(null, null).EnqueueWait(this);
            var temp   = (query.EndExecute(ar2222) as QueryOperationResponse <AuditInfo>);

            c1.Auditing = temp.SingleOrDefault();
            Assert.Equal(c1.Auditing.ModifiedBy, "some-one");
            Assert.Equal(c1.Auditing.ModifiedDate, DateTimeOffset.MinValue);
            this.EnqueueTestComplete();
        }
Beispiel #23
0
 public Customer()
 {
     ContactInfo = new ContactDetails();
     Auditing    = new AuditInfo();
 }
 public void Update(AuditInfo auditInfo, string id, string testProperty)
 {
     RaiseEvent(new TestEntityModified(id, auditInfo, testProperty));
 }
 public void Create(AuditInfo auditInfo, string id)
 {
     RaiseEvent(new TestEntityCreated(id, auditInfo));
 }
Beispiel #26
0
 public static AuditInfo CreateAuditInfo(global::System.DateTimeOffset modifiedDate)
 {
     AuditInfo auditInfo = new AuditInfo();
     auditInfo.ModifiedDate = modifiedDate;
     return auditInfo;
 }
Beispiel #27
0
 public virtual void Audit(AuditInfo auditInfo)
 {
     createInstance();
     BaseDBObject.Audit(auditInfo);
     tr.Dispose();
 }
Beispiel #28
0
        public ICompositionBuilder AddFeederAudit(AuditInfo feederAudit)
        {
            _value.FeederAudit = feederAudit;

            return(this);
        }
Beispiel #29
0
 partial void OnAuditingChanging(AuditInfo value);
Beispiel #30
0
 public PermissionBuilder WithUpdated(AuditInfo updated)
 {
     _updated = updated;
     return(this);
 }
Beispiel #31
0
 partial void OnNestedComplexConcurrencyChanging(AuditInfo value);
Beispiel #32
0
 public AspNetCoreAuditInfoWapper(AuditInfo auditInfo) : base(auditInfo)
 {
 }
 public void Fill(AuditInfo auditInfo)
 {
     
 }
Beispiel #34
0
        public ICompositionBuilder AddCommittal(AuditInfo committal)
        {
            _value.Committal = committal;

            return(this);
        }