コード例 #1
0
        private void dgvAllFunctions_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (dgvAllFunctions.SelectedRows.Count == 0)
            {
                return;
            }
            int    FunctionID          = Convert.ToInt32(dgvAllFunctions.SelectedRows[0].Cells["FunctionID"].Value);
            string FunctionName        = dgvAllFunctions.SelectedRows[0].Cells["FunctionName"].Value.ToString();
            string FunctionDescription = dgvAllFunctions.SelectedRows[0].Cells["FunctionDescription"].Value.ToString();

            PhantomForm PhantomForm = new Infinium.PhantomForm();

            PhantomForm.Show();

            AddFunctionsForm AddResponsibilitiesForm = new AddFunctionsForm(ref AdminFunctionsEdit,
                                                                            FunctionID, FunctionName, FunctionDescription);

            TopForm = AddResponsibilitiesForm;

            AddResponsibilitiesForm.ShowDialog();

            PhantomForm.Close();
            PhantomForm.Dispose();

            TopForm = null;

            AddResponsibilitiesForm.Dispose();
            AdminFunctionsEdit.MoveToFunction(FunctionID);
        }
コード例 #2
0
        private void btnAddInsetTypes_Click(object sender, EventArgs e)
        {
            PhantomForm PhantomForm = new Infinium.PhantomForm();

            PhantomForm.Show();
            InsetTypesEditForm = new InsetTypesEditForm(this);

            TopForm = InsetTypesEditForm;
            InsetTypesEditForm.ShowDialog();
            TopForm = null;

            PhantomForm.Close();

            PhantomForm.Dispose();
            if (InsetTypesEditForm.PressOK)
            {
                InsetGroupID = InsetTypesEditForm.GroupID;
                InsetTypesEditForm.Dispose();
                InsetTypesEditForm = null;
                GC.Collect();

                AddInsetTypesColumn();
                CheckInsetTypes();
                btnSaveInsetTypes.Visible = true;
                btnAddInsetTypes.Visible  = false;
            }
            else
            {
                InsetTypesEditForm.Dispose();
                InsetTypesEditForm = null;
                GC.Collect();
            }
        }
コード例 #3
0
        private void btnAddUserFunction_Click(object sender, EventArgs e)
        {
            PhantomForm PhantomForm = new Infinium.PhantomForm();

            PhantomForm.Show();

            int StaffListID = UsersResponsibilities.GetStaffListID(iFactoryID, iDepartmentID, Security.CurrentUserID, iPositionID);
            FunctionsManagementForm FunctionsManagementForm = new FunctionsManagementForm(StaffListID, Security.CurrentUserID);

            TopForm = FunctionsManagementForm;

            FunctionsManagementForm.ShowDialog();

            PhantomForm.Close();
            PhantomForm.Dispose();

            TopForm = null;

            FunctionsManagementForm.Close();
            FunctionsManagementForm.Dispose();

            if (iFactoryID == 1)
            {
                tUsersResponsibilities.UpdateProfilFunctions();
                dgvUsersFunctions.DataSource = tUsersResponsibilities.GetProfilPositionFunctions(iPositionID);
            }
            if (iFactoryID == 2)
            {
                tUsersResponsibilities.UpdateTPSFunctions();
                dgvUsersFunctions.DataSource = tUsersResponsibilities.GetTPSPositionFunctions(iPositionID);
            }
        }
コード例 #4
0
        private void kryptonButton1_Click(object sender, EventArgs e)
        {
            PhantomForm PhantomForm = new Infinium.PhantomForm();

            PhantomForm.Show();

            WriteOffParametersMenu MovementReportMenu = new WriteOffParametersMenu(this, ref Parameters);

            TopForm = MovementReportMenu;
            MovementReportMenu.ShowDialog();

            PhantomForm.Close();

            PhantomForm.Dispose();

            MovementReportMenu.Dispose();
            TopForm = null;

            if (!Parameters.OKPress)
            {
                return;
            }

            InventoryManager.InventoryReport2("Акт списания", Parameters.WriteOffDate, Parameters.User1, Parameters.User2, Parameters.User3, Parameters.User4, Parameters.User5);
        }
コード例 #5
0
        private void LabelCheckProfilForm_Shown(object sender, EventArgs e)
        {
            while (!SplashForm.bCreated)
            {
                ;
            }
            FormEvent            = eShow;
            AnimateTimer.Enabled = true;

            PhantomForm PhantomForm = new Infinium.PhantomForm();

            PhantomForm.Show();

            ReAutorizationForm ReAutorizationForm = new ReAutorizationForm(this);

            TopForm = ReAutorizationForm;
            ReAutorizationForm.ShowDialog();

            PhantomForm.Close();

            PhantomForm.Dispose();
            bool PressOK = ReAutorizationForm.PressOK;

            UserID = ReAutorizationForm.UserID;
            ReAutorizationForm.Dispose();
            TopForm = null;

            if (PressOK)
            {
                CheckLabel.UserID = UserID;
                CanAction         = true;
            }

            ScanEvents.AddEvent(EventsDataTable, "Открыл форму сканирования на склад", 0, CheckLabel.UserID);
        }
コード例 #6
0
        private void LabelCheckProfilForm_Shown(object sender, EventArgs e)
        {
            while (!SplashForm.bCreated)
            {
                ;
            }
            FormEvent            = eShow;
            AnimateTimer.Enabled = true;

            panel3.BringToFront();

            PhantomForm PhantomForm = new Infinium.PhantomForm();

            PhantomForm.Show();

            ReAutorizationForm ReAutorizationForm = new ReAutorizationForm(this);

            TopForm = ReAutorizationForm;
            ReAutorizationForm.ShowDialog();

            PhantomForm.Close();

            PhantomForm.Dispose();
            bool PressOK = ReAutorizationForm.PressOK;

            UserID = ReAutorizationForm.UserID;
            ReAutorizationForm.Dispose();
            TopForm = null;

            if (PressOK)
            {
                CheckLabel.UserID = UserID;
                CanAction         = true;
            }
        }
