예제 #1
0
        public Form07CompInfo(Class1 C1, DialogComputer D)
        {
            this.D = D;
            InitializeComponent();
            string filterString = string.Format("CompGUID = '{0}'", D.Comp.GUID);

            this.BS        = C1.BSCompEvent;
            this.BS.Filter = filterString;
            this.C1        = C1;

            this.panel2.Visible = D.ShowDelButton;
            this.eventCompDataGridView.DataSource = BS;
            this.panel2.Enabled = !D.Comp.Deleted;
            this.propertyGrid1.SelectedObject = D.Comp;
            if (D.ShowDelButton)
            {
                this.Text  = "Списание компьютера";
                this.Width = 850;
            }
            else
            {
                this.Text  = "Информация о компьютере";
                this.Width = 450;
                this.propertyGrid1.Dock = DockStyle.Fill;
            }
        }
예제 #2
0
 public EventWriterComp(DialogComputer D)
 {
     this.DS           = D.Comp.DS;
     this.ComputerGUID = D.Comp.GUID;
     this.Date         = D.Date;
     this.ExtendedInfo = D.ExtendedInfo;
 }
예제 #3
0
 public Form03NewComp(DialogComputer D)
 {
     this.DS   = D.Comp.DS;
     this.comp = D.Comp;
     this.D    = D;
     InitializeComponent();
     Init();
 }
예제 #4
0
        public void Add_new()
        {
            Computer       comp       = new Computer(DS);
            DialogComputer D          = new DialogComputer(comp);
            string         infoString = null;

            if (ComputerAddEvent_New != null)
            {
                ComputerAddEvent_New(this, D);
                if (D.Changed)
                {
                    comp.ComputerName = D.Comp.ComputerName;
                    comp.DepartmentID = D.Comp.DepartmentID;
                    comp.HDDID        = D.Comp.HDDID;
                    comp.Number       = D.Comp.Number;
                    comp.OSID         = D.Comp.OSID;
                    comp.ProcessorID  = D.Comp.ProcessorID;
                    comp.PurchaseDate = D.Comp.PurchaseDate;
                    comp.WarantyDate  = D.Comp.WarantyDate;
                    comp.Room         = D.Comp.Room;
                    comp.Username     = D.Comp.Username;
                    comp.RAMID        = D.Comp.RAMID;
                    infoString        = comp.FullName;
                    EventWriterComp ewc = new EventWriterComp(D);
                    ewc.EventName = "Поступление компьютера";
                    ewc.Info      = comp.FullName;
                    if (comp.Number != null & comp.Number != "")
                    {
                        ewc.Info = string.Format("{0}\r\nИнв. №: {1}", ewc.Info, comp.Number);
                    }
                    if (comp.Vendor != null & comp.Vendor != " ")
                    {
                        ewc.Info = string.Format("{0}\r\nПроизвод.: {1}", ewc.Info, comp.Vendor);
                    }
                    if (comp.Department != null & comp.Department != "")
                    {
                        ewc.Info = string.Format("{0}\r\nСтрукт подразд.: {1}", ewc.Info, comp.Department);
                    }
                    if (comp.ComputerName != null & comp.ComputerName != "")
                    {
                        ewc.Info = string.Format("{0}\r\nИмя комп.: {1}", ewc.Info, comp.ComputerName);
                    }
                    if (comp.Room != null & comp.Room != "")
                    {
                        ewc.Info = string.Format("{0}\r\nКабинет: {1}", ewc.Info, comp.Room);
                    }
                    if (comp.Username != null & comp.Username != "")
                    {
                        ewc.Info = string.Format("{0}\r\nИмя польз.: {1}", ewc.Info, comp.Username);
                    }
                    ewc.Write();
                }
            }
            D    = null;
            comp = null;
        }
예제 #5
0
 public void ShowInfo(BindingSource BSTemp, bool ShowDelButton)
 {
     if (ComputerShowInfo != null)
     {
         int ComputerID = GetidCurrentComputer(BSTemp);
         DS_NiheComputers.CompRow cr = DS.Comp.FindByID(ComputerID);
         Computer       Comp         = new Computer(DS, cr);
         DialogComputer D            = new DialogComputer(Comp);
         D.ShowDelButton = ShowDelButton;
         ComputerShowInfo(this, D);
     }
 }
 public Form05ChangeValue(DialogComputer D)
 {
     InitializeComponent();
     this.D = D;
     this.comboBox1.Visible = false;
 }
예제 #7
0
 private void WriteEvent(string S1, DialogComputer D)
 {
     WriteEvent(S1, D.Date, D.Comp, D.ExtendedInfo);
 }
예제 #8
0
 public void Remove(DialogComputer D)
 {
     DisconectMonitor(D.Comp, D.Date, D.ExtendedInfo);
     D.Comp.Remove();
     WriteEvent("Списание компьютера", D);
 }
예제 #9
0
        void Computer_ComputerShowInfo(object sender, DialogComputer Dialog)
        {
            Form07CompInfo F = new Form07CompInfo(C1, Dialog);

            F.ShowDialog();
        }
예제 #10
0
        void Computer_ComputerAddEvent_New(object sender, DialogComputer D)
        {
            Form03NewComp F = new Form03NewComp(D);

            F.ShowDialog();
        }