/*--------------------------------------------------------------------*/ /* Редактировать выбранный документ ----------------------------------*/ void OpenEditDoc() { if (listView1.SelectedIndices.Count > 0) // проверка выбранного элемента { if (listView1.SelectedItems[0].StateImageIndex == 2) // документ не удалён. // редактируем заказ { if (listView1.Items[listView1.SelectedIndices[0]].SubItems[3].Text.ToString() == "Заказ") { FormClientDocOrder Rapid_ClientDocOrder = new FormClientDocOrder(); Rapid_ClientDocOrder.MdiParent = ClassForms.Rapid_Client; Rapid_ClientDocOrder.Text = "Изменить документ."; Rapid_ClientDocOrder.ActionID = listView1.Items[listView1.SelectedIndices[0]].SubItems[6].Text.ToString(); Rapid_ClientDocOrder.Show(); } if (listView1.Items[listView1.SelectedIndices[0]].SubItems[3].Text.ToString() == "Приходная Накладная") { FormClientDocComing Rapid_ClientDocComing = new FormClientDocComing(); Rapid_ClientDocComing.MdiParent = ClassForms.Rapid_Client; Rapid_ClientDocComing.Text = "Изменить документ."; Rapid_ClientDocComing.ActionID = listView1.Items[listView1.SelectedIndices[0]].SubItems[6].Text.ToString(); Rapid_ClientDocComing.Show(); } if (listView1.Items[listView1.SelectedIndices[0]].SubItems[3].Text.ToString() == "Расходная Накладная") { FormClientDocExpense Rapid_ClientDocExpense = new FormClientDocExpense(); Rapid_ClientDocExpense.MdiParent = ClassForms.Rapid_Client; Rapid_ClientDocExpense.Text = "Изменить документ."; Rapid_ClientDocExpense.ActionID = listView1.Items[listView1.SelectedIndices[0]].SubItems[6].Text.ToString(); Rapid_ClientDocExpense.Show(); } } } }
/* документ Заказ --------------------------------------------*/ void ShowOrder() { FormClientDocOrder Rapid_ClientDocOrder = new FormClientDocOrder(); Rapid_ClientDocOrder.MdiParent = ClassForms.Rapid_Client; Rapid_ClientDocOrder.Text = "Новая документ."; Rapid_ClientDocOrder.Show(); }
/*--------------------------------------------------------------------*/ /* Редактировать выбранный документ ----------------------------------*/ void OpenEditDoc() { if(listView1.SelectedIndices.Count > 0){ // проверка выбранного элемента if(listView1.SelectedItems[0].StateImageIndex == 2){ // документ не удалён. // редактируем заказ if(listView1.Items[listView1.SelectedIndices[0]].SubItems[3].Text.ToString() == "Заказ") { FormClientDocOrder Rapid_ClientDocOrder = new FormClientDocOrder(); Rapid_ClientDocOrder.MdiParent = ClassForms.Rapid_Client; Rapid_ClientDocOrder.Text = "Изменить документ."; Rapid_ClientDocOrder.ActionID = listView1.Items[listView1.SelectedIndices[0]].SubItems[6].Text.ToString(); Rapid_ClientDocOrder.Show(); } } } }
/*--------------------------------------------------------------------*/ /* Создание документа ----------------------------------------------- */ void CreateOrder() { FormClientDocOrder Rapid_ClientDocOrder = new FormClientDocOrder(); Rapid_ClientDocOrder.MdiParent = ClassForms.Rapid_Client; Rapid_ClientDocOrder.Text = "Новая документ."; Rapid_ClientDocOrder.Show(); }