コード例 #7
0
        private void FilterButton_Click(object sender, EventArgs e)
        {
            PhantomForm PhantomForm = new Infinium.PhantomForm();

            PhantomForm.Show();

            ZOVFilterProductsForm = new ZOVFilterProductsForm(FactoryID, ref FrontIDs, ref ProductIDs);

            TopForm = ZOVFilterProductsForm;
            ZOVFilterProductsForm.ShowDialog();
            TopForm = null;

            PhantomForm.Close();

            PhantomForm.Dispose();

            if (ZOVFilterProductsForm.IsOKPress)
            {
                ZOVFilterProductsForm.Dispose();
                ZOVFilterProductsForm = null;
                GC.Collect();

                NeedSplash = false;
                Thread T = new Thread(delegate() { SplashWindow.CreateSmallSplash(ref TopForm, "Загрузка данных с сервера.\r\nПодождите..."); });
                T.Start();

                while (!SplashWindow.bSmallCreated)
                {
                    ;
                }

                MainOrdersTabControl.Visible = false;
                bool NoDispatched = NoDispatchedCheckBox.Checked;
                bool NotPrinted   = cbNotPrintedPackages.Checked;

                ZOVPackagesPrintManager.FillOrders(FrontIDs, ProductIDs, NoDispatched, NotPrinted);
                MainOrdersTabControl.Visible = true;

                ZOVPackagesPrintManager.MegaOrdersBindingSource.MoveLast();
                MegaOrdersDataGrid_SelectionChanged(null, null);

                while (SplashWindow.bSmallCreated)
                {
                    SmallWaitForm.CloseS = true;
                }

                NeedSplash = true;
            }
            else
            {
                ZOVFilterProductsForm.Dispose();
                ZOVFilterProductsForm = null;
                GC.Collect();
            }
        }
コード例 #8
0
        private void btnNewPermit_Click(object sender, EventArgs e)
        {
            bool   PressOK = false;
            bool   Visitor = false;
            object Name    = DBNull.Value;
            object Purpose = DBNull.Value;

            PhantomForm PhantomForm = new Infinium.PhantomForm();

            PhantomForm.Show();

            NewPermitMenu NewPermitMenu = new NewPermitMenu(this);

            TopForm = NewPermitMenu;
            NewPermitMenu.ShowDialog();

            Visitor = NewPermitMenu.Visitor;
            PressOK = NewPermitMenu.PressOK;
            Name    = NewPermitMenu.sName;
            Purpose = NewPermitMenu.sPurpose;

            PhantomForm.Close();
            PhantomForm.Dispose();
            NewPermitMenu.Dispose();
            TopForm = null;

            if (!PressOK)
            {
                return;
            }
            Thread T = new Thread(delegate() { SplashWindow.CreateSmallSplash(ref TopForm, "Загрузка данных с сервера.\r\nПодождите..."); });

            T.Start();

            while (!SplashWindow.bSmallCreated)
            {
                ;
            }
            NeedSplash = false;

            PermitsManager.NewPermit(Visitor, Name.ToString(), Purpose.ToString());
            PermitsManager.SavePermits();
            UpdatePermits();

            NeedSplash = true;
            while (SplashWindow.bSmallCreated)
            {
                SmallWaitForm.CloseS = true;
            }
        }
コード例 #9
0
        private void dgvRollersInColor_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            PercentageDataGrid senderGrid = (PercentageDataGrid)sender;

            if (senderGrid.SelectedRows.Count == 0)
            {
                return;
            }

            if (senderGrid.Columns[e.ColumnIndex].Name == "Column1" && e.RowIndex >= 0)
            {
                bool OKSplit            = false;
                int  ManufactureStoreID = 0;
                int  NewCount           = 0;
                int  OldCount           = 0;

                if (senderGrid.SelectedRows[0].Cells["ManufactureStoreID"].Value != DBNull.Value)
                {
                    ManufactureStoreID = Convert.ToInt32(senderGrid.SelectedRows[0].Cells["ManufactureStoreID"].Value);
                }
                if (senderGrid.SelectedRows[0].Cells["CurrentCount"].Value != DBNull.Value)
                {
                    OldCount = Convert.ToInt32(senderGrid.SelectedRows[0].Cells["CurrentCount"].Value);
                }
                PhantomForm PhantomForm = new Infinium.PhantomForm();
                PhantomForm.Show();

                SplitAssignmentRequestMenu SplitAssignmentRequestMenu = new SplitAssignmentRequestMenu(true, OldCount);
                TopForm = SplitAssignmentRequestMenu;
                SplitAssignmentRequestMenu.ShowDialog();

                OKSplit  = SplitAssignmentRequestMenu.OKSplit;
                NewCount = SplitAssignmentRequestMenu.Count;

                PhantomForm.Close();
                PhantomForm.Dispose();
                SplitAssignmentRequestMenu.Dispose();
                TopForm = null;
                if (OKSplit)
                {
                    ProfileAssignmentsManager.AddTransferredRoller(DecorAssignmentID, ManufactureStoreID, NewCount);
                    //ProfileAssignmentsManager.WriteOffFromManufactureStoreByManufactureStoreID(ManufactureStoreID, NewCount);
                    ProfileAssignmentsManager.SaveTransferredRollers();
                    ProfileAssignmentsManager.GetTransferredRollers(DecorAssignmentID);
                    ProfileAssignmentsManager.GetRollersInColorOnStorage(CoverID);
                    InfiniumTips.ShowTip(this, 50, 85, "Сохранено", 1700);
                }
            }
        }
