using System;
using System.Data;
using System.Windows.Forms;

namespace AyaNovaQBI
{
    public partial class SetQBClass : Form
    {
        public SetQBClass()
        {
            InitializeComponent();
        }


        public string DialogTitle { get; set; }

        public string OptionTitle { get; set; }

        public string OptionDescription { get; set; }


        public DataTable QBClasses { get; set; }



        public string SelectedQBClass
        {
            get
            {
                return cbQBClasses.SelectedValue.ToString();
            }

            set
            {
                _selectedQBClass = value;
            }
        }
        private string _selectedQBClass;

        private void SetQBClass_load(object sender, EventArgs e)
        {
            Text = DialogTitle;
            lblDescription.Text = OptionDescription;
            lblTitle.Text = OptionTitle;
            btnCancel.Text = util.AyaTranslations["Cancel"];
            btnOK.Text = util.AyaTranslations["OK"];

            cbQBClasses.DataSource = QBClasses;
            cbQBClasses.DisplayMember = "FullName";
            cbQBClasses.ValueMember = "ID";
           

            cbQBClasses.SelectedValue = _selectedQBClass;
        }


        private void btnOK_Click(object sender, EventArgs e)
        {

            DialogResult = DialogResult.OK;
            Close();
        }
    }
}
