コード例 #1
0
ファイル: FormMain.cs プロジェクト: d-theus/SERIOUS_BUSINESS
 private void изменитьЗаказToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (DGV.SelectedRows.Count > 0)
     {
         foreach (DataGridViewRow row in DGV.SelectedRows)
         {
             int selID = (int)row.Cells["Номер"].Value;
             Order selOrder = (from ord in database.OrderSet where ord.id == selID select ord).Single();
             FormEditOrder order = new FormEditOrder(ref curEmpl, ref selOrder);
             order.ShowDialog();
             this.cb_table_SelectedIndexChanged(this, null);
         }
     }
 }
コード例 #2
0
ファイル: FormMain.cs プロジェクト: d-theus/SERIOUS_BUSINESS
 //##### CMS_ADM_O
 private void новыйЗаказToolStripMenuItem_Click(object sender, EventArgs e)
 {
     FormEditOrder order = new FormEditOrder(ref curEmpl);
     order.ShowDialog();
     this.cb_table_SelectedIndexChanged(this, null); //refresh
 }
コード例 #3
0
ファイル: FormMain.cs プロジェクト: d-theus/SERIOUS_BUSINESS
 //#### CMS_MGR_S
 private void добавитьВЗаказToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (DGV.SelectedRows.Count > 0)
     {
         List<Item> itemsToOrder = new List<Item>();
         foreach (DataGridViewRow row in DGV.SelectedRows)
         {
             int itemID = (int)row.Cells["id"].Value;
             Item currItem = (from items in database.ItemSet where items.id == itemID select items).Single();
             itemsToOrder.Add(currItem);
         }
         FormEditOrder order = new FormEditOrder(ref curEmpl, itemsToOrder.ToArray());
         order.ShowDialog();
     }
     cb_tableOptions_SelectedIndexChanged(this, null); //refresh
 }