Example #1
0
        private void dgvTasks_DoubleClick(object sender, EventArgs e)
        {
            txtReportID.Text = txtReportDate.Text = rtxtReportDiscreption.Text = "";
            try
            {
                DataTable dt = ClassTasks.selectTaskWithPath(int.Parse(dgvTasks.CurrentRow.Cells[0].Value.ToString()));
                if (dt.Rows[0][0].ToString().Equals(""))
                {
                    lbAttach.Text        = noAttach;
                    btnClickHere.Enabled = false;
                }
                else
                {
                    lbAttach.Text        = "يوجد ملف مرفق مع هذه المهمة لتحميله : ";
                    btnClickHere.Enabled = true;
                    TaskFilePass         = dt.Rows[0][0].ToString();
                }

                txtTaskID.Text       = dgvTasks.CurrentRow.Cells[0].Value.ToString();
                txtTitle.Text        = dgvTasks.CurrentRow.Cells[1].Value.ToString();
                rtxtDiscreption.Text = dgvTasks.CurrentRow.Cells[2].Value.ToString();
                txtDateCreated.Text  = dgvTasks.CurrentRow.Cells[3].Value.ToString();
                txtNameCreated.Text  = dgvTasks.CurrentRow.Cells[4].Value.ToString();
                dgvNotes.DataSource  = ClassTasks.selectReportByID(int.Parse(txtTaskID.Text));
                if (btnClicked.Equals(FRM_Main.DoneEXE))
                {
                    btnUpdateReport.Enabled = btnAddReport.Enabled = btnConfirmAndExe.Enabled = false;
                }
                else
                {
                    btnAddReport.Enabled = btnConfirmAndExe.Enabled = true;
                }
            }
            catch (Exception) { }
        }
 public FRM_TaskDetailsReports(string s)
 {
     InitializeComponent();
     try
     {
         dgvDetails.DataSource = ClassTasks.selectReportByID(int.Parse(s));
     }
     catch (Exception) { }
 }
Example #3
0
 private void btnUpdateReport_Click(object sender, EventArgs e)
 {
     if (rtxtReportDiscreption.Text.Equals("") || txtReportID.Text.Equals(""))
     {
         MessageBox.Show("لا يوجد بيانات لاضافتها");
     }
     else
     {
         int i = ClassTasks.updateNote(int.Parse(txtReportID.Text), rtxtReportDiscreption.Text);
         txtReportID.Text    = txtReportDate.Text = rtxtReportDiscreption.Text = "";
         dgvNotes.DataSource = ClassTasks.selectReportByID(int.Parse(txtTaskID.Text));
         MessageBox.Show("تمت عملية التعديل بنجاح");
     }
 }
Example #4
0
        private void btnAddReport_Click(object sender, EventArgs e)
        {
            if (rtxtDailyReport.Text.Equals(""))
            {
                MessageBox.Show("لا يمكن اضافة تقرير فارغ");
            }
            else
            {
                int i = ClassTasks.AddReportToTask(rtxtDailyReport.Text, DateTime.Now, int.Parse(txtTaskID.Text));
                dgvNotes.DataSource = ClassTasks.selectReportByID(int.Parse(txtTaskID.Text));
                int Upd_status = ClassTasks.update_Status(int.Parse(txtTaskID.Text), FRM_Main.ToDoEXE, DateTime.Now);

                rtxtDailyReport.Text = "";
                MessageBox.Show("تم حفظ التقرير بنجاح");
                dgvTasks.DataSource = ClassTasks.selectTaskNotExecute(FRM_Main.Emp_id);
            }
        }