Ejemplo n.º 1
0
        /// <summary>
        /// Update the end task which user entered ,DL using EF
        /// </summary>
        /// <param name="objGET_TASK_DETAILS_Result"></param>
        /// <returns></returns>
        public string UpdateEndTask(GET_TASK_DETAILS_Result objGET_TASK_DETAILS_Result)
        {
            objTaskManagerDL = new TaskManagerDL();
            var vUpdateEndTask = objTaskManagerDL.UpdateEndTask(objGET_TASK_DETAILS_Result);

            return(Convert.ToString(vUpdateEndTask));
        }
Ejemplo n.º 2
0
        public string InsertTaskDetails(GET_TASK_DETAILS_Result objGET_TASK_DETAILS_Result)
        {
            objTaskManagerDL = new TaskManagerDL();
            var vInsertTaskDetails = objTaskManagerDL.InsertTaskDetails(objGET_TASK_DETAILS_Result);

            return(vInsertTaskDetails);
        }
Ejemplo n.º 3
0
        public void InsertTaskDetails()
        {
            objGET_TASK_DETAILS_Result = new GET_TASK_DETAILS_Result();

            #region Insert new records

            objGET_TASK_DETAILS_Result.Task_ID    = 0;
            objGET_TASK_DETAILS_Result.Parent_ID  = 1;
            objGET_TASK_DETAILS_Result.Task       = "New task";
            objGET_TASK_DETAILS_Result.Start_Date = DateTime.Now;
            objGET_TASK_DETAILS_Result.End_Date   = null;
            objGET_TASK_DETAILS_Result.Priority   = 4;

            #endregion

            #region Update records

            //objGET_TASK_DETAILS_Result.Task_ID = 4;
            //objGET_TASK_DETAILS_Result.Parent_ID = 1;
            //objGET_TASK_DETAILS_Result.Task = "Update new task";
            //objGET_TASK_DETAILS_Result.Start_Date = DateTime.Now;
            //objGET_TASK_DETAILS_Result.End_Date = null;
            //objGET_TASK_DETAILS_Result.Priority = 16;

            #endregion

            var vlsit = objTaskManagerController.InsertTaskDetails(objGET_TASK_DETAILS_Result);

            Assert.IsTrue(vlsit == "1" || vlsit == "2");
        }
        public string UpdateEndTask(GET_TASK_DETAILS_Result objGET_TASK_DETAILS_Result)
        {
            objTaskManagerBL = new TaskManagerBL();
            var vUpdateEndTask = objTaskManagerBL.UpdateEndTask(objGET_TASK_DETAILS_Result);

            return(vUpdateEndTask);
        }
 public string UpdateEndTask(GET_TASK_DETAILS_Result objGET_TASK_DETAILS_Result)
 {
     using (TaskManagerEntities db = new TaskManagerEntities())
     {
         var vUpdateEndTask = db.UPDATE_END_TASK(objGET_TASK_DETAILS_Result.Task_ID, objGET_TASK_DETAILS_Result.End_Date);
         db.SaveChanges();
         return(Convert.ToString(vUpdateEndTask));
     }
 }
        public string InsertTaskDetails(GET_TASK_DETAILS_Result objGET_TASK_DETAILS_Result)
        {
            using (TaskManagerEntities db = new TaskManagerEntities())
            {
                var vInsertTaskDetails = db.INSERT_TASK_DETAILS(objGET_TASK_DETAILS_Result.Task_ID, objGET_TASK_DETAILS_Result.Parent_ID, objGET_TASK_DETAILS_Result.Task, objGET_TASK_DETAILS_Result.Start_Date, objGET_TASK_DETAILS_Result.End_Date, objGET_TASK_DETAILS_Result.Priority);

                db.SaveChanges();
                return(Convert.ToString(vInsertTaskDetails));
            }
        }
Ejemplo n.º 7
0
        public void UpdateEndTask()
        {
            objGET_TASK_DETAILS_Result = new GET_TASK_DETAILS_Result();

            #region Update records

            objGET_TASK_DETAILS_Result.Task_ID  = 4;
            objGET_TASK_DETAILS_Result.End_Date = DateTime.Now;

            #endregion

            var vlsit = objTaskManagerController.UpdateEndTask(objGET_TASK_DETAILS_Result);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Insert the task values which user entered to DB from DL using EF
        /// </summary>
        /// <param name="objGET_TASK_DETAILS_Result"></param>
        /// <returns></returns>
        public string InsertTaskDetails(GET_TASK_DETAILS_Result objGET_TASK_DETAILS_Result)
        {
            objTaskManagerDL = new TaskManagerDL();
            var vInsertTaskDetails = objTaskManagerDL.InsertTaskDetails(objGET_TASK_DETAILS_Result);

            if (objGET_TASK_DETAILS_Result.Task_ID != 0)
            {
                if (vInsertTaskDetails == "1")
                {
                    vInsertTaskDetails = "2";
                }
            }

            return(vInsertTaskDetails);
        }
Ejemplo n.º 9
0
 public void SetUp(BenchmarkContext context)
 {
     objTaskManagerController   = new TaskManagerController();
     objGET_TASK_DETAILS_Result = new GET_TASK_DETAILS_Result();
 }
Ejemplo n.º 10
0
 public void Cleanup(BenchmarkContext context)
 {
     objTaskManagerController   = null;
     objGET_TASK_DETAILS_Result = null;
 }