private void treeListPollGroup_FocusedNodeChanged(object sender, FocusedNodeChangedEventArgs e) { DataRow selectedNode = AtTreeList.GetSelectedNode(this.treeListPollGroup); if (selectedNode == null) { return; } if (this.MoveItems != null) { foreach (DataRow dataRow in this.MoveItems) { dataRow["idpollgroup"] = selectedNode["idpollgroup"]; } this.Cursor = Cursors.Default; this.MoveItems = (DataRow[])null; this.isKeyMove = false; } if (this.MoveGroup != null) { this.treeListPollGroup.DataSource = (object)null; if (this.MoveGroup["parentid"] == DBNull.Value) { this.MoveGroup["imageindex"] = (object)0; } this.MoveGroup["parentid"] = selectedNode["idpollgroup"]; this.Cursor = Cursors.Default; this.MoveGroup = (DataRow)null; this.isKeyMove = false; this.treeListPollGroup.DataSource = (object)this.bs; } this.isKeyMove = false; }
private void toolStripMenuItem8_Click(object sender, EventArgs e) { DataRow selectedNode = AtTreeList.GetSelectedNode(this.treeList1); if (selectedNode == null) { return; } bool flag = false; foreach (DataRow dataRow in (InternalDataCollectionBase)this.table_goodanaloggroup.Rows) { if (dataRow.RowState != DataRowState.Deleted && dataRow["parentid"] != DBNull.Value && (int)dataRow["parentid"] == (int)selectedNode["idgoodanaloggroup"]) { flag = true; break; } } if (flag) { int num = (int)MessageBox.Show("Сначало необходимо удалить вложенные группы.", "Удаление группы", MessageBoxButtons.OK, MessageBoxIcon.Hand); } else { selectedNode.Delete(); } }
private void TemplateForm_FormClosing(object sender, FormClosingEventArgs e) { if (AtDataSet.IsModifDataSet((DataSet)this.ds)) { switch (MessageBox.Show("Данные были изменены!\nСохранить данные?", "Закрытие формы шаблонов", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question)) { case DialogResult.Cancel: e.Cancel = true; break; case DialogResult.Yes: this.SaveToBase(); break; } } DataRow dataRow = AtGrid.getDataRow((Control)this.gridControlTemplate); if (dataRow != null) { Settings.SavedValues.IdTemplateProduction = Useful.GetInt32(dataRow["idtemplate"]); } DataRow selectedNode = AtTreeList.GetSelectedNode(this.treeListTemplateGroup); if (selectedNode == null) { return; } Settings.SavedValues.IdTemplateProductionGroup = Useful.GetInt32(selectedNode["idtemplategroup"]); }
private void MenuGroupMoveToGroup_Click(object sender, EventArgs e) { if (!this.DocClass.SetMoveGroup(AtTreeList.GetSelectedNode(this.treeListTemplateGroup))) { return; } this.Cursor = Cursors.Hand; }
private void MenuGroupSetMain_Click(object sender, EventArgs e) { this.MoveGroup = AtTreeList.GetSelectedNode(this.treeListGroup); if (this.MoveGroup == null) { return; } this.MoveElements((DataRow)null); }
private void MenuGroupMove_Click(object sender, EventArgs e) { this.MoveGroup = AtTreeList.GetSelectedNode(this.treeListGroup); if (this.MoveGroup == null) { return; } this.Cursor = Cursors.Hand; }
private void toolStripMenuItemPoolGroupRemove_Click(object sender, EventArgs e) { this.MoveGroup = AtTreeList.GetSelectedNode(this.treeListPollGroup); if (this.MoveGroup == null) { return; } this.Cursor = Cursors.Hand; }
public void MoveElements() { DataRow selectedNode = AtTreeList.GetSelectedNode(this.treeListGroup); if (selectedNode == null) { return; } this.MoveElements(selectedNode); }
private void MenuGroupAddChild_Click(object sender, EventArgs e) { DataRow selectedNode = AtTreeList.GetSelectedNode(this.treeListTemplateGroup); if (selectedNode == null) { return; } this.DocClass.AddTemplateGroup(selectedNode, TemplateType.ProductionType); }
private void toolStripMenuItem7_Click(object sender, EventArgs e) { DataRow selectedNode = AtTreeList.GetSelectedNode(this.treeList1); if (selectedNode == null || InputBox.ShowDialog("Изменение имени группы", "Введите новое имя", selectedNode["name"].ToString()) == DialogResult.Cancel) { return; } selectedNode["name"] = (object)InputBox.Value; }
private void MenuGroupSetMain_Click(object sender, EventArgs e) { DataRow selectedNode = AtTreeList.GetSelectedNode(this.treeListGroup); if (selectedNode == null) { return; } selectedNode["parentid"] = (object)DBNull.Value; }
private void treeList1_FocusedNodeChanged(object sender, FocusedNodeChangedEventArgs e) { DataRow selectedNode = AtTreeList.GetSelectedNode(this.treeList1); if (selectedNode == null) { return; } this.gridView1.Columns["idgoodanaloggroup"].FilterInfo = new ColumnFilterInfo(this.gridView1.Columns["idgoodanaloggroup"], selectedNode["idgoodanaloggroup"], ""); }
private void MenuGroupRemove_Click(object sender, EventArgs e) { DataRow selectedNode = AtTreeList.GetSelectedNode(this.treeListGroup); if (selectedNode == null || MessageBox.Show("Вы действительно хотите удалить текущую группу?", "Удаление группы типов проёмов", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) { return; } selectedNode.Delete(); }
private void MenuGroupRemove_Click(object sender, EventArgs e) { DataRow selectedNode = AtTreeList.GetSelectedNode(this.treeListGroup); if (selectedNode == null) { return; } selectedNode.Delete(); }
private void toolStripMenuItemPollGroupMakeRoot_Click(object sender, EventArgs e) { DataRow selectedNode = AtTreeList.GetSelectedNode(this.treeListPollGroup); if (selectedNode == null || (int)selectedNode["imageindex"] == 5) { return; } selectedNode["parentid"] = (object)DBNull.Value; selectedNode["imageindex"] = (object)0; }
private void treeListGroup_FocusedNodeChanged(object sender, FocusedNodeChangedEventArgs e) { if (AtTreeList.GetSelectedNode(this.treeListGroup) == null) { return; } if (!this.isKeyMove) { this.MoveElements(); } this.isKeyMove = false; }
private void MenuGroupRename_Click(object sender, EventArgs e) { DataRow selectedNode = AtTreeList.GetSelectedNode(this.treeListGroup); if (selectedNode == null || InputBox.ShowDialog("Изменение группы", "Введите новое имя", "Введите новый комментарий", selectedNode["name"].ToString(), selectedNode["comment"].ToString()) == DialogResult.Cancel) { return; } this.SaveDataMember((Control)this.treeListGroup); selectedNode["name"] = (object)InputBox.Value; selectedNode["comment"] = (object)InputBox.Value2; this.RestoreDataMember((Control)this.treeListGroup); }
private void MenuItemAdd_Click(object sender, EventArgs e) { DataRow selectedNode = AtTreeList.GetSelectedNode(this.treeListGroup); if (selectedNode == null) { return; } DataRow row = this.table_SourceInfo.NewRow(); row["idSourceInfo"] = (object)dbconn.GetGenId("gen_SourceInfo"); row["idSourceInfogroup"] = selectedNode["idSourceInfogroup"]; row["name"] = (object)"Новый источник информации"; this.table_SourceInfo.Rows.Add(row); }
private void MenuItemAdd_Click(object sender, EventArgs e) { DataRow selectedNode = AtTreeList.GetSelectedNode(this.treeListGroup); if (selectedNode == null) { return; } DataRow row = this.table_peoplepost.NewRow(); row["idpeoplepost"] = (object)dbconn.GetGenId("gen_peoplepost"); row["idpeoplepostgroup"] = selectedNode["idpeoplepostgroup"]; row["name"] = (object)"Новая должность"; this.table_peoplepost.Rows.Add(row); }
private void toolStripMenuItem1_Click(object sender, EventArgs e) { DataRow selectedNode = AtTreeList.GetSelectedNode(this.treeList1); if (selectedNode == null) { return; } DataRow row = this.table_goodanalog.NewRow(); row["idgoodanalog"] = (object)dbconn.GetGenId("gen_goodanalog"); row["name"] = (object)"Новый аналог"; row["idgoodanaloggroup"] = selectedNode["idgoodanaloggroup"]; this.table_goodanalog.Rows.Add(row); }
private void toolStripMenuItem1_Click(object sender, EventArgs e) { DataRow selectedNode = AtTreeList.GetSelectedNode(this.treeList1); if (selectedNode == null) { return; } DataRow row = this.table_color.NewRow(); row["idcolor"] = (object)dbconn.GetGenId("gen_color"); row["name"] = (object)"Новый цвет"; row["windraw"] = (object)1; row["idcolorgroup"] = selectedNode["idcolorgroup"]; row["color"] = (object)-1; this.table_color.Rows.Add(row); }
private void MenuGroupRename_Click(object sender, EventArgs e) { DataRow selectedNode = AtTreeList.GetSelectedNode(this.treeListGroup); if (selectedNode == null) { return; } InputBoxForm inputBoxForm = new InputBoxForm("Редактирование группы типов проёмов", "Наименование", "Комментарий", selectedNode["name"].ToString(), selectedNode["comment"].ToString()); if (inputBoxForm.ShowDialog() == DialogResult.Cancel) { return; } selectedNode["name"] = (object)inputBoxForm.Value; selectedNode["comment"] = (object)inputBoxForm.Value2; }
private void treeListTemplateGroup_FocusedNodeChanged(object sender, FocusedNodeChangedEventArgs e) { if (this.disableEvent) { return; } DataRow selectedNode = AtTreeList.GetSelectedNode(this.treeListTemplateGroup); if (selectedNode == null) { return; } this.disableEvent = true; this.DocClass.MoveGroupMethod(selectedNode); this.DocClass.MoveItemToGroup(selectedNode); this.Cursor = Cursors.Default; this.disableEvent = false; }
private void toolStripMenuItem6_Click(object sender, EventArgs e) { DataRow selectedNode = AtTreeList.GetSelectedNode(this.treeList1); if (selectedNode == null) { return; } DataRow row = this.table_goodanaloggroup.NewRow(); row["idgoodanaloggroup"] = (object)dbconn.GetGenId("gen_goodanaloggroup"); if (InputBox.ShowDialog("Создание дочерней группы", "Введите имя", selectedNode["name"].ToString()) == DialogResult.Cancel) { return; } row["name"] = (object)InputBox.Value; row["parentid"] = selectedNode["idgoodanaloggroup"]; this.table_goodanaloggroup.Rows.Add(row); }
private void toolStripMenuItemPollAdd_Click(object sender, EventArgs e) { DataRow selectedNode = AtTreeList.GetSelectedNode(this.treeListPollGroup); if (selectedNode == null) { return; } DataRow dataRow = this.ds_poll.Tables["poll"].NewRow(); dataRow["idpoll"] = (object)dbconn.GetGenId("gen_poll"); dataRow["idpollgroup"] = selectedNode["idpollgroup"]; dataRow["dtedit"] = (object)DateTime.Now; this.ds_poll.Tables["poll"].Rows.Add(dataRow); if (this.db.quModifDataSet(this.ds_poll) > 0) { this.SaveToBase(); } MdiManager.Add((Control) new PollEditForm(dataRow)); }
private void MenuGroupAddChild_Click(object sender, EventArgs e) { DataRow selectedNode = AtTreeList.GetSelectedNode(this.treeListGroup); if (selectedNode == null || InputBox.ShowDialog("Создание дочерней группы", "Введите имя", "Введите комментарий", selectedNode["name"].ToString(), "") == DialogResult.Cancel) { return; } this.SaveDataMember((Control)this.treeListGroup); DataRow row = this.table_SourceInfogroup.NewRow(); row["idSourceInfogroup"] = (object)dbconn.GetGenId("gen_SourceInfogroup"); row["name"] = (object)InputBox.Value; row["comment"] = (object)InputBox.Value2; row["parentid"] = selectedNode["idSourceInfogroup"]; row["isactive"] = (object)true; this.table_SourceInfogroup.Rows.Add(row); this.RestoreDataMember((Control)this.treeListGroup); this.treeListGroup.FocusedNode = AtTreeList.FindNode(this.treeListGroup, (TreeListNode)null, "idSourceInfogroup", (int)row["idSourceInfogroup"]); }
private void MenuGroupAddChild_Click(object sender, EventArgs e) { DataRow selectedNode = AtTreeList.GetSelectedNode(this.treeListGroup); if (selectedNode == null) { return; } InputBoxForm inputBoxForm = new InputBoxForm("Добавление дочерней группы", "Наименование", "Комментарий", selectedNode["name"].ToString(), ""); if (inputBoxForm.ShowDialog() == DialogResult.Cancel) { return; } DataRow row = this.table_embrasuretypegroup.NewRow(); row["idembrasuretypegroup"] = (object)dbconn.GetGenId("gen_embrasuretypegroup"); row["parentid"] = selectedNode["idembrasuretypegroup"]; row["name"] = (object)inputBoxForm.Value; row["comment"] = (object)inputBoxForm.Value2; row["isactive"] = (object)true; this.table_embrasuretypegroup.Rows.Add(row); }
private void toolStripMenuItemPollGroupAddChildGroup_Click(object sender, EventArgs e) { DataRow selectedNode = AtTreeList.GetSelectedNode(this.treeListPollGroup); if (selectedNode == null || selectedNode["idpollgroup"] == DBNull.Value || Convert.ToInt32(selectedNode["idpollgroup"]) == -1) { return; } DataRow row = this.ds_poll.Tables["pollgroup"].NewRow(); if (InputBox.ShowDialog("Создание дочерней группы", "Введите имя", row["name"].ToString()) == DialogResult.Cancel) { return; } string str = InputBox.Value; row["idpollgroup"] = (object)dbconn.GetGenId("gen_pollgroup"); row["name"] = (object)str; row["parentid"] = selectedNode["idpollgroup"]; row["isactive"] = (object)1; row["numpos"] = (object)this.GetGroupNumpos(); this.ds_poll.Tables["pollgroup"].Rows.Add(row); }
private void MenuItemAdd_Click(object sender, EventArgs e) { DataRow selectedNode = AtTreeList.GetSelectedNode(this.treeListGroup); if (selectedNode == null) { return; } int genId = dbconn.GetGenId("gen_embrasuretype"); DataRow row = this.table_embrasuretype.NewRow(); DataRow dataRow = row; string index = "idembrasuretype"; int num1 = genId; int num2 = 1; int num3 = num1 + num2; // ISSUE: variable of a boxed type __Boxed <int> local = (System.ValueType)num1; dataRow[index] = (object)local; row["idembrasuretypegroup"] = selectedNode["idembrasuretypegroup"]; row["name"] = (object)""; row["comment"] = (object)""; this.table_embrasuretype.Rows.Add(row); }
private void MenuItemAdd_Click_1(object sender, EventArgs e) { ds_addclassification.addclassificationgroupRow addclassificationgroupRow = AtTreeList.GetSelectedNode(this.treeListGroup) as ds_addclassification.addclassificationgroupRow; if (addclassificationgroupRow == null) { return; } ds_addclassification.addclassificationRow row = this.ds.addclassification.NewaddclassificationRow(); row.idaddclassification = dbconn.GetGenId("gen_addclassification"); row.idaddclassificationgroup = addclassificationgroupRow.idaddclassificationgroup; row.name = "Новая доп. классификация"; this.ds.addclassification.AddaddclassificationRow(row); }