예제 #1
0
        public static void Load(this skCategory Object)
        {
            ObjectMessenger OM = new ObjectMessenger();

            OM.Send("CATEGORYOBJ", Object);
            UI.Enviroment.LoadNewTab("CategoryDetailsView", Object.Name);
        }
예제 #2
0
        public StockContract GetCategoryList(skCategory CategoryFilterObject)
        {
            StockContract retunobject = new StockContract();

            retunobject.CategoryList = CatergoryRepo.GetCategoryList(CategoryFilterObject).ToList();

            return(retunobject);
        }
예제 #3
0
        public void UpdateCategory(skCategory CategoryObj)
        {
            dtCategory category = DB.dtCategories.Single(x => x.CatID == CategoryObj.StockTypeID);

            category.Description = CategoryObj.Description;
            category.Title       = CategoryObj.Name;

            DB.SubmitChanges();
        }
예제 #4
0
        public CategoryDetailsViewModel()
        {
            if (DesignerProperties.GetIsInDesignMode(new System.Windows.DependencyObject()))
            {
                return;
            }

            CategoryOBJ = ObjectMessenger.FindObject("CATEGORYOBJ");

            _SaveChanges = new Command(Submit);
        }
예제 #5
0
        public void AddNewCategory(skCategory categoryobj)
        {
            dtCategory newcat = new dtCategory
            {
                Description = categoryobj.Description,
                Title       = categoryobj.Name
            };

            DB.dtCategories.InsertOnSubmit(newcat);
            DB.SubmitChanges();
        }
예제 #6
0
        public IEnumerable <skCategory> GetCategoryList(skCategory CategoryOBJ)
        {
            var query = from STL in DB.dtCategories
                        where STL.Title.IndexOf(CategoryOBJ.SearchFilter.ObjectName == null ? STL.Title : CategoryOBJ.SearchFilter.ObjectName) >= 0 &&
                        STL.Description.IndexOf(CategoryOBJ.SearchFilter.ObjectDescription == null ? STL.Description : CategoryOBJ.SearchFilter.ObjectDescription) >= 0 &&
                        STL.CatID.ToString().Equals(CategoryOBJ.SearchFilter.ObjectID == null ? STL.CatID.ToString() : CategoryOBJ.SearchFilter.ObjectID)

                        select new skCategory
            {
                StockTypeID = STL.CatID,
                Name        = STL.Title,
                Description = STL.Description
            };

            return(query);
        }
 public NewCategoryVeiwModel()
 {
     if (DesignerProperties.GetIsInDesignMode(new System.Windows.DependencyObject()))
     {
         return;
     }
     try
     {
         _Catobj            = new skCategory();
         _SubmitNewCategory = new Command(Submit);
     }
     catch (Exception E)
     {
         ExepionLogger.Logger.LogException(E);
         ExepionLogger.Logger.Show(E);
     }
 }
예제 #8
0
        public CategoryManagerViewModel()
        {
            try
            {
                if (DesignerProperties.GetIsInDesignMode(new System.Windows.DependencyObject()))
                {
                    return;
                }

                SearchFileter      = new skCategory();
                _GetRecordsCommand = new AsynchronousCommand(SearchMethod);
                LoadToolBar();
            }
            catch (Exception E)
            {
                ExepionLogger.Logger.LogException(E);
                ExepionLogger.Logger.Show(E);
            }
        }
예제 #9
0
 public void UpdateCategory(skCategory CategoryObject)
 {
     CatergoryRepo.UpdateCategory(CategoryObject);
 }
예제 #10
0
 public void AddNewCategory(skCategory CategoryObject)
 {
     CatergoryRepo.AddNewCategory(CategoryObject);
 }
예제 #11
0
 public StockContract GetCategoryList(skCategory CategoryFilterObject)
 {
     return(base.Channel.GetCategoryList(CategoryFilterObject));
 }
예제 #12
0
 public void UpdateCategory(skCategory CategoryObject)
 {
     base.Channel.UpdateCategory(CategoryObject);
 }
예제 #13
0
 public void AddNewCategory(skCategory CategoryObject)
 {
     base.Channel.AddNewCategory(CategoryObject);
 }