예제 #1
0
        public static void CriaLog(string modulo, string descricao)
        {
            string mod  = modulo;
            string oper = Global.Margem.Operador;
            string dia  = DateTime.Now.Day.ToString();

            if (dia.Length < 2)
            {
                dia = "0" + dia;
            }
            string mes = DateTime.Now.Month.ToString();

            if (mes.Length < 2)
            {
                mes = "0" + mes;
            }
            string ano       = DateTime.Now.Year.ToString();
            int    dat       = Convert.ToInt32(ano + mes + dia);
            string dataatual = dia + "/" + mes + "/" + ano + " [" + DateTime.Now.Hour.ToString() +
                               ":" + DateTime.Now.Minute.ToString() + ":" + DateTime.Now.Second.ToString() + "]";
            string descAction = descricao;

            DALCadastro.InsereLog(dataatual, dat, oper, mod, descAction);
        }