示例#1
0
 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
 //##### 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
 //#### 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
 }