private void btnSelect_Click(object sender, EventArgs e)
        {
            if (cmbIssueFrom.Text == " -- Select-- " || cmbIssueTo.Text == " -- Select-- ")
            {
                //MessageBox.Show("Please Fill Required Field(s)");
                //return;
                MessageBox.Show("Please Fill Required Field(s).", "Error", MessageBoxButtons.OK,
                                MessageBoxIcon.Exclamation,
                                MessageBoxDefaultButton.Button1);
                return;
            }
            else if (cmbIssueFrom.Text == cmbIssueTo.Text)
            {
                //  MessageBox.Show("Invalid Project Codes");

                MessageBox.Show("Invalid Project Codes", "Error", MessageBoxButtons.OK,
                                MessageBoxIcon.Exclamation,
                                MessageBoxDefaultButton.Button1);

                return;
            }
            else
            {
                Material_Releasing_Main main = new Material_Releasing_Main();
                main.GetUserID(TxtUserID.Text);
                main.GetTranType(txttrantype.Text);
                main.GetParameters(cmbIssueFrom.SelectedValue.ToString(), cmbIssueTo.SelectedValue.ToString());
                this.Hide();
                main.Show();
            }
        }
        private void dataGridView2_DoubleClick(object sender, EventArgs e)
        {
            var index = dataGridView2.CurrentRow.Cells[0].Value.ToString();
            Material_Releasing_Main formTask = new Material_Releasing_Main();

            formTask.GetUserID(TxtUserID.Text);
            formTask.Retrieverequest(index.ToString());

            formTask.Show();
            this.Dispose();
        }