コード例 #10
0
        private void LightNewsContainer_RemoveNewsClicked(object sender, int NewsID)
        {
            PhantomForm PhantomForm = new Infinium.PhantomForm();

            PhantomForm.Show();

            LightMessageBoxForm LightMessageBoxForm = new Infinium.LightMessageBoxForm(true, "Сообщение будет удалено безвозвратно.\nПродолжить?",
                                                                                       "Удаление сообщения");

            TopForm = LightMessageBoxForm;

            LightMessageBoxForm.ShowDialog();

            TopForm = null;

            PhantomForm.Close();
            PhantomForm.Dispose();


            if (LightMessageBoxForm.OKCancel)
            {
                Thread T = new Thread(delegate()
                {
                    SplashWindow.CreateCoverSplash(LightNewsContainer.Top, LightNewsContainer.Left,
                                                   LightNewsContainer.Height, LightNewsContainer.Width);
                });
                T.Start();

                while (!SplashWindow.bSmallCreated)
                {
                    ;
                }


                LightNews.RemoveNews(NewsID);
                LightNews.ReloadNews(LightNewsContainer.NewsCount);
                LightNews.ReloadComments();
                LightNewsContainer.NewsDataTable = LightNews.NewsDataTable.Copy();
                LightNewsContainer.CommentsDT    = LightNews.CommentsDataTable.Copy();
                LightNewsContainer.CreateNews();
            }

            LightMessageBoxForm.Dispose();


            bC = true;
        }
コード例 #11
0
        private void btnAddError_Click(object sender, EventArgs e)
        {
            PhantomForm PhantomForm = new Infinium.PhantomForm();

            PhantomForm.Show();

            NewClientErrorForm AddNewClientErrorForm = new NewClientErrorForm(this, ref ClientErrorsWriteOffs);

            TopForm = AddNewClientErrorForm;
            AddNewClientErrorForm.ShowDialog();

            PhantomForm.Close();

            PhantomForm.Dispose();
            AddNewClientErrorForm.Dispose();
            TopForm = null;
        }
コード例 #12
0
        private void btnEditCountries_Click(object sender, EventArgs e)
        {
            PhantomForm PhantomForm = new Infinium.PhantomForm();

            PhantomForm.Show();

            CountriesForm CountriesForm = new CountriesForm(this, Clients);

            TopForm = CountriesForm;
            CountriesForm.ShowDialog();

            PhantomForm.Close();

            PhantomForm.Dispose();
            CountriesForm.Dispose();
            TopForm = null;
        }
コード例 #13
0
        private void btnAddNotPaidOrder_Click(object sender, EventArgs e)
        {
            PhantomForm PhantomForm = new Infinium.PhantomForm();

            PhantomForm.Show();

            NewNotPaidOrderForm NewNotPaidOrderForm = new NewNotPaidOrderForm(this, ref NotPaidOrders);

            TopForm = NewNotPaidOrderForm;
            NewNotPaidOrderForm.ShowDialog();

            PhantomForm.Close();

            PhantomForm.Dispose();
            NewNotPaidOrderForm.Dispose();
            TopForm = null;
        }
コード例 #14
0
        private void CoderBlogContainer_RemoveCommentClicked(object sender, int NewsID, int NewsCommentID)
        {
            PhantomForm PhantomForm = new Infinium.PhantomForm();

            PhantomForm.Show();

            LightMessageBoxForm LightMessageBoxForm = new Infinium.LightMessageBoxForm(true, "Комментарий будет удален.\nПродолжить?",
                                                                                       "Удаление комментария");

            TopForm = LightMessageBoxForm;

            LightMessageBoxForm.ShowDialog();

            TopForm = null;

            PhantomForm.Close();
            PhantomForm.Dispose();


            if (LightMessageBoxForm.OKCancel)
            {
                Thread T = new Thread(delegate()
                {
                    SplashWindow.CreateCoverSplash(CoderBlogContainer.Top, CoderBlogContainer.Left,
                                                   CoderBlogContainer.Height, CoderBlogContainer.Width);
                });
                T.Start();

                while (!SplashWindow.bSmallCreated)
                {
                    ;
                }

                CoderBlog.RemoveComment(NewsCommentID);

                CoderBlog.ReloadNews(CoderBlogContainer.NewsCount);
                CoderBlog.ReloadComments();
                CoderBlogContainer.NewsDataTable = CoderBlog.BlogNewsDataTable.Copy();
                CoderBlogContainer.CommentsDT    = CoderBlog.CommentsDataTable.Copy();
                CoderBlogContainer.CreateNews();
                CoderBlogContainer.ReloadNewsItem(NewsID, true);

                bC = true;
            }
        }
コード例 #15
0
        private void kryptonContextMenuItem2_Click(object sender, EventArgs e)
        {
            TafelManager.SplitStruct TafelSplitStruct = new TafelManager.SplitStruct()
            {
                bEqual      = false,
                SourceCount = TafelManager.CurrentFrontsCount
            };
            PhantomForm PhantomForm = new Infinium.PhantomForm();

            PhantomForm.Show();

            TafelSplitMenu TafelSplitMenu = new TafelSplitMenu(this, ref TafelSplitStruct);

            TopForm = TafelSplitMenu;
            TafelSplitMenu.ShowDialog();

            PhantomForm.Close();
            PhantomForm.Dispose();
            TafelSplitMenu.Dispose();
            TopForm = null;

            if (!TafelSplitStruct.bOk)
            {
                return;
            }

            decimal Square = 0;

            if (TafelSplitStruct.SecondCount == 0)
            {
                TafelManager.EditCurrentFrontsCout(TafelSplitStruct.FirstCount, ref Square);
                for (int i = 0; i < TafelSplitStruct.PosCount - 1; i++)
                {
                    TafelManager.AddNewRow(TafelSplitStruct.FirstCount, Square);
                }
            }
            else
            {
                TafelManager.EditCurrentFrontsCout(TafelSplitStruct.SecondCount, ref Square);
                for (int i = 0; i < TafelSplitStruct.PosCount; i++)
                {
                    TafelManager.AddNewRow(TafelSplitStruct.FirstCount, Square);
                }
            }
        }
