Ejemplo n.º 1
0
 public static void Insert(String action, String messageError, String Note)
 {
     SqlService.ExecuteQuery("insert into ErrorReport ([Action],MsgError,[Datetime],Note,UserID) values('" + action + "','" + Utilities.ReplaceQuot(messageError) + "','" + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss") + "','" + GetComputerInfo.GetHostName() + ":" + GetComputerInfo.GetIPAddress() + " - " + "" + " - " + Note + "','" + MYAPPCS.Properties.Settings.Default.id_user + "')");
 }
Ejemplo n.º 2
0
 public static void Logout()
 {
     SqlService.ExecuteQuery("insert into LogApp ([Action],TableName,DataBefore,DataAfter,[Datetime],Note,UserID) values('Logout','-','-','-','" + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss") + "','" + GetComputerInfo.GetHostName() + ":" + GetComputerInfo.GetIPAddress() + "','" + MYAPPCS.Properties.Settings.Default.id_user + "')");
 }
Ejemplo n.º 3
0
        public static void Write(String strError)
        {
            String sPath = "";

            if (!Directory.Exists(Application.ExecutablePath + "\\LogError"))
            {
                Directory.CreateDirectory(Application.ExecutablePath + "\\LogError");
            }
            sPath = Application.ExecutablePath + "\\LogError" + DateTime.Now.ToString("yyyyMMdd") + "LogError.txt";
            File.AppendAllText(sPath, DateTime.Now.ToString("yyyyMMdd") + "   " + strError + " - " + GetComputerInfo.GetHostName() + ":" + GetComputerInfo.GetIPAddress() + "-" + "" + "-" + MYAPPCS.Properties.Settings.Default.id_user + " " + System.Environment.NewLine);
        }
Ejemplo n.º 4
0
        public static void Delete(String TableName, String data, String Note)
        {
            var formMain = (FormMain)GetOpenForm.GetForm("FormMain");

            SqlService.ExecuteQuery("insert into LogApp ([Action],TableName,DataBefore,DataAfter,[Datetime],Note,UserID) values('Delete','" + Utilities.ReplaceQuot(TableName) + "','" + Utilities.ReplaceQuot(data) + "','-','" + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss") + "','" + GetComputerInfo.GetHostName() + ":" + GetComputerInfo.GetIPAddress() + " - " + formMain.FormActive + " - " + Utilities.ReplaceQuot(Note) + "','" + MYAPPCS.Properties.Settings.Default.id_user + "')");
        }