示例#1
0
        protected override DomainRowInfo[] OnNewRow(DomainUser domainUser, DomainRowInfo[] rows, SignatureDateProvider signatureProvider)
        {
            this.dataSet.SignatureDateProvider = signatureProvider;

            try
            {
                for (var i = 0; i < rows.Length; i++)
                {
                    var view    = this.views[rows[i].TableName];
                    var rowView = CremaDomainUtility.AddNew(view, rows[i].Fields);
                    rows[i].Keys   = CremaDomainUtility.GetKeys(rowView);
                    rows[i].Fields = CremaDomainUtility.GetFields(rowView);
                }

                this.dataSet.AcceptChanges();

                return(rows);
            }
            catch (Exception e)
            {
                this.CremaHost.Error(e);
                this.dataSet.RejectChanges();
                throw e;
            }
        }
 protected override DomainRowInfo[] OnNewRow(DomainMember domainMember, DomainRowInfo[] rows, SignatureDateProvider signatureProvider)
 {
     this.template.SignatureDateProvider = signatureProvider;
     for (var i = 0; i < rows.Length; i++)
     {
         var rowView = CremaDomainUtility.AddNew(this.view, rows[i].Fields);
         rows[i].Keys   = CremaDomainUtility.GetKeys(rowView);
         rows[i].Fields = CremaDomainUtility.GetFields(rowView);
     }
     this.data = null;
     return(rows);
 }
示例#3
0
 protected override DomainRowInfo[] OnNewRow(DomainMember domainMember, DomainRowInfo[] rows, SignatureDateProvider signatureProvider)
 {
     this.dataType.SignatureDateProvider = signatureProvider;
     try
     {
         for (var i = 0; i < rows.Length; i++)
         {
             var rowView = CremaDomainUtility.AddNew(this.view, rows[i].Fields);
             rows[i].Keys   = CremaDomainUtility.GetKeys(rowView);
             rows[i].Fields = CremaDomainUtility.GetFields(rowView);
         }
         this.dataType.AcceptChanges();
         this.data = null;
         return(rows);
     }
     catch
     {
         this.dataType.RejectChanges();
         throw;
     }
 }