using System using System Data using System Windows Forms using Atechn

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System;
using System.Data;
using System.Windows.Forms;
using Atechnology.DBConnections2;
using Atechnology.Components;
//Безбумажка.Открытие формы прихода СГП
namespace Atechnology.ecad.Calc{
public class RunCalc{
#region Variables
int err = 0;
DataSet ds;
#endregion
#region Стартовый метод
public void Run(dbconn _db, DataRow [] _dr, bool isDelete,object _form){
try{
Atechnology.winDraw.NoPaper.InSGPForm form = (_form as Atechnology.winDraw.NoPaper.InSGPForm);
form.LostFocus += new EventHandler(form_LostFocus);
} catch(Exception e) {
MessageBox.Show("Ошибка события\n Контрольная точка - " + err.ToString() + " Message - " + e.Message);
}
}
#endregion
void form_LostFocus(object sender, EventArgs e)
{
try{
Atechnology.winDraw.NoPaper.InSGPForm form = (sender as Atechnology.winDraw.NoPaper.InSGPForm);
form.textEdit1.SelectAll();
}catch{}
}
}
}