コード例 #16
0
        private void btnEditClientRates_Click(object sender, EventArgs e)
        {
            PhantomForm PhantomForm = new Infinium.PhantomForm();

            PhantomForm.Show();

            int             ClientID        = Convert.ToInt32(((DataRowView)Clients.ClientsBindingSource.Current).Row["ClientID"]);
            ClientRatesForm ClientRatesForm = new ClientRatesForm(this, Clients, ClientID);

            TopForm = ClientRatesForm;
            ClientRatesForm.ShowDialog();

            PhantomForm.Close();

            PhantomForm.Dispose();
            ClientRatesForm.Dispose();
            TopForm = null;
        }
コード例 #17
0
        private void btnCreatePermit_Click(object sender, EventArgs e)
        {
            NewPermit = new Modules.Permits.NewMachinePermit();
            PhantomForm PhantomForm = new Infinium.PhantomForm();

            PhantomForm.Show();

            NewMachinesPermitForm NewPermitForm = new NewMachinesPermitForm(this, ref NewPermit);

            TopForm = NewPermitForm;
            NewPermitForm.ShowDialog();

            PhantomForm.Close();
            PhantomForm.Dispose();
            NewPermitForm.Dispose();
            TopForm = null;

            if (!NewPermit.bCreatePermit)
            {
                return;
            }
            Thread T = new Thread(delegate() { SplashWindow.CreateSmallSplash(ref TopForm, "Загрузка данных с сервера.\r\nПодождите..."); });

            T.Start();

            while (!SplashWindow.bSmallCreated)
            {
                ;
            }
            NeedSplash = false;

            PermitsManager.NewPermit(NewPermit.VisitorName, NewPermit.VisitMission, NewPermit.Validity);

            PermitsManager.SendApproveNotifications(iApprovedRole);
            PermitsManager.SavePermits();
            UpdatePermitDates();

            NeedSplash = true;
            while (SplashWindow.bSmallCreated)
            {
                SmallWaitForm.CloseS = true;
            }
            InfiniumTips.ShowTip(this, 50, 85, "Пропуск создан", 1700);
        }
コード例 #18
0
        private void TPSAttach_Click(object sender, EventArgs e)
        {
            DispatchList.MegaOrdersBindingSource.Position = CurrentRowIndex;
            int  ClientID       = Convert.ToInt32(((DataRowView)DispatchList.MegaOrdersBindingSource.Current)["ClientID"]);
            int  MegaOrderID    = Convert.ToInt32(((DataRowView)DispatchList.MegaOrdersBindingSource.Current)["MegaOrderID"]);
            bool NeedProfilList = false;
            bool NeedTPSList    = true;

            bool PressOK       = false;
            bool ColorFullName = false;

            PhantomForm PhantomForm = new Infinium.PhantomForm();

            PhantomForm.Show();

            MarketingDispatchInfoMenu MarketingDispatchInfoMenu = new MarketingDispatchInfoMenu(this);

            TopForm = MarketingDispatchInfoMenu;
            MarketingDispatchInfoMenu.ShowDialog();

            PressOK       = MarketingDispatchInfoMenu.PressOK;
            ColorFullName = MarketingDispatchInfoMenu.ColorFullName;

            PhantomForm.Close();
            PhantomForm.Dispose();
            MarketingDispatchInfoMenu.Dispose();
            TopForm = null;

            Thread T = new Thread(delegate() { SplashWindow.CreateSmallSplash(ref TopForm, "Создание документа Excel.\r\nПодождите..."); });

            T.Start();

            while (!SplashWindow.bSmallCreated)
            {
                ;
            }

            DispatchList.CreateReport(MegaOrderID, ClientID, NeedProfilList, NeedTPSList, true, ColorFullName);
            while (SplashWindow.bSmallCreated)
            {
                SmallWaitForm.CloseS = true;
            }
        }
コード例 #19
0
        private void btnAddFunction_Click(object sender, EventArgs e)
        {
            PhantomForm PhantomForm = new Infinium.PhantomForm();

            PhantomForm.Show();

            AddFunctionsForm AddResponsibilitiesForm = new AddFunctionsForm(ref AdminFunctionsEdit);

            TopForm = AddResponsibilitiesForm;

            AddResponsibilitiesForm.ShowDialog();

            PhantomForm.Close();
            PhantomForm.Dispose();

            TopForm = null;

            AddResponsibilitiesForm.Dispose();
        }
コード例 #20
0
        private void LightNewsContainer_AttachClicked(object sender, int NewsAttachID)
        {
            PhantomForm PhantomForm = new Infinium.PhantomForm();

            PhantomForm.Show();

            AttachDownloadForm AttachDownloadForm = new AttachDownloadForm(NewsAttachID, ref LightNews.FM, ref LightNews);

            TopForm = AttachDownloadForm;

            AttachDownloadForm.ShowDialog();

            PhantomForm.Close();

            PhantomForm.Dispose();

            TopForm = null;

            AttachDownloadForm.Dispose();
        }
コード例 #21
0
        private void ClientsNewClientButton_Click(object sender, EventArgs e)
        {
            Clients.NewClient = true;

            PhantomForm PhantomForm = new Infinium.PhantomForm();

            PhantomForm.Show();

            int ClientID = Convert.ToInt32(((DataRowView)Clients.ClientsBindingSource.Current).Row["ClientID"]);
            NewMarketingClientForm NewMarketingClientForm = new NewMarketingClientForm(this, Clients, ClientID, bPriceGroup);

            TopForm = NewMarketingClientForm;
            NewMarketingClientForm.ShowDialog();

            PhantomForm.Close();

            PhantomForm.Dispose();
            NewMarketingClientForm.Dispose();
            TopForm = null;
        }
