Разработка подсистемы документооборота в системе управления проектами сервисной компании
Дипломная работа - Компьютеры, программирование
Другие дипломы по предмету Компьютеры, программирование
i = 1; i < treeGridNode.Cells.Count; i++)//Заполнение пустыми ячейками строки группы
{.Cells[i] = new DataGridViewTextBoxCell();.Cells[i].Value = "";.Cells[i].ReadOnly = true;
}
}ByFactByDocsButton_Click(object sender, System.EventArgs e)
{((ByFactButton.Pressed && ByDocsButton.Pressed) || (!ByFactButton.Pressed &&!ByDocsButton.Pressed)).SplitterDistance = splitContainer2.Width / 2;(ByFactButton.Pressed &&!ByDocsButton.Pressed).SplitterDistance = 5;if (!ByFactButton.Pressed && ByDocsButton.Pressed).SplitterDistance = splitContainer2.Width - 5;();
}
#endregion
#region Рекурсивные функции
//Рекурсивно добавляем потомков в дерево
private void recursionAddingNodes(TreeGridNode node, int id,Pos_type pos_type,Pos_group pos_group)
listPositionsChildren=connector.getAllDataFromDB("PositionsASposWHEREpos.delISNULLANDpos.post_post_id="+pos_type.pos_type_id+"ANDpos.pg_pg_id="+pos_group.pg_id+"ANDpos.pos_pos_id="+id+"ORDERBYpos.order_numberasc").ConvertAll(newConverter(ConverterPositions));(int j = 0; j < listPositionsChildren.Count; j++)
{nodeChild = node.Nodes.Add(listPositionsChildren[j].article, listPositionsChildren[j].name, listPositionsChildren[j].um_um_id.short_name, listPositionsChildren[j].count,[j].val_val_id.name, listPositionsChildren[j].price, listPositionsChildren[j].summa, listPositionsChildren[j].stat_stat_id.name, listPositionsChildren[j].delivery,[j].cancel, listPositionsChildren[j].official);.Tag = listPositionsChildren[j];newPos = new Positions();.name = ((Positions)nodeChild.Tag).name;
newPos.article = ((Positions)nodeChild.Tag).article;
newPos.cancel = ((Positions)nodeChild.Tag).cancel;.count = ((Positions)nodeChild.Tag).count;.delivery = ((Positions)nodeChild.Tag).delivery;.official = ((Positions)nodeChild.Tag).official;.delivery = ((Positions)nodeChild.Tag).delivery;.price = ((Positions)nodeChild.Tag).price;.summa = ((Positions)nodeChild.Tag).summa;.stat_stat_id = ((Positions)nodeChild.Tag).stat_stat_id;.prop_prop_id = ((Positions)nodeChild.Tag).prop_prop_id;.um_um_id = ((Positions)nodeChild.Tag).um_um_id;.val_val_id = ((Positions)nodeChild.Tag).val_val_id;.pg_pg_id = ((Positions)nodeChild.Parent.Tag).pg_pg_id;.post_post_id = ((Positions)nodeChild.Parent.Tag).post_post_id;.pos_pos_id = ((Positions)nodeChild.Parent.Tag);.cs_cs_id = ((Positions)nodeChild.Parent.Tag).cs_cs_id;(nodeChild, listPositionsChildren[j].pos_id,listPositionsChildren[j].post_post_id,listPositionsChildren[j].pg_pg_id);
}
}
//Рекурсивно меняем у родителя данные всех детей, делаем детей относящимися ко второй (правой таблице)
private void recursionChangeParent(TreeGridNode node)
{(TreeGridNode childNode in node.Nodes)
{newPos = new Positions();.name = ((Positions)childNode.Tag).name;
newPos.article = ((Positions)childNode.Tag).article;
newPos.cancel = ((Positions)childNode.Tag).cancel;.count = ((Positions)childNode.Tag).count;.delivery = ((Positions)childNode.Tag).delivery;.official = ((Positions)childNode.Tag).official;.delivery = ((Positions)childNode.Tag).delivery;.price = ((Positions)childNode.Tag).price;.summa = ((Positions)childNode.Tag).summa;.stat_stat_id = ((Positions)childNode.Tag).stat_stat_id;.prop_prop_id = ((Positions)childNode.Tag).prop_prop_id;.um_um_id = ((Positions)childNode.Tag).um_um_id;.val_val_id = ((Positions)childNode.Tag).val_val_id;.pg_pg_id = ((Positions)childNode.Parent.Tag).pg_pg_id;.post_post_id = ((Positions)childNode.Parent.Tag).post_post_id;.pos_pos_id = ((Positions)childNode.Parent.Tag);.cs_cs_id = ((Positions)childNode.Parent.Tag).cs_cs_id;.Tag = newPos;.Update(newPos);(childNode);
}
}void recursionChangeNodeParent(TreeGridNode node)
{(TreeGridNode childNode in node.Nodes)
{newPos = new Positions();.name = ((Positions)childNode.Tag).name;
newPos.article = ((Positions)childNode.Tag).article;
newPos.cancel = ((Positions)childNode.Tag).cancel;.count = ((Positions)childNode.Tag).count;.delivery = ((Positions)childNode.Tag).delivery;.official = ((Positions)childNode.Tag).official;.delivery = ((Positions)childNode.Tag).delivery;.price = ((Positions)childNode.Tag).price;.summa = ((Positions)childNode.Tag).summa;.stat_stat_id = ((Positions)childNode.Tag).stat_stat_id;.prop_prop_id = ((Positions)childNode.Tag).prop_prop_id;.um_um_id = ((Positions)childNode.Tag).um_um_id;.val_val_id = ((Positions)childNode.Tag).val_val_id;.cs_cs_id = ((Positions)childNode.Tag).cs_cs_id;.pg_pg_id = ((Pos_group)childNode.Parent.Tag);.post_post_id = ((Pos_group)childNode.Parent.Tag).pt_pt_id;
newPos.pos_pos_id = null;
childNode.Tag = newPos;.Update(newPos);(childNode);
}
}
#endregion
#region ConvertersContract_spec ConverterContract_spec(object obj)
{(Contract_spec)obj;
}Positions ConverterPositions(object obj)
{(Positions)obj;
}Statuses ConverterStatuses(object obj)
{(Statuses)obj;
}Units_measur ConverterUnits_measur(object obj)
{(Units_measur)obj;
}Valuta ConverterValuta(object obj)
{(Valuta)obj;
}Pos_group ConverterPos_group(object obj)
{(Pos_group)obj;
}
#endregion
#region draggablePanel1void draggablePanel1_Move(object sender, EventArgs e)
{();
}void draggablePanel1_MouseUp(object sender, MouseEventArgs e)
{();
}dragPanelChoisePartMouseUp()
{
splitContainer2.SplitterDistance)">//Мониторим панель, что она лежит между 2мя датагридами(draggablePanel1.Location.X splitContainer2.SplitterDistance)
{(draggablePanel1.Location.X + draggablePanel1.Width / 2 < splitContainer2.SplitterDistance)//Больше к левой
{.Location = new Point(splitContainer2.SplitterDistance - draggablePanel1.Width, draggablePanel1.Location.Y);
blockPanel9.HeaderText = "По документам";
}//Больше к правой
{.Location = new Point(splitContainer2.SplitterDistance, draggablePanel1.Location.Y);
blockPanel9.HeaderText = "Фактически";
}
}
//Если выходит за левую границу
if (draggablePanel1.Location.X < 0).Location = new Point(0, draggablePanel1.Location.Y);
splitContainer2.Width).Location = new Point(splitContainer2.Width - draggablePanel1.Width, draggablePanel1.Location.Y);">////Если выходит за правую границу(draggablePanel1.Location.X + draggablePanel1.Width > splitContainer2.Width).Location = new Point(splitContainer2.Width - draggablePanel1.Width, draggablePanel1.Location.Y);
//Если выходит за верхнюю границу(draggablePanel1.Location.Y < 0)
draggablePanel1.Location = new Point(draggablePanel1.Location.X, 0);
splitContainer2.Height).Location = new Point(draggablePanel1.Location.X, splitContainer2.Height - draggablePanel1.Height);">////Если выходит за нижнюю границу(draggablePanel1.Location.Y + draggablePanel1.Height > splitContainer2.Height).Location = new Point(draggablePanel1.Location.X, splitContainer2.Height - draggablePanel1.Height);
}dragPanelChoisePartMove()
splitContainer2.SplitterDistance)">{(draggablePanel1.Location.X + draggablePanel1.Width splitContainer2.SplitterDistance)
{.HeaderText = "Фактически";
}
}blockPanel9_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{(e.Button == MouseButtons.Left)
{();= e.Location;
(sender as Control).MouseUp += new MouseEventHandler(MouseUpEv);
(sender as Control).MouseMove += new MouseEventHandler(MouseMoveEv);
}
}MouseUpEv(object sender, MouseEventArgs e)
{
(sender as Control).MouseMove -= new MouseEventHandler(MouseMoveEv);
(sender as Control).MouseUp -= new MouseEventHandler(MouseUpEv);();
}MouseMoveEv(object sender, MouseEventArgs e)
{.Location = new Point(draggablePanel1.Location.X - (start.X - e.X), draggablePanel1.Location.Y - (start.Y - e.Y));
}closeDraggablePanelButton_Click(object sender, System.EventArgs e)
{(dragPanelClosed)
{.Location = DraggablePanelOldLocation;.Size = DraggablePanelOldSize;= false;
}
{= draggablePanel1.Location;.Location = new Point(splitContainer2.Location.X + 10, splitContainer2.Height - 10);= draggablePanel1.Size;.Size = blockPanel9.HeaderPanel.Size;= true;
}();
}
#endregion
#region Drag and Drop из docsT