private void AddSellerButton_Click(object sender, EventArgs e) { if (ToolsSellersManager == null || ToolsSellersManager.ToolsSubGroupsCount == 0) { return; } Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); }); T.Start(); while (!SplashForm.bCreated) { ; } NewToolsSellerForm NewToolsSellerForm = new NewToolsSellerForm(ref ToolsSellersManager, -1); TopForm = NewToolsSellerForm; NewToolsSellerForm.ShowDialog(); NewToolsSellerForm.Close(); NewToolsSellerForm.Dispose(); TopForm = null; }
private void cmiBindToPermit_Click(object sender, EventArgs e) { if (UnloadDataGrid.SelectedRows.Count == 0) { return; } Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); }); T.Start(); while (!SplashForm.bCreated) { ; } bool BindingOk = false; int UnloadID = Convert.ToInt32(UnloadDataGrid.SelectedRows[0].Cells["UnloadID"].Value); PermitsForm PermitsForm = new PermitsForm(this, UnloadID); TopForm = PermitsForm; PermitsForm.ShowDialog(); BindingOk = PermitsForm.BindingOk; PermitsForm.Close(); PermitsForm.Dispose(); TopForm = null; if (BindingOk) { InfiniumTips.ShowTip(this, 50, 85, "Привязка выполнена", 1700); } }
private void AddItemButton_Click(object sender, EventArgs e) { if (SubGroupsDataGrid.SelectedRows.Count == 0 || SubGroupsDataGrid.SelectedRows[0].Cells["TechStoreSubGroupID"].Value == DBNull.Value) { return; } Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); }); T.Start(); while (!SplashForm.bCreated) { ; } AddNewTechStoreItemForm AddNewStoreItemForm = new AddNewTechStoreItemForm(ref StorageItemsManager); TopForm = AddNewStoreItemForm; AddNewStoreItemForm.ShowDialog(); AddNewStoreItemForm.Close(); AddNewStoreItemForm.Dispose(); TopForm = null; TechStoreManager.RefreshTechStore(); StorageItemsManager.RefreshStoreItems(); SubGroupsDataGrid_SelectionChanged(null, null); //StorageItemsManager.MoveToStore(TechStoreID); }
private void InfiniumMinimizeList_ItemClicked(object sender, string FormName) { if (FormName == "MessagesForm") { MessagesButton_Click(null, null); InfiniumMinimizeList.RemoveModule(FormName); } else { Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); }); T.Start(); while (!SplashForm.bCreated) { ; } Form ModuleForm = InfiniumMinimizeList.GetForm(FormName); TopForm = ModuleForm; ModuleForm.ShowDialog(); } if (InfiniumNotifyList.Items != null) { if (InfiniumNotifyList.Items.Count() > 0) { ActiveNotifySystem.FillUpdates(); InfiniumNotifyList.ItemsDataTable = ActiveNotifySystem.ModulesUpdatesDataTable; InfiniumNotifyList.InitializeItems(); } } }
private void EditSellerButton_Click(object sender, EventArgs e) { if (ToolsSellersDataGrid.SelectedRows.Count > 0 && ToolsSellersGroupsDataGrid.SelectedRows.Count > 0) { Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); }); T.Start(); while (!SplashForm.bCreated) { ; } NewToolsSellerForm NewToolsSellerForm = new NewToolsSellerForm(ref ToolsSellersManager, 0); TopForm = NewToolsSellerForm; NewToolsSellerForm.ShowDialog(); NewToolsSellerForm.Close(); NewToolsSellerForm.Dispose(); TopForm = null; } }
private void dgvUnloads_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (!CallFromLightStartForm) { return; } if (!CallFromLightStartForm || dgvUnloads.SelectedRows.Count == 0) { return; } Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); }); T.Start(); while (!SplashForm.bCreated) { ; } WealthForm WealthForm = new WealthForm(this); TopForm = WealthForm; WealthForm.ShowDialog(); WealthForm.Close(); WealthForm.Dispose(); TopForm = null; }
private void AddButton_Click(object sender, EventArgs e) { Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); }); T.Start(); while (!SplashForm.bCreated) { ; } ConnectUnloads.StoreDataTable.Clear(); AddWealthForm = new AddWealthForm(ref TopForm, ref ConnectUnloads, ref TableMeasures, ref TableCurrency, ref TableUsers); TopForm = AddWealthForm; AddWealthForm.ShowDialog(); AddWealthForm.Close(); AddWealthForm.Dispose(); TopForm = null; ViewConnectUnloads.CreateAndFill(); }
private void InfiniumNotifyList_ItemClicked(object sender, string FormName) { if (FormName == "MessagesForm") { MessagesButton_Click(null, null); if (NotifyForm != null) { NotifyForm.Close(); NotifyForm.Dispose(); NotifyForm = null; } ActiveNotifySystem.FillUpdates(); InfiniumNotifyList.ItemsDataTable = ActiveNotifySystem.ModulesUpdatesDataTable; InfiniumNotifyList.InitializeItems(); return; } Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); }); T.Start(); while (!SplashForm.bCreated) { ; } if (NotifyForm != null) { NotifyForm.Close(); NotifyForm.Dispose(); NotifyForm = null; } Form ModuleForm = null; //check if running Form Form = InfiniumMinimizeList.GetForm(FormName); if (Form != null) { TopForm = Form; Form.ShowDialog(); } else { Type CAType = Type.GetType("Infinium." + FormName); ModuleForm = (Form)Activator.CreateInstance(CAType, this); TopForm = ModuleForm; ModuleForm.ShowDialog(); } ActiveNotifySystem.FillUpdates(); InfiniumNotifyList.ItemsDataTable = ActiveNotifySystem.ModulesUpdatesDataTable; InfiniumNotifyList.InitializeItems(); }
public void StartModuleFromNotify(int ModuleID) { if (TopForm != null) { if (TopForm.Name == InfiniumStart.FullModulesDataTable.Select("ModuleID = " + ModuleID)[0]["FormName"].ToString()) { return; } } if (ModuleID != 80) { Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); }); T.Start(); while (!SplashForm.bCreated) { ; } } if (TopForm != null) { if (TopForm.Name != InfiniumStart.FullModulesDataTable.Select("ModuleID = " + ModuleID)[0]["FormName"].ToString()) { HideForm(TopForm); } } Form ModuleForm = null; if (ModuleID == 80)//messages { MessagesButton_Click(null, null); } else { //check if running Form Form = InfiniumMinimizeList.GetForm(InfiniumStart.FullModulesDataTable.Select("ModuleID = " + ModuleID)[0]["FormName"].ToString()); if (Form != null) { TopForm = Form; Form.Show(); } else { Type CAType = Type.GetType("Infinium." + InfiniumStart.FullModulesDataTable.Select("ModuleID = " + ModuleID)[0]["FormName"].ToString()); ModuleForm = (Form)Activator.CreateInstance(CAType, this); TopForm = ModuleForm; ModuleForm.ShowDialog(); } } ActiveNotifySystem.FillUpdates(); InfiniumNotifyList.ItemsDataTable = ActiveNotifySystem.ModulesUpdatesDataTable; InfiniumNotifyList.InitializeItems(); }
private void lightBackButton1_Click(object sender, EventArgs e) { Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); }); T.Start(); while (!SplashForm.bCreated) { ; } TopForm = null; }
private void LogInButton_Click(object sender, EventArgs e) { if (Security.Enter(Convert.ToInt32(LoginComboBox.SelectedValue), PasswordComboBox.Text) == 0) { PasswordComboBox.ResetText(); return; } if (Security.Enter(Convert.ToInt32(LoginComboBox.SelectedValue), PasswordComboBox.Text) == -1) { DialogResult result = MessageBox.Show("Хотите закрыть уже запущенную версию Инфиниума?", "Закрытие", MessageBoxButtons.YesNoCancel); if (result == DialogResult.Yes) { Security.SetForciblyOffline(Convert.ToInt32(LoginComboBox.SelectedValue), true); MessageBox.Show("Подождите 5 секунд и нажмите Войти заново", "Вход"); //LogInButton.Enabled = false; return; } else { NoAccessPanel.Visible = true; PasswordComboBox.ResetText(); return; } } Security.SetCurrentUserLogin(Convert.ToInt32(LoginComboBox.SelectedValue)); Security.CreateJournalRecord(); Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); }); T.Start(); while (!SplashForm.bCreated) { ; } LightStartForm LightStartForm = new LightStartForm(this); LightStartForm.Show(); }
private void btnAddResponsibility_Click(object sender, EventArgs e) { Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); }); T.Start(); int FactoryID = 0; int DepartmentID = 0; int UserID = 0; int PositionID = 0; if (cmbFactory.SelectedItem != null) { FactoryID = Convert.ToInt32(cmbFactory.SelectedValue); } if (cmbDepartments.SelectedItem != null) { DepartmentID = Convert.ToInt32(cmbDepartments.SelectedValue); } if (cmbUsers.SelectedItem != null) { UserID = Convert.ToInt32(cmbUsers.SelectedValue); } if (cmbPositions.SelectedItem != null) { PositionID = Convert.ToInt32(cmbPositions.SelectedValue); } int StaffListID = UsersResponsibilities.GetStaffListID(FactoryID, DepartmentID, UserID, PositionID); FunctionsManagementForm FunctionsManagementForm = new FunctionsManagementForm(ref AdminFunctionsEdit, StaffListID, UserID); TopForm = FunctionsManagementForm; FunctionsManagementForm.ShowDialog(); FunctionsManagementForm.Close(); FunctionsManagementForm.Dispose(); UsersResponsibilities.UpdateUsersResponsibilities(); while (SplashWindow.bSmallCreated) { SmallWaitForm.CloseS = true; } }
private void UsersList_UserClick(object sender, string Name) { Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); }); T.Start(); while (!SplashForm.bCreated) { ; } UserInfoForm UserInfoForm = new UserInfoForm(Name); TopForm = UserInfoForm; UserInfoForm.ShowDialog(); TopForm = null; UserInfoForm.Dispose(); UserInfoForm = null; }
private void dgvMDispatch_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (!CallFromLightStartForm) { return; } if (!CallFromLightStartForm || dgvMDispatch.SelectedRows.Count == 0) { return; } Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); }); T.Start(); while (!SplashForm.bCreated) { ; } int MarketingDispatchID = 0; object PrepareDispatchDateTime = dgvMDispatch.SelectedRows[0].Cells["PrepareDispatchDateTime"].Value; if (dgvMDispatch.SelectedRows[0].Cells["DispatchID"].Value != DBNull.Value) { MarketingDispatchID = Convert.ToInt32(dgvMDispatch.SelectedRows[0].Cells["DispatchID"].Value); } if (PrepareDispatchDateTime == DBNull.Value) { return; } MarketingExpeditionForm MarketingExpeditionForm = new MarketingExpeditionForm(this, Convert.ToDateTime(dgvMDispatch.SelectedRows[0].Cells["PrepareDispatchDateTime"].Value), MarketingDispatchID); TopForm = MarketingExpeditionForm; MarketingExpeditionForm.ShowDialog(); MarketingExpeditionForm.Close(); MarketingExpeditionForm.Dispose(); TopForm = null; }
private void lightBackButton2_Click(object sender, EventArgs e) { Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); }); T.Start(); while (!SplashForm.bCreated) { ; } GridsBackColorForm GridsBackColorForm = new GridsBackColorForm(); TopForm = GridsBackColorForm; GridsBackColorForm.ShowDialog(); GridsBackColorForm.Dispose(); TopForm = null; }
private void PhotoBox_Click(object sender, EventArgs e) { Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); }); T.Start(); while (!SplashForm.bCreated) { ; } Form ModuleForm = null; //check if running Form Form = InfiniumMinimizeList.GetForm("PersonalSettingsForm"); if (Form != null) { TopForm = Form; Form.ShowDialog(); } else { Type CAType = Type.GetType("Infinium." + "PersonalSettingsForm"); ModuleForm = (Form)Activator.CreateInstance(CAType, this); TopForm = ModuleForm; Security.EnterInModule("PersonalSettingsForm"); ModuleForm.ShowDialog(); } if (InfiniumNotifyList.Items != null) { if (InfiniumNotifyList.Items.Count() > 0) { ActiveNotifySystem.FillUpdates(); InfiniumNotifyList.ItemsDataTable = ActiveNotifySystem.ModulesUpdatesDataTable; InfiniumNotifyList.InitializeItems(); } } }
private void NextButton_Click(object sender, EventArgs e) { NoDispatchLabel.Text = ClientStatisticsZOV.CheckClientAndPeriod( Convert.ToInt32(((DataRowView)ClientStatisticsZOV.ClientsBindingSource.Current)["ClientID"]), CalendarFrom.SelectionEnd, CalendarTo.SelectionEnd); if (NoDispatchLabel.Text.Length > 0) { NoDispatchLabel.Visible = true; LabelTimer.Enabled = true; return; } Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); }); T.Start(); while (!SplashForm.bCreated) { ; } if (ClientStatisticsZOVDetailForm == null) { ClientStatisticsZOVDetailForm = new ClientStatisticsZOVDetailForm(this, ref ClientStatisticsZOV, CalendarFrom.SelectionEnd, CalendarTo.SelectionEnd); } TopForm = ClientStatisticsZOVDetailForm; ClientStatisticsZOVDetailForm.ShowDialog(); TopForm = null; if (ClientStatisticsZOVDetailForm.AccessibleName == "true") { ClientStatisticsZOVDetailForm.Dispose(); ClientStatisticsZOVDetailForm = null; GC.Collect(); } }
private void SplitMainOrderMenuItem_Click(object sender, EventArgs e) { int MegaOrderID = Convert.ToInt32(((DataRowView)PackagesOrdersManager.MegaOrdersBindingSource.Current).Row["MegaOrderID"]); int MainOrderID = Convert.ToInt32(((DataRowView)PackagesOrdersManager.MainOrdersBindingSource.Current).Row["MainOrderID"]); Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); }); T.Start(); while (!SplashForm.bCreated) { ; } MarketingSplitOrdersForm = new MarketingSplitOrdersForm(this, MegaOrderID, MainOrderID, FactoryID); TopForm = MarketingSplitOrdersForm; MarketingSplitOrdersForm.ShowDialog(); TopForm = null; MarketingSplitOrdersForm.Dispose(); MarketingSplitOrdersForm = null; GC.Collect(); }
private void btnMoveToExpedition_Click(object sender, EventArgs e) { string DocNumber = WriteOffDetailGrid.SelectedRows[0].Cells["DocNumber"].Value.ToString(); Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); }); T.Start(); while (!SplashForm.bCreated) { ; } ZOVExpeditionForm ZOVExpeditionForm = new ZOVExpeditionForm(this, DocNumber); TopForm = ZOVExpeditionForm; ZOVExpeditionForm.ShowDialog(); ZOVExpeditionForm.Close(); ZOVExpeditionForm.Dispose(); TopForm = null; }
private void PhotoEditButton_Click(object sender, EventArgs e) { Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); }); T.Start(); while (!SplashForm.bCreated) { ; } DepartmentPhotoEditForm DepartmentPhotoEditForm = new DepartmentPhotoEditForm(ref AdminDepartmentsEdit, Convert.ToInt32(DepartmentsDataGrid.SelectedRows[0].Cells["DepartmentID"].Value)); TopForm = DepartmentPhotoEditForm; DepartmentPhotoEditForm.ShowDialog(); DepartmentPhotoEditForm.Dispose(); TopForm = null; DepartmentsDataGrid_SelectionChanged(null, null); }
private void AddButton_Click(object sender, EventArgs e) { Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); }); T.Start(); while (!SplashForm.bCreated) { ; } MenuClientsMessagesForm = new MenuClientsMessagesForm(ref TopForm); TopForm = MenuClientsMessagesForm; MenuClientsMessagesForm.ShowDialog(); MenuClientsMessagesForm.Close(); MenuClientsMessagesForm.Dispose(); TopForm = null; ConnectClientMessage.UpdateList(); }
private void NextButton_Click(object sender, EventArgs e) { Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); }); T.Start(); while (!SplashForm.bCreated) { ; } if (PaymentWeeksZOVForm == null) { PaymentWeeksZOVForm = new PaymentWeeksZOVForm(this, SelectPaymentWeek.GetCurrentPaymentWeekID(), SelectPaymentWeek.GetCurrentPeriod()); } TopForm = PaymentWeeksZOVForm; PaymentWeeksZOVForm.ShowDialog(); TopForm = null; PaymentWeeksZOVForm.Dispose(); PaymentWeeksZOVForm = null; GC.Collect(); }
private void AddExcessButton_Click(object sender, EventArgs e) { Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); }); T.Start(); while (!SplashForm.bCreated) { ; } NewArrivalForm NewArrivalForm = new NewArrivalForm(); TopForm = NewArrivalForm; NewArrivalForm.ShowDialog(); NewArrivalForm.Close(); NewArrivalForm.Dispose(); TopForm = null; InventoryManager.UpdateTables(); }
private void MainOrdersEditOrder_Click(object sender, EventArgs e) { //OrdersManager.NeedSetStatus = true; if (OrdersManager.MainOrdersBindingSource.Count > 0) { NeedSplash = false; Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); }); T.Start(); while (!SplashForm.bCreated) { ; } if (OrdersManager.MegaOrdersBindingSource.Count > 0) { OrdersManager.CurrentClientID = Convert.ToInt32(((DataRowView)OrdersManager.MegaOrdersBindingSource.Current).Row["ClientID"]); OrdersManager.CurrentDiscountPaymentConditionID = Convert.ToInt32(((DataRowView)OrdersManager.MegaOrdersBindingSource.Current).Row["DiscountPaymentConditionID"]); OrdersManager.CurrentDiscountFactoringID = Convert.ToInt32(((DataRowView)OrdersManager.MegaOrdersBindingSource.Current).Row["DiscountFactoringID"]); OrdersManager.CurrentProfilDiscountDirector = Convert.ToInt32(((DataRowView)OrdersManager.MegaOrdersBindingSource.Current).Row["ProfilDiscountDirector"]); OrdersManager.CurrentTPSDiscountDirector = Convert.ToInt32(((DataRowView)OrdersManager.MegaOrdersBindingSource.Current).Row["TPSDiscountDirector"]); OrdersManager.CurrentProfilTotalDiscount = Convert.ToInt32(((DataRowView)OrdersManager.MegaOrdersBindingSource.Current).Row["ProfilTotalDiscount"]) - Convert.ToInt32(((DataRowView)OrdersManager.MegaOrdersBindingSource.Current).Row["ProfilDiscountDirector"]); OrdersManager.CurrentTPSTotalDiscount = Convert.ToInt32(((DataRowView)OrdersManager.MegaOrdersBindingSource.Current).Row["TPSTotalDiscount"]) - Convert.ToInt32(((DataRowView)OrdersManager.MegaOrdersBindingSource.Current).Row["TPSDiscountDirector"]); OrdersManager.CurrencyTypeID = Convert.ToInt32(((DataRowView)OrdersManager.MegaOrdersBindingSource.Current).Row["CurrencyTypeID"]); OrdersManager.PaymentCurrency = Convert.ToDecimal(((DataRowView)OrdersManager.MegaOrdersBindingSource.Current).Row["PaymentRate"]); OrdersManager.ConfirmDateTime = ((DataRowView)OrdersManager.MegaOrdersBindingSource.Current).Row["ConfirmDateTime"]; } if (OrdersManager.MainOrdersBindingSource.Count > 0) { OrdersManager.CurrentMainOrderID = Convert.ToInt32(((DataRowView)OrdersManager.MainOrdersBindingSource.Current).Row["MainOrderID"]); } bool bDeleteEnable = false; if (RoleType == RoleTypes.Admin) { bDeleteEnable = true; } AddMainOrdersForm = new AddMarketingOrdersForm(ref OrdersManager, ref TopForm, ref OrdersCalculate, bDeleteEnable); TopForm = AddMainOrdersForm; AddMainOrdersForm.ShowDialog(); AddMainOrdersForm.Close(); AddMainOrdersForm.Dispose(); TopForm = null; bool OnProduction = OnProductionCheckBox.Checked; bool NotInProduction = NotProductionCheckBox.Checked; bool InProduction = InProductionCheckBox.Checked; bool OnStorage = OnStorageCheckBox.Checked; bool OnExpedition = cbOnExpedition.Checked; bool Dispatch = DispatchCheckBox.Checked; //decimal CurrencyTotalCost = DBFReport.CalcCurrencyCost( // Convert.ToInt32(((DataRowView)OrdersManager.MegaOrdersBindingSource.Current).Row["MegaOrderID"]), // Convert.ToInt32(((DataRowView)OrdersManager.MegaOrdersBindingSource.Current).Row["ClientID"]), OrdersManager.PaymentCurrency); //OrdersManager.SetCurrencyCost(Convert.ToInt32(((DataRowView)OrdersManager.MegaOrdersBindingSource.Current).Row["MegaOrderID"]), CurrencyTotalCost); NeedSplash = false; Filter(); OrdersManager.UpdateMainOrders( OnProduction, NotInProduction, InProduction, OnStorage, OnExpedition, Dispatch); NeedSplash = true; } OrdersManager.CurrentClientID = -1; OrdersManager.CurrentDiscountPaymentConditionID = 0; OrdersManager.CurrentDiscountFactoringID = 0; OrdersManager.CurrentProfilDiscountDirector = 0; OrdersManager.CurrentTPSDiscountDirector = 0; OrdersManager.CurrentProfilTotalDiscount = 0; OrdersManager.CurrentTPSTotalDiscount = 0; OrdersManager.PaymentCurrency = 1; OrdersManager.CurrencyTypeID = 1; OrdersManager.ConfirmDateTime = DBNull.Value; }
private void ItemsDataGrid_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (!StorageItemsManager.EditItem() || CreateStoreDetail || ItemsDataGrid.Columns[e.ColumnIndex].Name == "CheckBoxColumn") { return; } int TechStoreID = 0; if (ItemsDataGrid.SelectedRows.Count > 0 && ItemsDataGrid.SelectedRows[0].Cells["TechStoreID"].Value != DBNull.Value) { TechStoreID = Convert.ToInt32(ItemsDataGrid.SelectedRows[0].Cells["TechStoreID"].Value); } if (TechStoreID == 0) { return; } string TechStoreName = string.Empty; string TechStoreSubGroupName = string.Empty; string SubGroupNotes = string.Empty; string SubGroupNotes1 = string.Empty; string SubGroupNotes2 = string.Empty; if (ItemsDataGrid.SelectedRows.Count > 0 && ItemsDataGrid.SelectedRows[0].Cells["TechStoreName"].Value != DBNull.Value) { TechStoreName = ItemsDataGrid.SelectedRows[0].Cells["TechStoreName"].Value.ToString(); } if (SubGroupsDataGrid.SelectedRows.Count > 0 && SubGroupsDataGrid.SelectedRows[0].Cells["Notes"].Value != DBNull.Value) { SubGroupNotes = SubGroupsDataGrid.SelectedRows[0].Cells["Notes"].Value.ToString(); } if (SubGroupsDataGrid.SelectedRows.Count > 0 && SubGroupsDataGrid.SelectedRows[0].Cells["Notes1"].Value != DBNull.Value) { SubGroupNotes1 = SubGroupsDataGrid.SelectedRows[0].Cells["Notes1"].Value.ToString(); } if (SubGroupsDataGrid.SelectedRows.Count > 0 && SubGroupsDataGrid.SelectedRows[0].Cells["TechStoreSubGroupName"].Value != DBNull.Value) { TechStoreSubGroupName = SubGroupsDataGrid.SelectedRows[0].Cells["TechStoreSubGroupName"].Value.ToString(); } if (SubGroupsDataGrid.SelectedRows.Count > 0 && SubGroupsDataGrid.SelectedRows[0].Cells["Notes2"].Value != DBNull.Value) { SubGroupNotes2 = SubGroupsDataGrid.SelectedRows[0].Cells["Notes2"].Value.ToString(); } Thread T = new Thread(delegate() { SplashWindow.CreateSplash(); }); T.Start(); while (!SplashForm.bCreated) { ; } AddNewTechStoreItemForm AddNewStoreItemForm = new AddNewTechStoreItemForm(ref StorageItemsManager, TechStoreName, TechStoreSubGroupName, SubGroupNotes, SubGroupNotes1, SubGroupNotes2, bPrintLabels); TopForm = AddNewStoreItemForm; AddNewStoreItemForm.ShowDialog(); AddNewStoreItemForm.Close(); AddNewStoreItemForm.Dispose(); TopForm = null; SubGroupsDataGrid_SelectionChanged(null, null); StorageItemsManager.MoveToStore(TechStoreID); }