Beispiel #1
0
        public void Move(BindingSource BSTemp)
        {
            int MonitorID = GetidCurrentMonitor(BSTemp);

            DS_NiheComputers.MonitorRow mr = DS.Monitor.FindByID(MonitorID);
            Monitor    monitor             = new Monitor(DS, mr);
            DialogMove D = new DialogMove(monitor);

            if (MoveEvent != null)
            {
                MoveEvent(this, D);
                if (D.Changed)
                {
                    if (monitor.Room != D.Room)
                    {
                        DisconectComputer(monitor, D.Date, D.ExtendedInfo);
                    }
                    monitor.DepartmentID = D.DepartmentID;
                    monitor.Room         = D.Room;
                    WriteEvent("Перемещение монитора", D.Date, monitor, D.ExtendedInfo);
                }
            }
            D       = null;
            monitor = null;
        }
Beispiel #2
0
        public void Move(BindingSource BSTemp)
        {
            int ComputerID = GetidCurrentComputer(BSTemp);

            DS_NiheComputers.CompRow cr = DS.Comp.FindByID(ComputerID);
            Computer   comp             = new Computer(DS, cr);
            DialogMove D = new DialogMove(comp);

            if (MoveEvent != null)
            {
                MoveEvent(this, D);
                if (D.Changed)
                {
                    if (comp.Room != D.Room)
                    {
                        DisconectMonitor(comp, D.Date, D.ExtendedInfo);
                    }
                    comp.DepartmentID = D.DepartmentID;
                    comp.Username     = D.Username;
                    comp.Room         = D.Room;
                    WriteEvent("Перемещение клмпьютера", D.Date, comp, D.ExtendedInfo);
                }
            }
            D    = null;
            comp = null;
        }
 public Form15Move(DS_NiheComputers DS, DialogMove D)
 {
     InitializeComponent();
     this.D = D;
     if (D.Comp != null)
     {
         lbDepartmentName.Text = D.Comp.Department;
     }
     else
     {
         lbDepartmentName.Text = D.Monic.Department;
         lbUsername.Visible    = false;
         tbUsername.Visible    = false;
         label4.Visible        = false;
         label6.Visible        = false;
         checkBox1.Visible     = false;
     }
     lbRoom.Text                = D.Room;
     lbUsername.Text            = D.Username;
     tbUsername.Text            = D.Username;
     tbRoom.Text                = D.Room;
     cbDepartment.DataSource    = DS.Department;
     cbDepartment.ValueMember   = "id";
     cbDepartment.DisplayMember = "FullName";
     cbDepartment.SelectedValue = D.DepartmentID;
 }
Beispiel #4
0
        void DeviceMoveEvent(object sender, DialogMove Dialog)
        {
            Form15Move F = new Form15Move(C1.DS, Dialog);

            F.ShowDialog();
        }