public ActionResponse Delete(int year)
        {
            eisEntities ctx = new eisEntities();

            ctx.ExecuteStoreCommand("DELETE FROM BankLoanApproval WHERE Year = {0}", year);
            ctx.ExecuteStoreCommand("DELETE FROM BudgetUsage WHERE Year = {0}", year);
            ctx.ExecuteStoreCommand("DELETE FROM EmployeeRelatedBudgetUsage WHERE Year = {0}", year);
            ctx.ExecuteStoreCommand("DELETE FROM EstimatedFundMember WHERE Year = {0}", year);
            ctx.ExecuteStoreCommand("DELETE FROM EstimatedRetirement WHERE Year = {0}", year);
            ctx.ExecuteStoreCommand("DELETE FROM FirstCarStatus WHERE Year = {0}", year);
            ctx.ExecuteStoreCommand("DELETE FROM NumberOfEmployee WHERE Year = {0}", year);
            ctx.ExecuteStoreCommand("DELETE FROM RetirementFundUsage WHERE Year = {0}", year);
            ctx.ExecuteStoreCommand("DELETE FROM WarrantFundProviding WHERE Year = {0}", year);
            ctx.ExecuteStoreCommand("DELETE FROM AvailableYears WHERE Year = {0}", year);
            return(new ActionResponse()
            {
                Success = true
            });
        }
        public void Update([FromBody] EmployeeRelatedBudgetUsage model)
        {
            var ctx = new eisEntities();

            ctx.ExecuteStoreCommand("UPDATE EmployeeRelatedBudgetUsage " +
                                    "   SET Amount = {0} " +
                                    "      ,LastUpdated = {1} " +
                                    " WHERE Id = {2} ",
                                    model.Amount,
                                    DateTime.Now,
                                    model.Id);
        }
        public void Update([FromBody] EstimatedFundMember model)
        {
            var ctx = new eisEntities();

            ctx.ExecuteStoreCommand("UPDATE EstimatedFundMember " +
                                    "   SET EstimatedValue = {0} " +
                                    "      ,LastUpdated = {1} " +
                                    " WHERE Id = {2} ",
                                    model.EstimatedValue,
                                    DateTime.Now,
                                    model.Id);
        }
Example #4
0
        public void Update([FromBody] FirstCarStatus model)
        {
            var ctx = new eisEntities();

            ctx.ExecuteStoreCommand("UPDATE FirstCarStatus " +
                                    "   SET NumberOfPeople = {0} " +
                                    "      ,Amount = {1} " +
                                    "      ,LastUpdated = {2} " +
                                    " WHERE Id = {3} ",
                                    model.NumberOfPeople,
                                    model.Amount,
                                    DateTime.Now,
                                    model.Id);
        }
        public void Update([FromBody] WarrantFundProviding model)
        {
            var ctx = new eisEntities();

            ctx.ExecuteStoreCommand("UPDATE WarrantFundProviding " +
                                    "   SET NumberOfPeople = {0} " +
                                    "      ,Amount = {1} " +
                                    "      ,LastUpdated = {2} " +
                                    " WHERE Id = {3} ",
                                    model.NumberOfPeople,
                                    model.Amount,
                                    DateTime.Now,
                                    model.Id);
        }
Example #6
0
        public void Update([FromBody] RetirementFundUsage model)
        {
            var ctx = new eisEntities();

            ctx.ExecuteStoreCommand("UPDATE RetirementFundUsage " +
                                    "   SET NumberOfPeople = {0} " +
                                    "      ,NumberOfUsage = {1} " +
                                    "      ,LastUpdated = {2} " +
                                    " WHERE Id = {3} ",
                                    model.NumberOfPeople,
                                    model.NumberOfUsage,
                                    DateTime.Now,
                                    model.Id);
        }
        public void Update([FromBody] BudgetUsage model)
        {
            var ctx = new eisEntities();

            ctx.ExecuteStoreCommand("UPDATE BudgetUsage " +
                                    "   SET BudgetAmount = {0} " +
                                    "      ,Used = {1} " +
                                    "      ,LastUpdated = {2} " +
                                    " WHERE Id = {3} ",
                                    model.BudgetAmount,
                                    model.Used,
                                    DateTime.Now,
                                    model.Id);
        }
        public void Update([FromBody] NumberOfEmployee model)
        {
            var ctx = new eisEntities();

            ctx.ExecuteStoreCommand("UPDATE NumberOfEmployee " +
                                    "   SET GovernmentOfficer = {0} " +
                                    "      ,PermanentContractor = {1} " +
                                    "      ,GeneralOfficer = {2} " +
                                    "      ,LastUpdated = {3} " +
                                    " WHERE Id = {4} ",
                                    model.GovernmentOfficer,
                                    model.PermanentContractor,
                                    model.GeneralOfficer,
                                    DateTime.Now,
                                    model.Id);
        }