Exemple #1
0
        private ProgressMark _ProgressMark;            //Метка о выполнении

        public Position(Int64 ID, DateTime DateCreate, DateTime DateFormation, String NumMelt, Int64 Count, Double Weight,
                        String DefectLocIngot, String Correction, String Address, String Reason, TSN NumTS, ListBrigades NumBrigade,
                        DefectProduction DefectLocProduction, ListSmen NumSmeny, TypesDefect Defect, TypesAlloy TypeAlloy,
                        DescriptionDefect Description, DiameterIngot Diameter, ProgressMark ProgressMark)
        {
            if (ID >= 0)
            {
                _ID = ID;
            }

            if (DateCreate != null)
            {
                _DateCreate = DateCreate;
            }

            if (DateFormation != null)
            {
                _DateFormation = DateFormation;
            }

            if (!String.IsNullOrEmpty(NumMelt))
            {
                _NumMelt = NumMelt;
            }

            if (Count >= 0)
            {
                _Count = Count;
            }

            if (Weight >= 0)
            {
                _Weight = Weight;
            }

            if (!String.IsNullOrEmpty(DefectLocIngot))
            {
                _DefectLocIngot = DefectLocIngot;
            }

            if (!String.IsNullOrEmpty(Correction))
            {
                _Correction = Correction;
            }

            if (!String.IsNullOrEmpty(Address))
            {
                _Address = Address;
            }

            if (!String.IsNullOrEmpty(Reason))
            {
                _Reason = Reason;
            }

            if (NumTS != null)
            {
                _NumTS = NumTS;
            }

            if (NumBrigade != null)
            {
                _NumBrigade = NumBrigade;
            }

            if (DefectLocProduction != null)
            {
                _DefectLocProduction = DefectLocProduction;
            }

            if (NumSmeny != null)
            {
                _NumSmeny = NumSmeny;
            }

            if (Defect != null)
            {
                _Defect = Defect;
            }

            if (TypeAlloy != null)
            {
                _TypeAlloy = TypeAlloy;
            }

            if (Description != null)
            {
                _Description = Description;
            }

            if (Diameter != null)
            {
                _Diameter = Diameter;
            }

            if (ProgressMark != null)
            {
                _ProgressMark = ProgressMark;
            }
        }
Exemple #2
0
        private void RequestStart(bool Type, String Name)
        {
            SystemArgs.PrintLog("Запуск процедуры модификации параметра конфигурации");

            if (CurrentArgument is ListBrigades)
            {
                ListBrigades Temp = Spisok_LB.Items[Spisok_LB.SelectedIndex] as ListBrigades;

                if (Type)
                {
                    Operations.RequestChange(Temp.ID, Name, NameTable, NameColumn);
                }
                else
                {
                    Operations.RequestDelete(Temp.ID, NameTable);
                }
            }
            else if (CurrentArgument is ListSmen)
            {
                ListSmen Temp = Spisok_LB.Items[Spisok_LB.SelectedIndex] as ListSmen;

                if (Type)
                {
                    Operations.RequestChange(Temp.ID, Name, NameTable, NameColumn);
                }
                else
                {
                    Operations.RequestDelete(Temp.ID, NameTable);
                }
            }
            else if (CurrentArgument is TypesAlloy)
            {
                TypesAlloy Temp = Spisok_LB.Items[Spisok_LB.SelectedIndex] as TypesAlloy;

                if (Type)
                {
                    Operations.RequestChange(Temp.ID, Name, NameTable, NameColumn);
                }
                else
                {
                    Operations.RequestDelete(Temp.ID, NameTable);
                }
            }
            else if (CurrentArgument is DiameterIngot)
            {
                DiameterIngot Temp = Spisok_LB.Items[Spisok_LB.SelectedIndex] as DiameterIngot;

                if (Type)
                {
                    Operations.RequestChange(Temp.ID, Name, NameTable, NameColumn);
                }
                else
                {
                    Operations.RequestDelete(Temp.ID, NameTable);
                }
            }
            else if (CurrentArgument is DescriptionDefect)
            {
                DescriptionDefect Temp = Spisok_LB.Items[Spisok_LB.SelectedIndex] as DescriptionDefect;

                if (Type)
                {
                    Operations.RequestChange(Temp.ID, Name, NameTable, NameColumn);
                }
                else
                {
                    Operations.RequestDelete(Temp.ID, NameTable);
                }
            }
            else if (CurrentArgument is TypesDefect)
            {
                TypesDefect Temp = Spisok_LB.Items[Spisok_LB.SelectedIndex] as TypesDefect;

                if (Type)
                {
                    Operations.RequestChange(Temp.ID, Name, NameTable, NameColumn);
                }
                else
                {
                    Operations.RequestDelete(Temp.ID, NameTable);
                }
            }
            else if (CurrentArgument is TSN)
            {
                TSN Temp = Spisok_LB.Items[Spisok_LB.SelectedIndex] as TSN;

                if (Type)
                {
                    Operations.RequestChange(Temp.ID, Name, NameTable, NameColumn);
                }
                else
                {
                    Operations.RequestDelete(Temp.ID, NameTable);
                }
            }
            else if (CurrentArgument is DefectProduction)
            {
                DefectProduction Temp = Spisok_LB.Items[Spisok_LB.SelectedIndex] as DefectProduction;

                if (Type)
                {
                    Operations.RequestChange(Temp.ID, Name, NameTable, NameColumn);
                }
                else
                {
                    Operations.RequestDelete(Temp.ID, NameTable);
                }
            }
            else
            {
                ProgressMark Temp = Spisok_LB.Items[Spisok_LB.SelectedIndex] as ProgressMark;

                if (Type)
                {
                    Operations.RequestChange(Temp.ID, Name, NameTable, NameColumn);
                }
                else
                {
                    Operations.RequestDelete(Temp.ID, NameTable);
                }
            }

            RefreshDataSource();

            SystemArgs.PrintLog("Процедуры модификации параметра конфигурации завершена");
        }