コード例 #22
0
        private void ClientsDataGrid_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            Clients.NewClient = false;

            PhantomForm PhantomForm = new Infinium.PhantomForm();

            PhantomForm.Show();

            int ClientID = Convert.ToInt32(((DataRowView)Clients.ClientsBindingSource.Current).Row["ClientID"]);
            NewZOVClientForm NewZOVClientForm = new NewZOVClientForm(this, Clients, ClientID, bPriceGroup);

            NewZOVClientForm.EditClient();
            TopForm = NewZOVClientForm;
            NewZOVClientForm.ShowDialog();

            PhantomForm.Close();

            PhantomForm.Dispose();
            NewZOVClientForm.Dispose();
            TopForm = null;
        }
コード例 #23
0
        private void dgvMainOrders_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex > -1 && dgvMainOrders.Columns[e.ColumnIndex].Name == "ShopAddresses" &&
                dgvMainOrders.Rows[e.RowIndex].Cells[e.ColumnIndex].Value != null &&
                dgvMainOrders.Rows[e.RowIndex].Cells[e.ColumnIndex].Value != DBNull.Value &&
                dgvMainOrders.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString().Length > 0)
            {
                int FirmType = Convert.ToInt32(dgvMainOrders.SelectedRows[0].Cells["FirmType"].Value);
                if (FirmType == 1)
                {
                    PhantomForm PhantomForm = new Infinium.PhantomForm();
                    PhantomForm.Show();
                    MarketShopAddressesForm ShopAddressesForm = new MarketShopAddressesForm(this, OrdersManager,
                                                                                            FirmType, Convert.ToInt32(dgvMainOrders.SelectedRows[0].Cells["ClientID"].Value));
                    TopForm = ShopAddressesForm;
                    ShopAddressesForm.ShowDialog();
                    PhantomForm.Close();
                    PhantomForm.Dispose();
                    ShopAddressesForm.Dispose();
                    TopForm = null;
                }
                if (FirmType == 0)
                {
                    int ClientID    = Convert.ToInt32(dgvMainOrders.SelectedRows[0].Cells["ClientID"].Value);
                    int MainOrderID = Convert.ToInt32(dgvMainOrders.SelectedRows[0].Cells["MainOrderID"].Value);

                    PhantomForm PhantomForm = new Infinium.PhantomForm();
                    PhantomForm.Show();
                    ZOVShopAddressesForm ShopAddressesForm = new ZOVShopAddressesForm(this, ClientID, MainOrderID);
                    TopForm = ShopAddressesForm;
                    ShopAddressesForm.ShowDialog();
                    PhantomForm.Close();
                    PhantomForm.Dispose();
                    ShopAddressesForm.Dispose();
                    TopForm = null;
                }
            }
        }
コード例 #24
0
        private void LanguageEditButton_Click(object sender, EventArgs e)
        {
            PhantomForm PhantomForm = new Infinium.PhantomForm();

            PhantomForm.Show();

            LanguageForm LanguageForm = new LanguageForm();

            for (int i = 0; i < LanguagesListBox.ItemCount; i++)
            {
                LanguageForm.ProfLangs.Add(LanguagesListBox.Items[i]);
            }

            TopForm = LanguageForm;

            LanguageForm.ShowDialog();

            PhantomForm.Close();
            PhantomForm.Dispose();

            TopForm = null;

            LanguagesListBox.Items.Clear();

            if (LanguageForm.ProfLangs.Count == 0)
            {
                LanguageForm.Dispose();
                return;
            }

            for (int i = 0; i < LanguageForm.ProfLangs.Count; i++)
            {
                LanguagesListBox.Items.Add(LanguageForm.ProfLangs[i]);
            }

            LanguageForm.Dispose();
        }
コード例 #25
0
        private void dgvTransferredRollers_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            PercentageDataGrid senderGrid = (PercentageDataGrid)sender;

            if (senderGrid.SelectedRows.Count == 0)
            {
                return;
            }

            if (senderGrid.Columns[e.ColumnIndex].Name == "Column1" && e.RowIndex >= 0)
            {
                bool    OKSplit     = false;
                decimal NewDiameter = 0;
                decimal NewWidth    = 0;
                int     NewCount    = 0;

                PhantomForm PhantomForm = new Infinium.PhantomForm();
                PhantomForm.Show();

                SplitAssignmentRequestMenu SplitAssignmentRequestMenu = new SplitAssignmentRequestMenu(false, 0);
                TopForm = SplitAssignmentRequestMenu;
                SplitAssignmentRequestMenu.ShowDialog();

                OKSplit     = SplitAssignmentRequestMenu.OKSplit;
                NewDiameter = SplitAssignmentRequestMenu.Diameter;
                NewWidth    = SplitAssignmentRequestMenu.iWidth;
                NewCount    = SplitAssignmentRequestMenu.Count;

                PhantomForm.Close();
                PhantomForm.Dispose();
                SplitAssignmentRequestMenu.Dispose();
                TopForm = null;

                //int StoreItemID = -1;
                //decimal Length = -1;
                //decimal Width = -1;
                //decimal Height = -1;
                //decimal Thickness = -1;
                //decimal Diameter = -1;
                //decimal Admission = -1;
                //decimal Capacity = -1;
                //decimal Weight = -1;
                //int ColorID = -1;
                //int PatinaID = -1;
                ////int CoverID = -1;
                //int FactoryID = 1;
                //string Notes = string.Empty;

                //if (senderGrid.SelectedRows[0].Cells["Width"].Value != DBNull.Value)
                //    Width = Convert.ToInt32(senderGrid.SelectedRows[0].Cells["Width"].Value);
                //if (senderGrid.SelectedRows[0].Cells["Thickness"].Value != DBNull.Value)
                //    Thickness = Convert.ToInt32(senderGrid.SelectedRows[0].Cells["Thickness"].Value);
                //if (senderGrid.SelectedRows[0].Cells["Diameter"].Value != DBNull.Value)
                //    Diameter = Convert.ToInt32(senderGrid.SelectedRows[0].Cells["Diameter"].Value);
                //if (senderGrid.SelectedRows[0].Cells["StoreItemID"].Value != DBNull.Value)
                //    StoreItemID = Convert.ToInt32(senderGrid.SelectedRows[0].Cells["StoreItemID"].Value);

                if (OKSplit)
                {
                    ProfileAssignmentsManager.AddReturnRoller(DecorAssignmentID, NewDiameter, NewWidth, NewCount);
                    ProfileAssignmentsManager.SaveTransferredRollers();
                    int ReturnedRollerID = ProfileAssignmentsManager.GetTransferredRollers(DecorAssignmentID);

                    //ProfileAssignmentsManager.AssignmentsStoreManager.AddToManufactureStore(DecorAssignmentID, StoreItemID, Length, NewWidth, Height, Thickness,
                    //    NewDiameter, Admission, Capacity, Weight, ColorID, PatinaID, -1, NewCount, FactoryID, Notes, ReturnedRollerID);
                    ProfileAssignmentsManager.GetRollersInColorOnStorage(CoverID);
                    InfiniumTips.ShowTip(this, 50, 85, "Сохранено", 1700);
                }
            }
            if (senderGrid.Columns[e.ColumnIndex].Name == "Column2" && e.RowIndex >= 0)
            {
                bool OKCancel = Infinium.LightMessageBox.Show(ref TopForm, true,
                                                              "Продолжить?",
                                                              "Удаление");

                if (!OKCancel)
                {
                    return;
                }
                ProfileAssignmentsManager.RemoveTransferredRoller();
                ProfileAssignmentsManager.SaveTransferredRollers();
                ProfileAssignmentsManager.GetTransferredRollers(DecorAssignmentID);
                ProfileAssignmentsManager.GetRollersInColorOnStorage(CoverID);
                InfiniumTips.ShowTip(this, 50, 85, "Удалено", 1700);
            }
        }
