Exemplo n.º 1
0
        /// <summary>
        /// Get all data to fill combo box
        /// </summary>
        /// <param name="error"></param>
        /// <returns></returns>
        public List <ModelNotifiedForTag> GetAll_Tag(out string error)
        {
            TagGenericREST             TagGenericREST      = new TagGenericREST(wpfConfig);
            List <ModelNotifiedForTag> modelNotifiedForTag = TagGenericREST.GetAll <ModelNotifiedForTag>(100, 0, out error);

            return(modelNotifiedForTag);
        }
Exemplo n.º 2
0
        public void DeleteData(ModelNotifiedForTag modelNotifiedForTag, out string error)
        {
            TagGenericREST TagGenericREST = new TagGenericREST(wpfConfig);
            DeleteTagView  deleteTagView  = new DeleteTagView();

            Cloner.CopyAllTo(typeof(ModelNotifiedForTag), modelNotifiedForTag, typeof(DeleteTagView), deleteTagView);
            TagGenericREST.Delete(deleteTagView, out error);
        }
Exemplo n.º 3
0
        public void AddData(ModelNotifiedForTag modelNotifiedForTag, out string error)
        {
            TagGenericREST TagGenericREST = new TagGenericREST(wpfConfig);
            CreateTagView  createTagView  = new CreateTagView();

            Cloner.CopyAllTo(typeof(ModelNotifiedForTag), modelNotifiedForTag, typeof(CreateTagView), createTagView);
            TagGenericREST.Insert(createTagView, out error);
        }
Exemplo n.º 4
0
        public void SaveData(ModelNotifiedForTag modelNotifiedForTag, out string error)
        {
            TagGenericREST TagGenericREST = new TagGenericREST(wpfConfig);
            UpdateTagView  updateTagView  = new UpdateTagView();

            Cloner.CopyAllTo(typeof(ModelNotifiedForTag), modelNotifiedForTag, typeof(UpdateTagView), updateTagView);
            TagGenericREST.Update(updateTagView, out error);
        }
Exemplo n.º 5
0
        public ModelNotifiedForTag GetTagByID(int TagID, out string error)
        {
            error = null;
            TagGenericREST      TagGenericREST      = new TagGenericREST(wpfConfig);
            GetTagView          getTagView          = TagGenericREST.GetByPK <GetTagView>(TagID, out error)[0];
            ModelNotifiedForTag modelNotifiedForTag = new ModelNotifiedForTag();

            Cloner.CopyAllTo(typeof(GetTagView), getTagView, typeof(ModelNotifiedForTag), modelNotifiedForTag);
            return(modelNotifiedForTag);
        }
Exemplo n.º 6
0
        public List <ModelNotifiedForTag> GetAllTag(out string error)
        {
            TagGenericREST             TagGenericREST      = new TagGenericREST(wpfConfig);
            List <ModelNotifiedForTag> modelNotifiedForTag = TagGenericREST.GetAll <ModelNotifiedForTag>(100, 0, out error);

            if (!string.IsNullOrEmpty(error))
            {
                return(null);
            }

            //Initializing row status
            foreach (var item in modelNotifiedForTag)
            {
                item.ItemChanged = false;
                item.NewItem     = false;
            }

            return(modelNotifiedForTag);
        }