/* ввод на основании: приход */
 void ПриходнаяНакладнаяToolStripMenuItemClick(object sender, EventArgs e)
 {
     if(listView1.SelectedIndices.Count > 0){ // проверка выбранного элемента
         if(listView1.Items[listView1.SelectedIndices[0]].SubItems[3].Text.ToString() == "Заказ")
         {
             FormClientDocComing Rapid_ClientDocComing = new FormClientDocComing();
             Rapid_ClientDocComing.MdiParent = ClassForms.Rapid_Client;
             Rapid_ClientDocComing.ActionID = listView1.Items[listView1.SelectedIndices[0]].SubItems[6].Text.ToString();
             Rapid_ClientDocComing.Text = "Ввод на основании Заказа.";
             Rapid_ClientDocComing.Show();
         }
     }
 }
Esempio n. 2
0
 /* документ Приходная накладная ------------------------------*/
 void ShowComing()
 {
     FormClientDocComing Rapid_ClientDocComing = new FormClientDocComing();
     Rapid_ClientDocComing.MdiParent = ClassForms.Rapid_Client;
     Rapid_ClientDocComing.Text = "Новая документ.";
     Rapid_ClientDocComing.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();
             }
             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();
             }
         }
     }
 }