コード例 #26
0
        private void LightNewsContainer_RemoveCommentClicked(object sender, int NewsID, int NewsCommentID)
        {
            PhantomForm PhantomForm = new Infinium.PhantomForm();

            PhantomForm.Show();

            LightMessageBoxForm LightMessageBoxForm = new Infinium.LightMessageBoxForm(true, "Комментарий будет удален.\nПродолжить?",
                                                                                       "Удаление комментария");

            TopForm = LightMessageBoxForm;

            LightMessageBoxForm.ShowDialog();

            TopForm = null;

            PhantomForm.Close();
            PhantomForm.Dispose();


            if (LightMessageBoxForm.OKCancel)
            {
                Thread T = new Thread(delegate()
                {
                    SplashWindow.CreateCoverSplash(LightNewsContainer.Top, LightNewsContainer.Left,
                                                   LightNewsContainer.Height, LightNewsContainer.Width);
                });
                T.Start();

                while (!SplashWindow.bSmallCreated)
                {
                    ;
                }

                MarketingNews.RemoveComment(NewsCommentID);

                if (cbtnClients.Checked)
                {
                    if (ClientsMenu.Selected == -1)
                    {
                        MarketingNews.ReloadClientsNews(LightNewsContainer.NewsCount, NewClientsMenu.Items[NewClientsMenu.Selected].ClientID);
                    }
                    else
                    {
                        MarketingNews.ReloadClientsNews(LightNewsContainer.NewsCount, ClientsMenu.Items[ClientsMenu.Selected].ClientID);
                    }
                }
                if (cbtnManagers.Checked)
                {
                    if (ClientsManagersMenu.Selected == -1)
                    {
                        MarketingNews.ReloadManagersNews(LightNewsContainer.NewsCount, NewClientsManagersMenu.Items[NewClientsManagersMenu.Selected].ClientID);
                    }
                    else
                    {
                        MarketingNews.ReloadManagersNews(LightNewsContainer.NewsCount, ClientsManagersMenu.Items[ClientsManagersMenu.Selected].ClientID);
                    }
                }
                MarketingNews.ReloadComments();
                LightNewsContainer.NewsDataTable = MarketingNews.NewsDataTable.Copy();
                LightNewsContainer.CommentsDT    = MarketingNews.CommentsDataTable.Copy();
                LightNewsContainer.CreateNews();
                LightNewsContainer.ReloadNewsItem(NewsID, true);

                bC = true;
            }
        }
コード例 #27
0
        private void SendMailButton_Click(object sender, EventArgs e)
        {
            int i = -1;

            if (InfiniumFileList.Selected == -1)
            {
                InfiniumTips.ShowTip(this, 50, 85, "Не выбран клиент", 3000);
                return;
            }


            PhantomForm PhantomForm = new Infinium.PhantomForm();

            PhantomForm.Show();

            LightMessageBoxForm LightMessageBoxForm = new Infinium.LightMessageBoxForm(true, "Прикрепить к уведомлению файлы?",
                                                                                       "Уведомление клиенту");

            TopForm = LightMessageBoxForm;

            LightMessageBoxForm.ShowDialog();

            TopForm = null;

            PhantomForm.Close();
            PhantomForm.Dispose();

            if (LightMessageBoxForm.OKCancel)
            {
                openFileDialog1.ShowDialog();
            }

            if (InfiniumFileList.Entered == 4)
            {
                i = InfiniumFiles.GetCurrentClientFolder(InfiniumFileList.FileItems[InfiniumFileList.Selected].FolderID);
            }
            else
            {
                i = InfiniumFiles.GetCurrentClientFolder(InfiniumFileList.Entered);
            }

            if (i == -1)
            {
                InfiniumTips.ShowTip(this, 50, 85, "Невозможно определить клиента", 4000);
                return;
            }

            string r = InfiniumFiles.SendEmailNotifyClient(i, openFileDialog1.FileNames);

            if (r == "-1")
            {
                LightMessageBox.Show(ref TopForm, false, "У клиента не указан Email", "Уведомление");
                //InfiniumTips.ShowTip(this, 50, 85, "У клиента не указан Email", 3000);
                return;
            }
            else
            if (r == "1")
            {
                LightMessageBox.Show(ref TopForm, false, "Уведомление успешно отправлено", "Уведомление");
                //InfiniumTips.ShowTip(this, 50, 85, "Уведомление успешно отправлено", 3000);
                return;
            }
            else
            {
                LightMessageBox.Show(ref TopForm, false, r, "Уведомление");
                //InfiniumTips.ShowTip(this, 50, 85, "Не подключения к интернет", 3000);
                return;
            }
        }
