Пример #1
0
 public CountryDAL(ApplicationDbContext db, IMemoryMain memory, IErrorSet ErrorsGlobal)
     : base(db, ErrorsGlobal)
 {
     IsDuplicateNameAllowed = false;
     ErrorsGlobal.ClassName = GetSelfClassName();
     _memory = memory;
 }
Пример #2
0
        private IErrorSet ValidateOneSet(AttributeSet attrSet)
        {
            IErrorSet errSet = null;

            XmlDocument xml = new XmlDocument();

            xml.LoadXml(this.XmlProvider.GetCSXmlText(attrSet));

            foreach (Attribute attr in attrSet.Attribute)
            {
                string      select = getRuleSelectString(attrSet.attributeSetID, attr.attributeID);
                XmlNodeList rules  = xml.SelectNodes(select);

                int rCnt = rules.Count;
                for (int r = 0; r < rCnt; r++)
                {
                    IError err = ValidateAttr(attr, rules.Item(r));
                    if (err != null)
                    {
                        if (errSet == null)
                        {
                            errSet = new ErrorSet(attrSet.attributeSetID);
                        }

                        errSet.Add(err);
                    }
                }
            }

            return(errSet);
        }
 //GlobalObject _globalObject;
 public AbstractControllerParameters(IMemoryMain memoryMain, IErrorSet errorSet, ConfigManagerHelper configManager, BreadCrumbManager breadCrumbManager, PageViewBiz pageViewBiz /*, GlobalObject globalObject */)
 {
     _memoryMain        = memoryMain;
     _errorSet          = errorSet;
     _configManager     = configManager;
     _breadCrumbManager = breadCrumbManager;
     _pageViewBiz       = pageViewBiz;
     //_globalObject = globalObject;
 }
Пример #4
0
        public AbstractBiz(UploadedFileBiz uploadedFileBiz, IMemoryMain memoryMain, PageViewBiz pageViewBiz, IErrorSet errorSet, ConfigManagerHelper configManagerHelper, BreadCrumbManager breadCrumbManager)
        {
            _uploadedFileBiz = uploadedFileBiz;

            _memoryMain          = memoryMain;
            _pageViewBiz         = pageViewBiz;
            _errorSet            = errorSet;
            _configManagerHelper = configManagerHelper;
            _breadCrumbManager   = breadCrumbManager;

            errorSet.SetLibAndClass("Uow Library", "UOW_Abstract");
        }
Пример #5
0
        /// <summary>
        /// Validate <c>IAttributeSetCollection</c> object against eBay Attributes rules.
        /// IErrorSetCollection.Count == 0 means validation succeeded. Otherwise means failure and you
        /// have to call the above RenderHtml... methods and pass in the <c>IErrorSetCollection</c> object
        /// to re-generate Attributes HTML text that contains all the error messages.
        /// </summary>
        /// <param name="attrSets">The <c>IAttributeSetCollection</c> object which you want to validate.</param>
        /// <returns>The returned <c>IAttributeSetCollection</c> object. IAttributeSetCollection == 0 means
        /// validation succeeded.</returns>
        public IErrorSetCollection Validate(IAttributeSetCollection attrSets)
        {
            IErrorSetCollection errList = new ErrorSetCollection();

            foreach (AttributeSet attrSet in attrSets)
            {
                IErrorSet errSet = ValidateOneSet(attrSet);
                if (errSet != null)
                {
                    errList.Add(errSet);
                }
            }

            return(errList);
        }
Пример #6
0
 public BizParameters(
     UploadedFileBiz uploadedFileBiz,
     IMemoryMain memoryMain,
     IErrorSet errorSet,
     ConfigManagerHelper configManager,
     BreadCrumbManager breadCrumbManager,
     PageViewBiz pageViewBiz)
     : base(
         memoryMain,
         errorSet,
         configManager,
         breadCrumbManager,
         pageViewBiz)
 {
     _uploadedFileBiz = uploadedFileBiz;
 }
Пример #7
0
		/// <summary>
		/// Indicates whether a specified object is contained in the list.
		/// </summary>
		/// <param name="value"></param>
		/// <returns></returns>
		public bool Contains(IErrorSet value)
		{
			return InnerList.Contains(value);
		}
Пример #8
0
		/// <summary>
		/// Add element.
		/// </summary>
		/// <param name="value"></param>
		/// <returns></returns>
		public int Add(IErrorSet value)
		{
			return InnerList.Add(value);
		}
Пример #9
0
		/// <summary>
		/// Add an array of IErrorSet.
		/// </summary>
		/// <param name="items"></param>
		public void AddRange(IErrorSet[] items)
		{
			InnerList.AddRange(items);
		}
Пример #10
0
		/// <summary>
		/// Initializes a new instance containing the elements of 
		/// the specified source collection.
		/// </summary>
		/// <param name="value"></param>
		public ErrorSet(
			IErrorSet value
			)
		{
			AddRange(value);
		}
