Beispiel #1
0
 private void оформитьНовыйToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (curEmpl.Appointment.accessModifier == (int)accessModifiers.acc_ord || curEmpl.Appointment.accessModifier == (int)accessModifiers.acc_adm)
     {
         FormEditOrder formOrder = new FormEditOrder(ref curEmpl);
         bindCloseEvent(formOrder);
         formOrder.Show();
     }
     else
     {
         MessageBox.Show("Ваш уровень доступа не позволяет совершить это действие", "Ошибка аутентификации", MessageBoxButtons.OK);
     }
 }
Beispiel #2
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);
         }
     }
 }
Beispiel #3
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
 }
Beispiel #4
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
 }