Exemple #1
0
        protected void handleUpdateTaskDetail(object sender, EventArgs e)
        {
            // get info task
            string titleTask     = title.Text;
            String startDateTask = startDate.Text;
            String endDateTask   = endDate.Text;
            String statusTask    = status.Value;
            bool   IsPrivate     = privateScope.Checked;

            TasksDTO newTask = new TasksDTO(task.ID, titleTask, startDateTask, endDateTask, statusTask, IsPrivate, task.urlFile);

            // get list partner
            List <int> arr = new List <int>();

            foreach (GridViewRow row in usersGridView.Rows)
            {
                CheckBox checkBox = (CheckBox)row.FindControl("checkbox");
                if (checkBox.Checked)
                {
                    arr.Add(Int32.Parse(usersGridView.DataKeys[row.RowIndex].Value.ToString()));
                }
            }
            TasksBLL.updateTask(newTask, arr);

            Helper.Toast(this, Page.ClientScript, "success", "Update task success");
            TasksBLL.expiringTask();
            renderActionButtons();
            getValueTask();
            initValue();
            renderActionButtons();
            loadDisEnInput();
        }