Пример #11
0
		/// <summary>
		/// Initializes a new instance containing the specified array 
		/// of IErrorSet objects
		/// </summary>
		/// <param name="value"></param>
		public ErrorSetCollection(
			IErrorSet[] value
			)
		{
			AddRange(value);
		}
Пример #12
0
 /// <summary>
 /// Remove element from list.
 /// </summary>
 /// <param name="value"></param>
 public void Remove(IErrorSet value)
 {
     InnerList.Remove(value);
 }
Пример #13
0
 /// <summary>
 /// Adds the contents of the specified IErrorSet
 /// to the end of the collection.
 /// </summary>
 /// <param name="items"></param>
 public void AddRange(IErrorSet items)
 {
     InnerList.AddRange(items);
 }
Пример #14
0
        //private ApplicationDbContext _db;
        //private string _user;

        public CityDAL(ApplicationDbContext db, IErrorSet ierrorSet)
            : base(db, ierrorSet)
        {
            ErrorsGlobal.ClassName = GetSelfClassName();
        }
Пример #15
0
 /// <summary>
 /// Initializes a new instance containing the elements of
 /// the specified source collection.
 /// </summary>
 /// <param name="value"></param>
 public ErrorSet(
     IErrorSet value
     )
 {
     AddRange(value);
 }
Пример #16
0
 /// <summary>
 /// Indicates whether a specified object is contained in the list.
 /// </summary>
 /// <param name="value"></param>
 /// <returns></returns>
 public bool Contains(IErrorSet value)
 {
     return(InnerList.Contains(value));
 }
Пример #17
0
		/// <summary>
		/// Insert element to list.
		/// </summary>
		/// <param name="index"></param>
		/// <param name="value"></param>
		public void Insert(int index, IErrorSet value)
		{
			InnerList.Insert(index, value);
		}
Пример #18
0
 /// <summary>
 /// Get index of an element.
 /// </summary>
 /// <param name="value"></param>
 /// <returns></returns>
 public int IndexOf(IErrorSet value)
 {
     return(InnerList.IndexOf(value));
 }
Пример #19
0
 public PageViewBiz(IRepositry <PageView> entityDal, IMemoryMain memoryMain, IErrorSet errorSet, ConfigManagerHelper configManagerHelper, BreadCrumbManager breadCrumbManager)
     : base(entityDal, null, memoryMain, null, errorSet, configManagerHelper, breadCrumbManager)
 {
 }
Пример #20
0
 public UploadedFileBiz(IRepositry <UploadedFile> entityDal, IMemoryMain memoryMain, IErrorSet errorSet, ConfigManagerHelper configManagerHelper, BreadCrumbManager breadCrumbManager)
     : base(entityDal, null, memoryMain, null, errorSet, configManagerHelper, breadCrumbManager)
 {
 }
Пример #21
0
		/// <summary>
		/// Copies the collection objects to a one-dimensional Array 
		/// instance beginning at the specified index.
		/// </summary>
		/// <param name="array"></param>
		/// <param name="index"></param>
		public void CopyTo(
			IErrorSet[] array,
			int index
			)
		{
			InnerList.CopyTo(array, index);
		}
Пример #22
0
 /// <summary>
 /// Add element.
 /// </summary>
 /// <param name="value"></param>
 /// <returns></returns>
 public int Add(IErrorSet value)
 {
     return(InnerList.Add(value));
 }
Пример #23
0
		/// <summary>
		/// Get index of an element.
		/// </summary>
		/// <param name="value"></param>
		/// <returns></returns>
		public int IndexOf(IErrorSet value)
		{
			return InnerList.IndexOf(value);
		}
Пример #24
0
 /// <summary>
 /// Insert element to list.
 /// </summary>
 /// <param name="index"></param>
 /// <param name="value"></param>
 public void Insert(int index, IErrorSet value)
 {
     InnerList.Insert(index, value);
 }
Пример #25
0
		/// <summary>
		/// Remove element from list.
		/// </summary>
		/// <param name="value"></param>
		public void Remove(IErrorSet value)
		{
			InnerList.Remove(value);
		}
Пример #26
0
        //private ApplicationDbContext _db;
        //private string _user;

        public TownDAL(ApplicationDbContext db, IErrorSet errorsGlobal)
            : base(db, errorsGlobal)
        {
            ErrorsGlobal.ClassName = GetSelfClassName();
        }
Пример #27
0
 public FileDocOldDataBiz(UserDAL userDAL, IRepositry <OldFileData> ifileDocDAL, IMemoryMain memoryMain, IErrorSet errorSet, ApplicationDbContext db)
     : base(userDAL, memoryMain, errorSet, ifileDocDAL, db)
 {
 }
Пример #28
0
 public AddressDAL(ApplicationDbContext db, IErrorSet errorSet)
     : base(db, errorSet)
 {
 }