コード例 #1
0
        private void cmbPayFor_SelectedIndexChanged(object sender, EventArgs e)
        {
            string SelItem = MyCommon.GetSelectedID(cmbPayFor, true);

            cmbPayTo.Text = "";
            switch (SelItem)
            {
            case "1":
                btnBrowse.Enabled = true;
                // MyAccount.LoadSupplier(cmbPayTo);
                //Edited by Manjula
                LoadSuppliers();

                txtToAccount.Enabled = false;
                break;

            case "2":
                MyAccount.LoadCustomer(cmbPayTo);
                btnBrowse.Enabled    = false;
                txtToAccount.Enabled = false;
                break;

            case "3":
                MyAccount.LoadEmployee(cmbPayTo);
                txtToAccount.Enabled = true;
                btnBrowse.Enabled    = false;
                break;

            case "4":
                MyAccount.LoadSubContractors(cmbPayTo);
                btnBrowse.Enabled    = false;
                txtToAccount.Enabled = true;
                break;

            case "5":
                MyAccount.LoadOther(cmbPayTo);
                btnBrowse.Enabled    = false;
                txtToAccount.Enabled = true;
                break;

            default:
                btnBrowse.Enabled    = false;
                txtToAccount.Enabled = true;
                break;
            }
        }