Exemplo n.º 1
0
        private void Frm_AddNew_Unit_Load_1(object sender, EventArgs e)
        {
            _connectionString = GetConnectionString();

            lfa.pmgmt.data.DAO.BusinessRule.Load loadDAO = new lfa.pmgmt.data.DAO.BusinessRule.Load();
            loadDAO.ConnectionString = _connectionString;

            List <lfa.pmgmt.data.DTO.BusinessRule.Load> loadList = loadDAO.List();

            if (loadList.Count > 0)
            {
                if (loadList[0].ManualLoad > 0)
                {
                    txtZoneName.Text = loadList[0].ManualLoad.ToString();

                    radioButton2.Checked = false;
                    radioButton1.Checked = true;
                }
                else
                {
                    radioButton1.Checked = false;
                    radioButton2.Checked = true;

                    txtZoneName.Text = loadList[0].CurrentLoad.ToString();
                }

                textBox1.Text = loadList[0].MaximumLoad.ToString();
            }
            else
            {
                radioButton1.Checked = true;
                txtZoneName.Text     = "0";
                textBox1.Text        = "0";
            }
        }
Exemplo n.º 2
0
        private void radioButton2_CheckedChanged(object sender, EventArgs e)
        {
            if (radioButton2.Checked)
            {
                _connectionString = GetConnectionString();

                lfa.pmgmt.data.DAO.BusinessRule.Load loadDAO = new lfa.pmgmt.data.DAO.BusinessRule.Load();
                loadDAO.ConnectionString = _connectionString;

                List <lfa.pmgmt.data.DTO.BusinessRule.Load> loadList = loadDAO.List();

                if (loadList.Count > 0)
                {
                    txtZoneName.Text = loadList[0].CurrentLoad.ToString();
                    textBox1.Text    = loadList[0].MaximumLoad.ToString();
                }
                else
                {
                    txtZoneName.Text = "0";
                    textBox1.Text    = "0";
                }

                radioButton1.Checked = false;
            }
        }
Exemplo n.º 3
0
        private void Frm_AddNew_Unit_Load_1(object sender, EventArgs e)
        {
            _connectionString = GetConnectionString();

            lfa.pmgmt.data.DAO.BusinessRule.Load loadDAO = new lfa.pmgmt.data.DAO.BusinessRule.Load();
            loadDAO.ConnectionString = _connectionString;

            List<lfa.pmgmt.data.DTO.BusinessRule.Load> loadList = loadDAO.List();

            if (loadList.Count > 0)
            {
                if (loadList[0].ManualLoad > 0)
                {
                    txtZoneName.Text = loadList[0].ManualLoad.ToString();

                    radioButton2.Checked = false;
                    radioButton1.Checked = true;
                }
                else
                {
                    radioButton1.Checked = false;
                    radioButton2.Checked = true;

                    txtZoneName.Text = loadList[0].CurrentLoad.ToString();
                }

                textBox1.Text = loadList[0].MaximumLoad.ToString();
            }
            else
            {
                radioButton1.Checked = true;
                txtZoneName.Text = "0";
                textBox1.Text = "0";
            }
        }
Exemplo n.º 4
0
        private void radioButton2_CheckedChanged(object sender, EventArgs e)
        {
            if (radioButton2.Checked)
            {
                _connectionString = GetConnectionString();

                lfa.pmgmt.data.DAO.BusinessRule.Load loadDAO = new lfa.pmgmt.data.DAO.BusinessRule.Load();
                loadDAO.ConnectionString = _connectionString;

                List<lfa.pmgmt.data.DTO.BusinessRule.Load> loadList = loadDAO.List();

                if (loadList.Count > 0)
                {
                    txtZoneName.Text = loadList[0].CurrentLoad.ToString();
                    textBox1.Text = loadList[0].MaximumLoad.ToString();
                }
                else
                {
                    txtZoneName.Text = "0";
                    textBox1.Text = "0";
                }

                radioButton1.Checked = false;
            }
        }