Exemple #1
0
        private void btnAddBrak_Click(object sender, EventArgs e)
        {
            tmr.Stop();
            this.TopMost = false;
            frmBadWorkForm f = new frmBadWorkForm();
            f.db_connection = db_connection;
            f.usr = usr;
            //f.id_paper = usr.Id_Paper;
            f.id_mashine = usr.Id_Mashine;
            f.id_good = txtFilterGoods.SelectedValue.ToString();
            if (!btnOpenOrder.Enabled)
            {
                f.id_order = int.Parse(lblFInfoOrderID.Text);
                f.txtOrderNo.Text = lblFInfoOrderNo.Text;
            }
            f.OrderNo = lblFInfoOrderNo.Text;

            f.ShowDialog();
            if (f.DialogResult == DialogResult.OK)
            {
                FillTehAction();
                recalcCounter(true);
            }
            this.TopMost = prop.Mod_operator_top_most;
            tmr.Start();
        }
Exemple #2
0
 private void btnEditBrak_Click(object sender, EventArgs e)
 {
     if (CheckState(db_connection))
     {
         tmr.Stop();
         try
         {
             if (usr.prmCanDelEditBrak)
             {
                 if (int.Parse(gridTehAction.GetData(gridTehAction.Row, 1).ToString()) > 0)
                 {
                     this.TopMost = false;
                     frmBadWorkForm f = new frmBadWorkForm(int.Parse(gridTehAction.GetData(gridTehAction.Row, 1).ToString()));
                     f.db_connection = db_connection;
                     f.usr = usr;
                     f.ShowDialog();
                     if (f.DialogResult == DialogResult.OK)
                     {
                         FillTehAction();
                         recalcCounter(true);
                     }
                     this.TopMost = prop.Mod_operator_top_most;
                 }
             }
             else
             {
                 MessageBox.Show("Отказано в доступе", "Доступ", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
             }
         }
         catch (Exception ex)
         {
             ErrorNfo.WriteErrorInfo(ex);
         }
         tmr.Start();
     }
 }