Пример #1
0
        public void CreateRegisterTool(RegisterTool registerTool)
        {
            CheckValue.RequireString(registerTool.ToolName);

            context.RegisterTools.Add(registerTool);
            context.SaveChanges();
        }
        public void CreateEmployee(Employee employee)
        {
            CheckValue.RequireString(employee.FirstName);
            CheckValue.RequireString(employee.LastName);

            context.Employees.Add(employee);
            context.SaveChanges();
        }
Пример #3
0
        public void CreatePaddle(Paddle paddle)
        {
            CheckValue.RequireString(paddle.Number);
            CheckValue.RequireString(paddle.Model);

            context.Paddles.Add(paddle);
            context.SaveChanges();
        }
        public void CreateReceivedPaddle(ReceivedPaddle receivedPaddle)
        {
            CheckValue.RequireString(receivedPaddle.AddedDate);
            CheckValue.RequireString(receivedPaddle.ActivityPerformed);
            CheckValue.RequireString(receivedPaddle.PlannedRepairDate);
            CheckValue.RequireString(receivedPaddle.IsOrders);
            CheckValue.RequireString(receivedPaddle.ReceivingEmployee);
            //CheckValue.RequireString(receivedPaddle.PaddleNumber);

            context.ReceivedPaddles.Add(receivedPaddle);
            context.SaveChanges();
        }