コード例 #28
0
        private void kryptonContextMenuItem1_Click(object sender, EventArgs e)
        {
            bool PressOK        = false;
            int  LabelsCount    = 0;
            int  PositionsCount = 0;

            PhantomForm PhantomForm = new Infinium.PhantomForm();

            PhantomForm.Show();
            CabFurLabelInfoMenu CabFurLabelInfoMenu = new CabFurLabelInfoMenu(this, false, false, false);

            TopForm = CabFurLabelInfoMenu;
            CabFurLabelInfoMenu.ShowDialog();
            PressOK        = CabFurLabelInfoMenu.PressOK;
            LabelsCount    = CabFurLabelInfoMenu.LabelsCount;
            DocDateTime    = CabFurLabelInfoMenu.DocDateTime;
            PositionsCount = CabFurLabelInfoMenu.PositionsCount;
            PhantomForm.Close();
            PhantomForm.Dispose();
            CabFurLabelInfoMenu.Dispose();
            TopForm = null;

            if (!PressOK)
            {
                return;
            }

            string Product      = TechStoreSubGroupName;
            int    LabelsLength = Convert.ToInt32(NewItemsDataGrid.SelectedRows[0].Cells["Length"].Value);
            int    LabelsHeight = Convert.ToInt32(NewItemsDataGrid.SelectedRows[0].Cells["Height"].Value);
            int    LabelsWidth  = Convert.ToInt32(NewItemsDataGrid.SelectedRows[0].Cells["Width"].Value);
            string Color        = NewItemsDataGrid.SelectedRows[0].Cells["CoverColumn"].FormattedValue.ToString();

            int DecorConfigID = 0;

            CabFurDT.Clear();
            DataRow NewRow = CabFurDT.NewRow();

            NewRow["TechStoreName"]         = TechStoreName;
            NewRow["TechStoreSubGroupName"] = TechStoreSubGroupName;
            NewRow["SubGroupNotes"]         = SubGroupNotes;
            NewRow["SubGroupNotes1"]        = SubGroupNotes1;
            NewRow["SubGroupNotes2"]        = SubGroupNotes2;
            NewRow["Product"]        = Product;
            NewRow["Color"]          = Color;
            NewRow["Length"]         = LabelsLength;
            NewRow["Height"]         = LabelsHeight;
            NewRow["Width"]          = LabelsWidth;
            NewRow["LabelsCount"]    = LabelsCount;
            NewRow["PositionsCount"] = PositionsCount;
            NewRow["DecorConfigID"]  = DecorConfigID;

            CabFurDT.Rows.Add(NewRow);

            CabFurLabelLabelManager.ClearLabelInfo();

            //Проверка
            if (CabFurDT.Rows.Count == 0)
            {
                Infinium.LightMessageBox.Show(ref TopForm, false,
                                              "Очередь для печати пуста",
                                              "Ошибка печати");
                return;
            }

            for (int i = 0; i < CabFurDT.Rows.Count; i++)
            {
                LabelsCount   = Convert.ToInt32(CabFurDT.Rows[i]["LabelsCount"]);
                DecorConfigID = Convert.ToInt32(CabFurDT.Rows[i]["DecorConfigID"]);
                int SampleLabelID = 0;
                for (int j = 0; j < LabelsCount; j++)
                {
                    CabFurInfo LabelInfo = new CabFurInfo();

                    DataTable DT = CabFurDT.Clone();

                    DataRow destRow = DT.NewRow();
                    foreach (DataColumn column in CabFurDT.Columns)
                    {
                        if (column.ColumnName == "FactoryType")
                        {
                            continue;
                        }
                        destRow[column.ColumnName] = CabFurDT.Rows[i][column.ColumnName];
                    }
                    LabelInfo.TechStoreName         = CabFurDT.Rows[i]["TechStoreName"].ToString();
                    LabelInfo.TechStoreSubGroupName = CabFurDT.Rows[i]["TechStoreSubGroupName"].ToString();
                    LabelInfo.SubGroupNotes         = CabFurDT.Rows[i]["SubGroupNotes"].ToString();
                    LabelInfo.SubGroupNotes1        = CabFurDT.Rows[i]["SubGroupNotes1"].ToString();
                    LabelInfo.SubGroupNotes2        = CabFurDT.Rows[i]["SubGroupNotes2"].ToString();
                    SampleLabelID           = CabFurLabelLabelManager.SaveSampleLabel(DecorConfigID, DateTime.Now, Security.CurrentUserID, 2);
                    LabelInfo.BarcodeNumber = CabFurLabelLabelManager.GetBarcodeNumber(19, SampleLabelID);
                    LabelInfo.FactoryType   = 2;
                    LabelInfo.ProductType   = 2;
                    LabelInfo.DocDateTime   = DocDateTime;
                    DT.Rows.Add(destRow);
                    LabelInfo.OrderData = DT;

                    CabFurLabelLabelManager.AddLabelInfo(ref LabelInfo);
                }
            }
            PrintDialog.Document = CabFurLabelLabelManager.PD;

            if (PrintDialog.ShowDialog() == DialogResult.OK)
            {
                CabFurLabelLabelManager.Print();
            }
        }
