Example #1
0
        private void newToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DataGridViewRow          dr        = null;
            FormOpenExistingWorkFlow opnwrkflw = new FormOpenExistingWorkFlow();

            if (opnwrkflw.ShowDialog() == DialogResult.OK)
            {
                dr = opnwrkflw.dataGridView.SelectedRows[0];
            }
            if (dr != null)
            {
                fileindex    = int.Parse(dr.Cells[0].Value.ToString());
                versionindex = int.Parse(dr.Cells[6].Value.ToString());
                filename     = dr.Cells[1].Value.ToString();
                pulltreedatafromdb(fileindex, versionindex);
                resetcurrentformafteropen();
                string claim = string.Empty;
                while (claim == string.Empty)
                {
                    FormInputDialogBox frm = new FormInputDialogBox(FormInputDialogBox.FormDisplayStyle.enOneLineInput, "Please Input Claim Number :", "");
                    claim = txtClaimNo.Text = frm.ShowDialog() == DialogResult.OK ? frm.textBox.Text : "";
                }
                starttimerframe(true);
            }
        }
Example #2
0
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            bool isRunRequired = false;

            if (!isdatasaved)
            {
                switch (MessageBox.Show("Do you want to save the workflow ?", "Close Workflow", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation))
                {
                case System.Windows.Forms.DialogResult.Yes:
                    saveToolStripMenuItem_Click(null, null);
                    isRunRequired = true;
                    break;

                case System.Windows.Forms.DialogResult.No:
                    isRunRequired = true;
                    break;

                case System.Windows.Forms.DialogResult.Cancel:
                    break;
                }
            }
            else
            {
                isRunRequired = true;
            }
            if (isRunRequired)
            {
                DataGridViewRow          dr        = null;
                FormOpenExistingWorkFlow opnwrkflw = new FormOpenExistingWorkFlow();
                if (opnwrkflw.ShowDialog() == DialogResult.OK)
                {
                    dr = opnwrkflw.dataGridView.SelectedRows[0];
                }
                if (dr != null)
                {
                    fileindex    = int.Parse(dr.Cells[0].Value.ToString());
                    versionindex = int.Parse(dr.Cells[6].Value.ToString());
                    filename     = dr.Cells[1].Value.ToString();
                    pullTreeDatafromDB(fileindex, versionindex);
                    resetcurrentformafteropen();
                    if (treeViewMain.Nodes.Count == 0)
                    {
                        treeViewMain.Nodes.Add(filename);
                    }
                    addTagstoTree();
                    treeViewMain.CollapseAll();
                }
            }
        }