void AddUpateBank()
        {
            try
            {
                ep1.Clear();

                if (string.IsNullOrEmpty(cmbName.Text.Trim()))
                {
                    ep1.SetError(cmbName, "Name is Required..");
                    cmbName.Focus();
                    return;
                }
                if (string.IsNullOrEmpty(cmbType.Text.Trim()))
                {
                    ep1.SetError(cmbType, "Type is Required..");
                    cmbType.Focus();
                    return;
                }
                if (string.IsNullOrEmpty(cmbPaymentType.Text.Trim()))
                {
                    ep1.SetError(cmbPaymentType, "Type is Required..");
                    cmbPaymentType.Focus();
                    return;
                }
                if (string.IsNullOrEmpty(txtAmount.Text.Trim()))
                {
                    ep1.SetError(txtAmount, "Amount is Required..");
                    txtAmount.Focus();
                    return;
                }

                int    T001_ACCOUNTID = 0, TM04_BANKID = 0, T009_AMOUNT = 0;
                string T009_TYPE         = cmbType.SelectedItem.ToString();
                string T009_PAYMENT_TYPE = cmbPaymentType.SelectedItem.ToString();
                int.TryParse(cmbName.SelectedValue.ToString(), out T001_ACCOUNTID);
                int.TryParse(Convert.ToString(cmbBank.SelectedValue), out TM04_BANKID);
                int.TryParse(txtAmount.Text.Trim(), out T009_AMOUNT);

                MyDa = new MyDabaseDataContext(Properties.Settings.Default.Style_King_Dev);
                int?Iout = 0;
                MyDa.USP_VP_ADDUPDATE_PAYMENT(Datalayer.iT009_PURCHASEPAYMENTID, dtpDate.Value, T001_ACCOUNTID, T009_TYPE, T009_PAYMENT_TYPE, TM04_BANKID, T009_AMOUNT, txtDetails.Text.Trim(), Datalayer.iT001_COMPANYID, ref Iout);
                if (Iout > 0)
                {
                    if (Datalayer.iT009_PURCHASEPAYMENTID == 0)
                    {
                        Datalayer.InsertMessageBox(sPageName);
                    }
                    else
                    {
                        Datalayer.UpdateMessageBox(sPageName);
                    }
                }
                else
                {
                    if (Datalayer.iT009_PURCHASEPAYMENTID == 0)
                    {
                        Datalayer.DosenotInsertMessageBox(sPageName);
                    }
                    else
                    {
                        Datalayer.DosenotUpdateMessageBox(sPageName);
                    }
                }

                ResetData();
            }
            catch (Exception ex)
            {
                Datalayer.WorningMessageBox(ex.Message.ToString(), "Error");
            }
        }