예제 #1
0
        private void dgvForm_DoubleClick(object sender, EventArgs e)
        {
            if (dgvForm.SelectedRows == null)
            {
                return;
            }

            try
            {
                string status  = dgvForm.SelectedRows[0].Cells[0].Value.ToString().Trim();
                string type    = dgvForm.SelectedRows[0].Cells[1].Value.ToString().Trim();
                string chaseno = dgvForm.SelectedRows[0].Cells[6].Value.ToString().Trim();

                if (type.StartsWith("R3"))
                {
                    FormR3 formR3 = new FormR3(chaseno);
                    if (formR3.ShowDialog() == DialogResult.OK)
                    {
                        LoadData();
                    }
                }
                else if (type.ToLower().StartsWith("debit") || type.ToLower().StartsWith("credit"))
                {
                    DebitNoteForm2 formDebit = new DebitNoteForm2(type.ToLower(), "view", chaseno);
                    //DebitCreditNoteFormView2 formDebit = new DebitCreditNoteFormView2(chaseno, "view");
                    if (formDebit.ShowDialog() == DialogResult.OK)
                    {
                        LoadData();
                    }
                }
                else if (type.StartsWith("Outstanding"))
                {
                    OutstandingViewForm formOutstanding = new OutstandingViewForm(chaseno);
                    if (formOutstanding.ShowDialog() == DialogResult.OK)
                    {
                        LoadData();
                    }
                }
                else
                {
                    FormITApplication form = new FormITApplication("view", type, chaseno, status);
                    if (form.ShowDialog() == DialogResult.OK)
                    {
                        LoadData();
                    }
                }
            }
            catch { }
        }
예제 #2
0
        private void dgvFormHistory_DoubleClick(object sender, EventArgs e)
        {
            if (dgvFormHistory.SelectedRows == null)
            {
                return;
            }

            string type    = dgvFormHistory.SelectedRows[0].Cells[1].Value.ToString();
            string chaseno = dgvFormHistory.SelectedRows[0].Cells[7].Value.ToString();

            if (type == "IT技術支援")
            {
                FormSupport form = new FormSupport(chaseno);
                form.ShowDialog();
            }

            if (type == "IT意見箱")
            {
                FormComment form = new FormComment(chaseno);
                form.ShowDialog();
            }

            if (type == "權限關連及軟件安裝")
            {
                FormPermission form = new FormPermission(chaseno);
                form.ShowDialog();
            }

            if (type == "工具開發/修改")
            {
            }

            if (type == "資產外借")
            {
            }

            if (type == "R3申請")
            {
                FormR3 form = new FormR3(chaseno);
                form.ShowDialog();
            }

            if (type.ToLower().StartsWith("debit") || type.ToLower().StartsWith("credit"))
            {
                DebitNoteForm2 formDebit = new DebitNoteForm2(type.ToLower(), "view", chaseno);
                //DebitCreditNoteFormView2 formDebit = new DebitCreditNoteFormView2(chaseno, "view");
                if (formDebit.ShowDialog() == DialogResult.OK)
                {
                    LoadData();
                }
            }

            if (type.StartsWith("Outstanding"))
            {
                OutstandingViewForm formOutstanding = new OutstandingViewForm(chaseno);
                if (formOutstanding.ShowDialog() == DialogResult.OK)
                {
                    LoadData();
                }
            }
        }