private void Button_SaveBankDetails_Click(object sender, EventArgs e)
        {
            label_BankDetails_ErrorMessage.Text = "";

            if (Combo_BankUpdate.SelectedIndex != 0)
            {
                Case_Bank_Details bankModel   = new Case_Bank_Details();
                UpdateBankControl bankControl = new UpdateBankControl();

                bankModel.bankName              = TextBox_BankName.Text;
                bankModel.bankBranch            = TextBox_BankBranch.Text;
                bankModel.bankIfsc              = TextBox_IFSC.Text;
                bankModel.bankAccountNumber     = TextBox_AccountNumber.Text;
                bankModel.bankAccountHolderName = TextBox_AccountHolder.Text;
                bankModel.bankAccountType       = TextBox_AccountType.Text;
                bankModel.bank_caseSelected     = ((KeyValuePair <int, string>)Combo_BankUpdate.SelectedItem).Key;

                if (bankControl.UpdateDetails(bankModel))
                {
                    MessageBox.Show(bankModel.bankErrorMessage);
                }
                else
                {
                    MessageBox.Show(bankModel.bankErrorMessage);
                }
            }
            else
            {
                MessageBox.Show("Please Select a Case from the Dropdwn", "Case not Selected", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
        private void Combo_BankUpdate_SelectionChangeCommitted(object sender, EventArgs e)
        {
            if (Combo_BankUpdate.SelectedIndex != 0)
            {
                int keyy = ((KeyValuePair <int, string>)Combo_BankUpdate.SelectedItem).Key;
                UpdateBankControl bankCt       = new UpdateBankControl();
                Case_Bank_Details bank_details = bankCt.getBankData(keyy);

                TextBox_BankName.Text      = bank_details.bankName;
                TextBox_BankBranch.Text    = bank_details.bankBranch;
                TextBox_IFSC.Text          = bank_details.bankIfsc;
                TextBox_AccountNumber.Text = bank_details.bankAccountNumber;
                TextBox_AccountHolder.Text = bank_details.bankAccountHolderName;
                TextBox_AccountType.Text   = bank_details.bankAccountType;

                if (TextBox_BankName.Text == "")
                {
                    MessageBox.Show("Please fill the Bank details for this case in 'New Case' Tab and then try to Update", "Bank details not Found!", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);
                }

                label_BankDetails_ErrorMessage.Text = bank_details.bankErrorMessage;
            }
        }