コード例 #1
0
        public IHttpActionResult put(tblParent item)
        {
            ProjectBAL obj = new ProjectBAL();

            obj.UpdateParentTask(item);
            return(Ok("Record Updated"));
        }
コード例 #2
0
        public IHttpActionResult Delete(int id)
        {
            ProjectBAL obj = new ProjectBAL();

            obj.Deleteparenttask(id);
            return(Ok("Record is deleted"));
        }
コード例 #3
0
        public IHttpActionResult post(tblParent item)
        {
            ProjectBAL obj = new ProjectBAL();

            obj.AddParentTask(item);
            return(Ok("Record added"));
        }
コード例 #4
0
        public IHttpActionResult put(int id)
        {
            ProjectBAL obj = new ProjectBAL();

            obj.Endtask(id);
            return(Ok("Record is deleted"));
        }
コード例 #5
0
        public IHttpActionResult put(int id)
        {
            ProjectBAL obj = new ProjectBAL();

            obj.Suspendtask(id);
            return(Ok("Record Updated"));
        }
コード例 #6
0
        public IHttpActionResult put(tblUser item)
        {
            ProjectBAL obj = new ProjectBAL();

            obj.UpdateUser(item);
            return(Ok("Record Updated"));
        }
コード例 #7
0
        public IHttpActionResult Get()

        {
            ProjectBAL obj = new ProjectBAL();

            return(Ok(obj.GetUser()));
        }
コード例 #8
0
        public void Getall()
        {
            ProjectBAL obj   = new ProjectBAL();
            int        count = obj.GetTask().Count();

            Assert.Greater(count, 0);
        }
コード例 #9
0
        public IHttpActionResult Get()
        {
            ProjectBAL        obj      = new ProjectBAL();
            List <tblProject> projects = obj.GetProject();

            return(Ok(projects));
        }
コード例 #10
0
        public ActionResult GetAllProjects()
        {
            IProjectBAL           projectBAL = new ProjectBAL();
            GetAllProjectsRequest request    = new GetAllProjectsRequest();
            var response = projectBAL.GetAllProjects(request);

            return(Json(response));
        }
コード例 #11
0
        public IHttpActionResult post(tblUser item)
        {
            ProjectBAL obj = new ProjectBAL();

            obj.AddUser(item);
            // obj.AddProject(item1);
            return(Ok("Record added"));
        }
コード例 #12
0
        public IHttpActionResult Get(int id)
        {
            if (id == 0)
            {
                return(null);
            }
            ProjectBAL obj = new ProjectBAL();

            return(Ok(obj.GetparenttaskbyId(id)));
        }
コード例 #13
0
        public ActionResult ListItemsByProject(string ProjectName)
        {
            IProjectBAL projectBAL            = new ProjectBAL();
            ListItemsByProjectRequest request = new ListItemsByProjectRequest();

            request.ProjectName = ProjectName;
            ListItemsByProjectResponse response = projectBAL.ListItemsByProject(request);

            return(Json(response));
        }
コード例 #14
0
        public void Getbytask()
        {
            ProjectBAL     obj = new ProjectBAL();
            List <tblTask> Ts  = obj.GetTask();
            //Task count = obj.GetTaskbyId(1);
            tblTask count = obj.GetTaskbyId(Ts[0].TaskId);

            Assert.IsNotNull(count);
            //   Assert.Greater(count, 0);
        }
コード例 #15
0
        public ActionResult CreateProject(string ProjectName, string Host, string Username, string Password, string Database)
        {
            IProjectBAL          projectBAL = new ProjectBAL();
            CreateProjectRequest request    = new CreateProjectRequest();

            request.project.ProjectName = ProjectName;
            request.project.Host        = Host;
            request.project.Username    = Username;
            request.project.Password    = Password;
            request.project.Database    = Database;
            var response = projectBAL.CreateProject(request);

            return(Json(response));
        }
コード例 #16
0
        public void DeleteTask()
        {
            ProjectBAL     obj         = new ProjectBAL();
            List <tblTask> Ts          = obj.GetTask();
            tblTask        Taskgetbyid = obj.GetTaskbyId(Ts[0].TaskId);
            int            count1      = obj.GetTask().Count();

            //dynamic testtask = new (Task) list<Task>;
            //Task T = (new Task { TaskId = 1015, ParentName = "ParentTaskstest", TaskName = "Testtaskname", Priority = 15, SDate = DateTime.Now, EDate = DateTime.Now });
            obj.DeleteTask(Taskgetbyid.TaskId);
            int count2 = obj.GetTask().Count();

            Assert.AreEqual(count2, count1 - 1);
        }
コード例 #17
0
        public void AddTask()
        {
            ProjectBAL obje  = new ProjectBAL();
            int        count = obje.GetTask().Count();
            //dynamic testtask = new (Task) list<Task>;
            tblTask T = (new tblTask {
                TaskName = "Testtaskname", TStartDate = DateTime.Now, TEndDate = DateTime.Now, TPriority = 10, TStatus = false, ParentTaskName = "parenttask", UserId = 1
            });

            obje.AddTask(T);
            int count1 = obje.GetTask().Count();

            Assert.AreEqual(count1, count + 1);
        }
コード例 #18
0
        public void updateTask()
        {
            ProjectBAL     obj         = new ProjectBAL();
            List <tblTask> Ts          = obj.GetTask();
            tblTask        Taskgetbyid = obj.GetTaskbyId(Ts[0].TaskId);
            int            count       = obj.GetTask().Count();
            //dynamic testtask = new (Task) list<Task>;
            tblTask T = (new tblTask {
                TaskId = Ts[0].TaskId, TaskName = "taskname", TStartDate = DateTime.Now, TEndDate = DateTime.Now, TPriority = 10, TStatus = false, ParentTaskName = "parenttask", UserId = 1
            });

            obj.UpdateTask(T);
            int            count1 = obj.GetTask().Count();
            List <tblTask> TS1    = obj.GetTask();

            Assert.AreEqual(count1, count);
            // Assert.AreEqual(T.TaskName, TS1[0].TaskName);
        }
コード例 #19
0
        public IHttpActionResult Get()
        {
            ProjectBAL obj = new ProjectBAL();

            return(Ok(obj.GetParentTask()));
        }
コード例 #20
0
        public IHttpActionResult Get(int id)
        {
            ProjectBAL obj = new ProjectBAL();

            return(Ok(obj.GetUserbyId(id)));
        }