示例#1
0
        public bool AddAssignment(Assignment _obj)
        {

            try
            {
                using (var db = new SqlHelper(ConfigurationManager.ConnectionStrings["collect2000ConnectionString"].ConnectionString))
                {
                    var q = @"EXEC USP_AddAssignment @Task_ID, @TaskAssignedToUser, @TaskComment, @AssignedByUsername";
                    using (var dr = db.Query(q, new SqlParameter("@Task_ID", _obj.TaskId), new SqlParameter("@TaskAssignedToUser", _obj.AssignedTo), new SqlParameter("@TaskComment", _obj.Comment), new SqlParameter("@AssignedByUsername", _obj.AssignedBy)))
                    {


                    }
                }
            }
            catch (Exception ex) { }
            return true;
        }
示例#2
0
        public bool AddSubTaskAssignment(Assignment _obj)
        {
            try
            {
                using (var db = new SqlHelper(ConfigurationManager.ConnectionStrings["collect2000ConnectionString"].ConnectionString))
                {
                    var q = @"INSERT INTO ERC_TaskAssignment(SubTask_ID, AssignedToUsername, Task_Comment  ) VALUES(@Task_ID, @TaskAssignedToUser, @TaskComment)";
                    using (var dr = db.Query(q, new SqlParameter("@Task_ID", _obj.TaskId), new SqlParameter("@TaskAssignedToUser", _obj.AssignedTo), new SqlParameter("@TaskComment", _obj.Comment)))
                    {


                    }
                }
            }
            catch (Exception ex) { }
            return true;
        }
示例#3
0
 public IHttpActionResult AddSubTaskAssignment(Assignment _objView)
 {
    
     TaskTracker _objTask = new TaskTracker();
     if (!ModelState.IsValid)
     {
         return BadRequest(ModelState);
     }
     _objTask.AddSubTaskAssignment(_objView);
     return CreatedAtRoute("DefaultApi", new { id = _objView.TaskId }, _objView);
 }