Esempio n. 1
0
        protected override void ShowForm()
        {
            this.FillCombo();
            HPS.BLL.ComputerBLL.BLLComputer_TFactory ComputerFactory = new HPS.BLL.ComputerBLL.BLLComputer_TFactory();
            HPS.BLL.ComputerBLL.BLLComputer_T        ComputerEntity  = ComputerFactory.GetBy((HPS.BLL.ComputerBLL.BLLComputer_TKeys)Key);
            if (ComputerEntity == null)
            {
                throw new HPS.Exceptions.ComputerNotFound();
            }
            MessageLED_nvcTextBox.Text = Hepsa.Core.Common.PersentationController.GetEntityValue(ComputerEntity.MessageLED_nvc, TypeCode.String).ToString();
            IPTextBox.Text             = Hepsa.Core.Common.PersentationController.GetEntityValue(ComputerEntity.IPAddress_nvc, TypeCode.String).ToString();
            MacTextBox.Text            = Hepsa.Core.Common.PersentationController.GetEntityValue(ComputerEntity.MacAddress_nvc, TypeCode.String).ToString();
            Active_bitCheckBox.Checked = (Boolean)Hepsa.Core.Common.PersentationController.GetEntityValue(ComputerEntity.Active_bit, TypeCode.Boolean);

            List <HPS.BLL.ComputerBLL.BLLComputer_T> ComputerList = new List <HPS.BLL.ComputerBLL.BLLComputer_T>();

            ComputerList = ComputerFactory.GetAllByCondition(string.Format(" Computer_T.MacAddress_nvc='{0}' AND Deleted_bit=0", _MacAddress_nvc));

            if (ComputerList.Count > 0)
            {
                foreach (var item in ComputerList)
                {
                    foreach (var gridRow in UserNameGridView.GetRows())
                    {
                        if (item.Computer_nvc == gridRow.Cells["username_nvc"].Value.ToString())
                        {
                            gridRow.IsChecked = true;
                        }
                    }
                }
            }
        }
Esempio n. 2
0
 protected override void ShowForm()
 {
     this.FillCombo();
     HPS.BLL.ComputerBLL.BLLComputer_TFactory ComputerFactory = new HPS.BLL.ComputerBLL.BLLComputer_TFactory();
     HPS.BLL.ComputerBLL.BLLComputer_T        ComputerEntity  = ComputerFactory.GetBy((HPS.BLL.ComputerBLL.BLLComputer_TKeys)Key);
     if (ComputerEntity == null)
     {
         throw new HPS.Exceptions.ComputerNotFound();
     }
     Computer_nvcComboBox.Text  = Hepsa.Core.Common.PersentationController.GetEntityValue(ComputerEntity.Computer_nvc, TypeCode.String).ToString();
     MessageLED_nvcTextBox.Text = Hepsa.Core.Common.PersentationController.GetEntityValue(ComputerEntity.MessageLED_nvc, TypeCode.String).ToString();
     IPTextBox.Text             = Hepsa.Core.Common.PersentationController.GetEntityValue(ComputerEntity.IPAddress_nvc, TypeCode.String).ToString();
     MacTextBox.Text            = Hepsa.Core.Common.PersentationController.GetEntityValue(ComputerEntity.MacAddress_nvc, TypeCode.String).ToString();
     Active_bitCheckBox.Checked = (Boolean)Hepsa.Core.Common.PersentationController.GetEntityValue(ComputerEntity.Active_bit, TypeCode.Boolean);
     Hepsa.Core.Common.PersentationController.SetComboBoxValue(ref UserGroupID_intComboBox, ComputerEntity.UserGroupID_int, TypeCode.Int32);
 }