コード例 #29
0
        private void kryptonContextMenuItem4_Click(object sender, EventArgs e)
        {
            int Length = 0;
            int Height = 0;
            int Width  = 0;

            if (NewItemsDataGrid.SelectedRows[0].Cells["Length"].Value != DBNull.Value)
            {
                Length = Convert.ToInt32(NewItemsDataGrid.SelectedRows[0].Cells["Length"].Value);
            }
            if (NewItemsDataGrid.SelectedRows[0].Cells["Height"].Value != DBNull.Value)
            {
                Height = Convert.ToInt32(NewItemsDataGrid.SelectedRows[0].Cells["Height"].Value);
            }
            if (NewItemsDataGrid.SelectedRows[0].Cells["Width"].Value != DBNull.Value)
            {
                Width = Convert.ToInt32(NewItemsDataGrid.SelectedRows[0].Cells["Width"].Value);
            }

            bool bNeedLength    = false;
            bool bNeedHeight    = false;
            bool bNeedWidth     = false;
            bool PressOK        = false;
            int  LabelsCount    = 0;
            int  PositionsCount = 0;
            int  LabelsLength   = 0;
            int  LabelsHeight   = 0;
            int  LabelsWidth    = 0;

            if (Length == 0)
            {
                bNeedLength = true;
            }
            if (Height == 0)
            {
                bNeedHeight = true;
            }
            if (Width == 0)
            {
                bNeedWidth = true;
            }
            PhantomForm PhantomForm = new Infinium.PhantomForm();

            PhantomForm.Show();
            SampleDecorLabelInfoMenu SampleLabelInfoMenu = new SampleDecorLabelInfoMenu(this, bNeedLength, bNeedHeight, bNeedWidth);

            TopForm = SampleLabelInfoMenu;
            SampleLabelInfoMenu.ShowDialog();
            PressOK        = SampleLabelInfoMenu.PressOK;
            LabelsCount    = SampleLabelInfoMenu.LabelsCount;
            LabelsLength   = SampleLabelInfoMenu.LabelsLength;
            LabelsHeight   = SampleLabelInfoMenu.LabelsHeight;
            LabelsWidth    = SampleLabelInfoMenu.LabelsWidth;
            PositionsCount = SampleLabelInfoMenu.PositionsCount;
            PhantomForm.Close();
            PhantomForm.Dispose();
            SampleLabelInfoMenu.Dispose();
            TopForm = null;

            if (!PressOK)
            {
                return;
            }

            if (Length > 0)
            {
                LabelsLength = Length;
            }
            if (Height > 0)
            {
                LabelsHeight = Height;
            }
            if (Width > 0)
            {
                LabelsWidth = Width;
            }
            string Product = TechStoreSubGroupName;
            string Decor   = NewItemsDataGrid.SelectedRows[0].Cells["TechStoreName"].Value.ToString();
            string Color   = NewItemsDataGrid.SelectedRows[0].Cells["CoverColumn"].FormattedValue.ToString();
            string Patina  = NewItemsDataGrid.SelectedRows[0].Cells["PatinaColumn"].FormattedValue.ToString();

            if (Patina != "на выбор")
            {
                Color = Color + "+патина " + Patina;
            }
            //int Height = 0;
            //int Width = 0;
            int DecorConfigID = 0;

            DataRow NewRow = DecorDT.NewRow();

            NewRow["Decor"]          = Decor;
            NewRow["Color"]          = Color;
            NewRow["Product"]        = Product;
            NewRow["Length"]         = LabelsLength.ToString();
            NewRow["Height"]         = LabelsHeight.ToString();
            NewRow["Width"]          = LabelsWidth.ToString();
            NewRow["LabelsCount"]    = LabelsCount;
            NewRow["PositionsCount"] = PositionsCount;
            NewRow["DecorConfigID"]  = DecorConfigID;

            //if (kryptonCheckSet2.CheckedIndex == 0)
            //    NewRow["FactoryType"] = 2;
            //if (kryptonCheckSet2.CheckedIndex == 1)
            //    NewRow["FactoryType"] = 1;
            DecorDT.Rows.Add(NewRow);
        }
コード例 #30
0
        private void InvStoreDataGrid_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (StoreDG.Columns[e.ColumnIndex].Name == "EditEnd")
            {
                return;
            }

            string InvNotes = string.Empty;
            int    StoreID  = 0;

            if (StoreDG.SelectedRows.Count != 0 && StoreDG.SelectedRows[0].Cells["InvNotes"].Value != DBNull.Value)
            {
                InvNotes = StoreDG.SelectedRows[0].Cells["InvNotes"].Value.ToString();
            }
            if (StoreDG.SelectedRows.Count != 0 && StoreDG.SelectedRows[0].Cells["ReadyStoreID"].Value != DBNull.Value)
            {
                StoreID = Convert.ToInt32(StoreDG.SelectedRows[0].Cells["ReadyStoreID"].Value);
            }

            decimal CurrentCount = InventoryManager.PlaningEndCount(StoreID);

            //if (CurrentCount < 1)
            //    return;

            PhantomForm PhantomForm = new Infinium.PhantomForm();

            PhantomForm.Show();

            AddInventoryRestForm = new AddInventoryRestForm(CurrentCount, InvNotes);

            TopForm = AddInventoryRestForm;
            AddInventoryRestForm.ShowDialog();
            TopForm = null;

            PhantomForm.Close();

            PhantomForm.Dispose();

            if (AddInventoryRestForm.IsOKPress)
            {
                int     InventoryID = InventoryManager.CurrentInventoryID;
                int     UserID      = Security.CurrentUserID;
                decimal FactCount   = AddInventoryRestForm.FactCount;
                string  Notes       = AddInventoryRestForm.Notes;

                AddInventoryRestForm.Dispose();
                AddInventoryRestForm = null;
                GC.Collect();

                InventoryManager.AddInventoryDetail(Security.GetCurrentDate(), InventoryID, StoreID, CurrentCount, FactCount, UserID, Notes);
                InventoryManager.ChangeCurrentFields(FactCount, Notes);
                InventoryManager.InventaryEndEdit(true);
                CheckStoreColumns(ref StoreDG);
            }
            else
            {
                AddInventoryRestForm.Dispose();
                AddInventoryRestForm = null;
                GC.Collect();
            }
        }