예제 #1
0
        public List<DairyListItem> Select()
        {
            StoredProcedure storedProcedure = new StoredProcedure();
            storedProcedure.Name = My.Resources.CreateSelectByNameSPList()[TableList.DiaryListItem].ToString();
            storedProcedure.ParameterValueCollection =  ParameterProvider.GetParameterListForInsertDairyDateItem(DateItem);

            return dairyItemController.ExecuteSync(storedProcedure).ToList();
        }
예제 #2
0
        public List<DairyListItem> StartUpSelect()
        {
            StoredProcedure storedProcedure = new StoredProcedure();
            storedProcedure.Name = My.Resources.CreateSelectByNameSPList()[TableList.DiaryListItem].ToString();
            storedProcedure.ParameterValueCollection =  ParameterProvider.GetParameterListForInsertDairyDateItem(new DairyDateItem()
                                                                            {
                                                                                Date = DateTime.Now
                                                                            });

            return (new TableController<DairyListItem>()).ExecuteSync(storedProcedure).ToList();
        }      
예제 #3
0
        public void Insert()
        {
            StoredProcedure firstStoredProcedure = new StoredProcedure();
            firstStoredProcedure.Name = My.Resources.CreateInsertSPList()[TableList.DiaryDate].ToString();
            firstStoredProcedure.ParameterValueCollection = ParameterProvider.GetParameterListForInsertDairyDateItem(DateItem);

            ListItem.DateID = dairyController.Execute(firstStoredProcedure);

            StoredProcedure secondStoredProcedure = new StoredProcedure();
            secondStoredProcedure.Name = My.Resources.CreateInsertSPList()[TableList.DiaryListItem].ToString();
            secondStoredProcedure.ParameterValueCollection = ParameterProvider.GetParameterListForInsertDairyListItem(ListItem);

            dairyItemController.ExecuteAsync(secondStoredProcedure);
        }
예제 #4
0
        public void Delete()
        {
            StoredProcedure storedProcedure = new StoredProcedure();
            storedProcedure.Name = My.Resources.CreateDeleteSPList()[TableList.DiaryListItem].ToString();
            storedProcedure.ParameterValueCollection = ParameterProvider.GetParameterListForDeleteDairyItem(ListItem.ItemID);

            dairyItemController.ExecuteSync(storedProcedure);
        } 
예제 #5
0
        public int ComputeStatistic()
        {
            StoredProcedure storedProcedure = new StoredProcedure();
            storedProcedure.Name = My.Resources.CreateInsertSPList()[TableList.DiaryDate].ToString();
            storedProcedure.ParameterValueCollection = ParameterProvider.GetParameterListForInsertDairyDateItem(DateItem);

            return dairyController.Execute(storedProcedure);
        }