示例#1
0
        public IMapping_rep CreateMapping(IMapping_rep x)
        {
            DMEEditor.ErrorObject.Flag = Errors.Ok;
            try
            {
                IDataSource ds1 = DMEEditor.GetDataSource(x.Entity1DataSource);
                IDataSource ds2 = DMEEditor.GetDataSource(x.Entity2DataSource);
                if (ds1 == null || ds2 == null)
                {
                    DMEEditor.ErrorObject.Flag    = Errors.Failed;
                    DMEEditor.ErrorObject.Message = "one of the Datasources Dont Exist";
                    DMEEditor.Logger.WriteLog($"one of the Datasources Dont Exist");
                }
                else
                {
                    EntityStructure dt1 = ds1.GetEntityStructure(x.EntityName1, false);
                    EntityStructure dt2 = ds2.GetEntityStructure(x.EntityName2, false);
                    x.Entity1Fields = dt1.Fields;

                    x.Entity2Fields = dt2.Fields;
                    DMEEditor.Logger.WriteLog($"Successful in Creating Mapping");
                }
            }
            catch (System.Exception ex)
            {
                DMEEditor.ErrorObject.Flag = Errors.Failed;
                DMEEditor.ErrorObject.Ex   = ex;
                x = null;
                DMEEditor.Logger.WriteLog($"Error in Creating Mapping({ex.Message})");
            }

            return(x);
        }
 public virtual IErrorsInfo UpdateEntity(string EntityName, object UploadDataRow, IMapping_rep Mapping = null)
 {
     throw new NotImplementedException();
 }
 public IErrorsInfo DeleteEntity(string EntityName, object DeletedDataRow, IMapping_rep Mapping = null)
 {
     throw new NotImplementedException();
 }
示例#4
0
 public IErrorsInfo LoadDataToEntity(string EntityName, DataTable UploadData, IMapping_rep Mapping)
 {
     throw new NotImplementedException();
 }