当前位置: 首页>>代码示例>>C#>>正文


C# LogWriter.WriteLog方法代码示例

本文整理汇总了C#中LogWriter.WriteLog方法的典型用法代码示例。如果您正苦于以下问题:C# LogWriter.WriteLog方法的具体用法?C# LogWriter.WriteLog怎么用?C# LogWriter.WriteLog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LogWriter的用法示例。


在下文中一共展示了LogWriter.WriteLog方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!Utils.CheckLoggedUser(Session["userEmployee"], UserTypeEmployee))
                    Response.Redirect(Page.ResolveUrl("~") + ConfigurationManager.AppSettings["UrlLogin"]);

                if (!Utils.CheckAccountStatus(Session["userEmployee"], UserTypeEmployee))
                    Response.Redirect(Page.ResolveUrl("~") + ConfigurationManager.AppSettings["UrlEmployeePasswordChange"]);

                if (coleccionDniResend.IndexOf(((Usuario)Session["userEmployee"]).DNI.ToString()) == -1)
                    Response.Redirect(Page.ResolveUrl("~") + ConfigurationManager.AppSettings["UrlEmployee"]);

                menuControl = (wucMenuNavegacionSimulador)Master.FindControl("menuSimulador");
                //Session.Remove("user");
                //menuControl.BtnBackClick += new EventHandler(btnBack_Click);
            }
            catch (ThreadAbortException)
            {

            }
            catch (Exception ex)
            {
                LogWriter log = new LogWriter();
                log.WriteLog(ex.Message, "Page_Load", Path.GetFileName(Request.PhysicalPath));
                throw ex;
            }
        }
开发者ID:unlz,项目名称:InscripcionesCursos,代码行数:28,代码来源:SimuladorAlumno.aspx.cs

示例2: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!Utils.CheckLoggedUser(Session["userEmployee"], UserTypeEmployee))
                    Response.Redirect(Page.ResolveUrl("~") + ConfigurationManager.AppSettings["UrlLogin"]);

                if (!Utils.CheckAccountStatus(Session["userEmployee"], UserTypeEmployee))
                    Response.Redirect(Page.ResolveUrl("~") + ConfigurationManager.AppSettings["UrlEmployeePasswordChange"]);

                if (!IsPostBack)
                {
                    LoadTexts();
                    Session.Remove("user");
                }
            }
            catch (ThreadAbortException)
            {

            }
            catch (Exception ex)
            {
                LogWriter log = new LogWriter();
                log.WriteLog(ex.Message, "Page_Load", Path.GetFileName(Request.PhysicalPath));
                throw ex;
            }
        }
开发者ID:unlz,项目名称:InscripcionesCursos,代码行数:27,代码来源:CambioTextos.aspx.cs

示例3: Page_Load

        public void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    if (!Utils.CheckLoggedUser(Session["userEmployee"], UserTypeEmployee))
                        Response.Redirect(Page.ResolveUrl("~") + ConfigurationManager.AppSettings["UrlLogin"]);
                    Session.Remove("user");
                }

                if (InscripcionDTO.CheckEmployeeTest())
                    btnClean.Enabled = true;

                FailureText.Visible = false;
                divNoDisponible.Visible = false;
            }
            catch (ThreadAbortException)
            {

            }
            catch (Exception ex)
            {
                LogWriter log = new LogWriter();
                log.WriteLog(ex.Message, "Page_Load", Path.GetFileName(Request.PhysicalPath));
                throw ex;
            }
        }
开发者ID:unlz,项目名称:InscripcionesCursos,代码行数:28,代码来源:InscripcionCursos.aspx.cs

示例4: btnEnviar_Click

 /// <summary>
 /// Event to save the password change
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnEnviar_Click(object sender, EventArgs e)
 {
     try
     {
         if (!loggedUser.CambioPrimerLogin)
         {
             if (ValidatePassword())
             {
                 loggedUser.CambioPrimerLogin = true;
                 SaveNewPassword();
                 Session.Add("userEmployee", loggedUser);
                 SetSuccessView();
                 Response.AddHeader("REFRESH", "5;URL=" + Page.ResolveUrl("~") + ConfigurationManager.AppSettings["UrlEmployeeGenerarClaves"]);
             }
             else
             {
                 FailureText.Text = ConfigurationManager.AppSettings["ErrorMessagePasswordNoCambiada"];
                 divMessage.Visible = true;
             }
         }
     }
     catch (Exception ex)
     {
         LogWriter log = new LogWriter();
         log.WriteLog(ex.Message, "btnEnviar_Click", Path.GetFileName(Request.PhysicalPath));
         throw ex;
     }
 }
开发者ID:unlz,项目名称:InscripcionesCursos,代码行数:33,代码来源:CambioContrasenia.aspx.cs

示例5: btnClean_Click

 protected void btnClean_Click(object sender, EventArgs e)
 {
     try
     {
         InscripcionDTO.DeleteEmployeeTestInscription();
         btnClean.Enabled = false;
     }
     catch (Exception ex)
     {
         LogWriter log = new LogWriter();
         log.WriteLog(ex.Message, "btnClean_Click", Path.GetFileName(Request.PhysicalPath));
         throw ex;
     }
 }
开发者ID:unlz,项目名称:InscripcionesCursos,代码行数:14,代码来源:InscripcionCursos.aspx.cs

示例6: btnCancelar_Click

        /// <summary>
        /// Event to abort the password change
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnCancelar_Click(object sender, EventArgs e)
        {
            try
            {
                Session.Remove("userEmployee");
                Response.Redirect(Page.ResolveUrl("~") + ConfigurationManager.AppSettings["UrlLogin"]);
            }
            catch (ThreadAbortException)
            {

            }
            catch (Exception ex)
            {
                LogWriter log = new LogWriter();
                log.WriteLog(ex.Message, "btnCancelar_Click", Path.GetFileName(Request.PhysicalPath));
                throw ex;
            }
        }
开发者ID:unlz,项目名称:InscripcionesCursos,代码行数:23,代码来源:CambioContrasenia.aspx.cs

示例7: btnConsultar_Click

 protected void btnConsultar_Click(object sender, EventArgs e)
 {
     try
     {
         if (ddTurnos.SelectedIndex != 0)
         {
             var idTipoInscripcion = GetIdTipoInscripcion(ddTurnos.SelectedValue.Substring(ddTurnos.SelectedValue.IndexOf("-") + 2));
             DrawChartInscripciones(Convert.ToDateTime(Convert.ToDateTime(ddTurnos.SelectedValue.Substring(0, ddTurnos.SelectedValue.IndexOf("-")))), idTipoInscripcion);
             DrawInscripcionesCarrera(Convert.ToDateTime(Convert.ToDateTime(ddTurnos.SelectedValue.Substring(0, ddTurnos.SelectedValue.IndexOf("-")))), idTipoInscripcion);
             DrawInscripcionesComision(Convert.ToDateTime(Convert.ToDateTime(ddTurnos.SelectedValue.Substring(0, ddTurnos.SelectedValue.IndexOf("-")))), idTipoInscripcion);
         }
     }
     catch (Exception ex)
     {
         LogWriter log = new LogWriter();
         log.WriteLog(ex.Message, "btnConsultar_Click", Path.GetFileName(Request.PhysicalPath));
         throw ex;
     }
 }
开发者ID:unlz,项目名称:InscripcionesCursos,代码行数:19,代码来源:ChartInscripcion.aspx.cs

示例8: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    if (!Convert.ToBoolean(ConfigurationManager.AppSettings["ConstanciaRegularidadDisable"]))
                    {
                        if (!Utils.CheckLoggedUser(Session["user"], UserTypeStudent))
                            Response.Redirect(Page.ResolveUrl("~") + ConfigurationManager.AppSettings["UrlLogin"]);

                        if (!Utils.CheckAccountStatus(Session["user"], UserTypeStudent))
                            Response.Redirect(Page.ResolveUrl("~") + ConfigurationManager.AppSettings["UrlStudentPasswordChange"]);

                        if ((((Usuario)Session["user"]).Estado.IndexOf("Activo") == -1) || (((Usuario)Session["user"]).CuatrimestreAnioIngreso == null))
                        {
                            lblEstado.Visible = true;
                            actionForm.Visible = false;
                        }
                    }
                    else
                    {
                        divDatosConstancia.Visible = false;
                        divNoDisponible.Visible = true;
                        lblMsjNoDisponible.Text = ConfigurationManager.AppSettings["ContentConstanciaRegularidadNoDisponible"];
                    }
                }
            }
            catch (ThreadAbortException)
            {

            }
            catch (Exception ex)
            {
                LogWriter log = new LogWriter();
                log.WriteLog(ex.Message, "Page_Load", Path.GetFileName(Request.PhysicalPath));
                throw ex;
            }
        }
开发者ID:unlz,项目名称:InscripcionesCursos,代码行数:39,代码来源:ConstanciaAlumnoRegular.aspx.cs

示例9: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!Utils.CheckLoggedUser(Session["user"], UserTypeStudent))
                    Response.Redirect(Page.ResolveUrl("~") + ConfigurationManager.AppSettings["UrlLogin"]);

                FillUserData();

                if (loggedUser.CambioPrimerLogin)
                    SetSuccessView();
            }
            catch (ThreadAbortException)
            {

            }
            catch (Exception ex)
            {
                LogWriter log = new LogWriter();
                log.WriteLog(ex.Message, "Page_Load", Path.GetFileName(Request.PhysicalPath));
                throw ex;
            }
        }
开发者ID:unlz,项目名称:InscripcionesCursos,代码行数:23,代码来源:CambioContrasenia.aspx.cs

示例10: gridComision_RowDataBound

        protected void gridComision_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            try
            {
                if (e.Row.RowType == DataControlRowType.DataRow)
                {
                    Label titleLabelDepto = (Label)e.Row.FindControl("lblDepartamento");
                    string strvalDep = ((Label)(titleLabelDepto)).Text;
                    string titleDepto = (string)ViewState["Departamento"];
                    if (titleDepto == strvalDep)
                    {
                        titleLabelDepto.Visible = false;
                        titleLabelDepto.Text = string.Empty;
                    }
                    else
                    {
                        titleDepto = strvalDep;
                        ViewState["Departamento"] = titleDepto;
                        titleLabelDepto.Visible = true;
                        titleLabelDepto.Text = titleDepto;
                    }

                    Label titleLabel = (Label)e.Row.FindControl("lblMateria");
                    string strval = ((Label)(titleLabel)).Text;
                    string title = (string)ViewState["Materia"];
                    if (title == strval)
                    {
                        titleLabel.Visible = false;
                        titleLabel.Text = string.Empty;
                    }
                    else
                    {
                        title = strval;
                        ViewState["Materia"] = title;
                        titleLabel.Visible = true;
                        titleLabel.Text = title;
                    }
                }
            }
            catch (Exception ex)
            {
                LogWriter log = new LogWriter();
                log.WriteLog(ex.Message, "gridComision_RowDataBound", Path.GetFileName(Request.PhysicalPath));
                throw ex;
            }
        }
开发者ID:unlz,项目名称:InscripcionesCursos,代码行数:46,代码来源:ChartInscripcion.aspx.cs

示例11: RemoveDuplicateItemsDifRounds

        /// <summary>
        /// Method to remove duplicate items of distinct rounds
        /// </summary>
        /// <returns></returns>
        private List<Carro> RemoveDuplicateItemsDifRounds(List<Carro> altas, List<Carro> bajas)
        {
            try
            {
                List<Carro> listDuplicated = new List<Carro>();
                //BORRO LAS MATERIAS QUE TENGO EN ESTADO "A" EN VUELTA 1, Y EN ESTADO "M" EN VUELTA 2; "M" EN VUELTA 1 Y "A" EN VUELTA 2
                for (int i = 0; i < altas.Count; i++)
                {
                    for (int x = 0; x < bajas.Count; x++)
                    {
                        //VALIDO QUE SEAN LAS MISMAS COMISIONES DE LAS MATERIAS
                        if (altas[i].CatedraComision == bajas[x].CatedraComision)
                        {
                            //VALIDO QUE SEA EL MISMO TURNO DE LAS MATERIAS
                            if (altas[i].TurnoInscripcion == bajas[x].TurnoInscripcion)
                            {
                                //VALIDO QUE SEA LA MISMA MATERIA
                                if (altas[i].IdMateria == bajas[x].IdMateria)
                                {
                                    //VALIDO QUE LA FECHA DE MODIFICACION DE LA BAJA SEA MAYOR A LA DE ALTA (QUIERE DECIR QUE SE DIO
                                    //DE BAJA EN VUELTA 2)
                                    if (altas[i].FechaModificacionInscripcion < bajas[x].FechaModificacionInscripcion)
                                    {
                                        //VALIDO QUE LA VUELTA DEL ALTA SEA MENOR A LA VUELTA DE BAJA, POR SI SE DIO DE BAJA EN 1ERA,
                                        //Y LUEGO SE DIO DE ALTA EN 2DA
                                        if (altas[i].IdVuelta < bajas[x].IdVuelta)
                                        {
                                            listDuplicated.Add(altas[i]);
                                            altas.RemoveAt(i);
                                            if (i > 0) i--;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }

                //BORRO LAS MATERIAS QUE TENGO EN ESTADO A EN VUELTA 1, LUEGO LAS BAJE EN VUELTA 2, Y LAS VOLVI A DAR DE ALTA EN VUELTA 2
                for (int a = 0; a < altas.Count; a++)
                {
                    for (int b = 1; b < altas.Count; b++)
                    {
                        if (altas[a].IdMateria == altas[b].IdMateria && altas[a].CatedraComision == altas[b].CatedraComision
                            && altas[a].TurnoInscripcion == altas[b].TurnoInscripcion)
                        {
                            if (altas[a].IdVuelta > altas[b].IdVuelta)
                            {
                                listDuplicated.Add(altas[b]);
                                altas.RemoveAt(b);
                                a--;
                                b--;
                            }
                        }
                    }
                }
                if (listDuplicated.Count > 0)
                    Session.Add("listDuplicated", listDuplicated);

                return altas;
            }
            catch (Exception ex)
            {
                LogWriter log = new LogWriter();
                log.WriteLog(ex.Message, "RemoveDuplicateItemsDifRounds", Path.GetFileName(Request.PhysicalPath));
                throw ex;
            }
        }
开发者ID:unlz,项目名称:InscripcionesCursos,代码行数:72,代码来源:InscripcionCursos.aspx.cs

示例12: SetUpPage

        private void SetUpPage()
        {
            try
            {
                ddTurnos.DataSource = ExtractTurnosAndTipoInscripcion(InscripcionDTO.GetAllTurnos(new Inscripcion())).GroupBy(i => i).Select(group => group.Key).ToList();

                ddTurnos.DataBind();
                ddTurnos.Items.Insert(0, new ListItem(ConfigurationManager.AppSettings["ContentComboTurnoDefault"], "0"));
                lblDescripcion.Text = ConfigurationManager.AppSettings["ContentDescripcionComboTurno"];
            }
            catch (Exception ex)
            {
                LogWriter log = new LogWriter();
                log.WriteLog(ex.Message, "SetUpPage", Path.GetFileName(Request.PhysicalPath));
                throw ex;
            }
        }
开发者ID:unlz,项目名称:InscripcionesCursos,代码行数:17,代码来源:ChartInscripcion.aspx.cs

示例13: SetLegendsChartInscripcion

 private void SetLegendsChartInscripcion(List<double> listAVG, List<double> listTotal)
 {
     try
     {
         lblTotalInscriptos.Text = String.Format(ConfigurationManager.AppSettings["TotalInscriptos"], listTotal.ElementAt(2).ToString());
         lblTotalInscriptosWeb.Text = String.Format(ConfigurationManager.AppSettings["TotalInscriptosWeb"], listTotal.ElementAt(0).ToString(), listAVG.ElementAt(0).ToString());
         lblTotalInscriptosFacu.Text = String.Format(ConfigurationManager.AppSettings["TotalInscriptosFacu"], listTotal.ElementAt(1).ToString(), listAVG.ElementAt(1).ToString());
         lblTotalNoInscriptos.Text = String.Format(ConfigurationManager.AppSettings["TotalNoInscriptos"], listTotal.ElementAt(3).ToString());
         lblMuestreo.Text = ConfigurationManager.AppSettings["MuestreoEstadisticas"];
     }
     catch (Exception ex)
     {
         LogWriter log = new LogWriter();
         log.WriteLog(ex.Message, "SetLegendsChartInscripcion", Path.GetFileName(Request.PhysicalPath));
         throw ex;
     }
 }
开发者ID:unlz,项目名称:InscripcionesCursos,代码行数:17,代码来源:ChartInscripcion.aspx.cs

示例14: SetStudentData

        /// <summary>
        /// Method to load student info
        /// </summary>
        /// <param name="state"></param>
        private void SetStudentData()
        {
            try
            {
                divResultados.Visible = true;
                txtApellidoNombreResultado.Text = user.ApellidoNombre.ToUpper();
                txtCarrera.Text = user.Carrera != null ? user.Carrera.ToUpper() : String.Empty;
                txtEmail.Text = user.Email != null ? user.Email.ToUpper() : String.Empty;

                if (user.Password != null && user.CambioPrimerLogin && user.CuentaActivada)
                {
                    txtEstadoCuenta.Text = ConfigurationManager.AppSettings["ContentCuentaActivada"].ToUpper();
                    txtEstadoCuenta.BackColor = Color.FromArgb(112, 219, 147);
                }
                else
                {
                    if (user.Password != null && user.CambioPrimerLogin && !user.CuentaActivada)
                    {
                        txtEstadoCuenta.Text = ConfigurationManager.AppSettings["ContentCuentaNoActivada"].ToUpper();
                        txtEstadoCuenta.BackColor = Color.FromArgb(238, 238, 0);
                    }
                    else
                    {
                        if (user.Password != null && !user.CambioPrimerLogin)
                        {
                            txtEstadoCuenta.Text = ConfigurationManager.AppSettings["ContentCuentaTramitada"].ToUpper();
                            txtEstadoCuenta.BackColor = Color.FromArgb(238, 238, 0);
                        }
                        else
                        {
                            txtEstadoCuenta.Text = ConfigurationManager.AppSettings["ContentCuentaNoTramitada"].ToUpper();
                            txtEstadoCuenta.BackColor = Color.FromArgb(255, 99, 71);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                LogWriter log = new LogWriter();
                log.WriteLog(ex.Message, "SetStudentData", Path.GetFileName(Request.PhysicalPath));
                throw ex;
            }
        }
开发者ID:unlz,项目名称:InscripcionesCursos,代码行数:47,代码来源:InscripcionCursos.aspx.cs

示例15: ChangeTexts

        private void ChangeTexts()
        {
            try
            {
                XmlDocument xmlDoc = new XmlDocument();
                xmlDoc.Load(AppDomain.CurrentDomain.BaseDirectory + "AppCustom.config");
                XmlNode appSettingsNode = xmlDoc.SelectSingleNode("appSettings");

                foreach (XmlNode childNode in appSettingsNode)
                {
                    if (childNode.NodeType != XmlNodeType.Comment)
                    {
                        switch (childNode.Attributes["key"].Value)
                        {
                            case "ContentDefaultBodyPart1":
                                childNode.Attributes["value"].Value = txtPaginaInicio1.Text;
                                break;
                            case "ContentDefaultBodyPart2":
                                childNode.Attributes["value"].Value = txtPaginaInicio2.Text;
                                break;
                            case "ContentPreInscripcionBodyPart1":
                                childNode.Attributes["value"].Value = txtPreInscripcion1.Text;
                                break;
                            case "ContentPreInscripcionBodyPart2":
                                childNode.Attributes["value"].Value = txtPreInscripcion2.Text;
                                break;
                            case "ContentPreHistorialInscripcion":
                                childNode.Attributes["value"].Value = txtPreHistorico.Text;
                                break;
                            case "ContentFooterHistoricoEmail":
                                childNode.Attributes["value"].Value = txtPieComprobantePromo.Text;
                                break;
                            case "ContentFooterHistoricoEmailCursoVerano":
                                childNode.Attributes["value"].Value = txtPieComprobanteVerano.Text;
                                break;
                            case "ContentFooterHistoricoEmailExamen":
                                childNode.Attributes["value"].Value = txtPieComprobanteExamen.Text;
                                break;
                            case "ContentInicioInformes":
                                childNode.Attributes["value"].Value = txtInformacionAlumnos.Text;
                                break;
                            case "InscriptionHistoricDisable":
                                if (listRBHabilitaImprimirHistorico.SelectedIndex == 0)
                                    childNode.Attributes["value"].Value = "false";
                                else
                                    childNode.Attributes["value"].Value = "true";
                                break;
                            case "MaintenanceFlag":
                                if (listRBHabilitaPortal.SelectedIndex == 0)
                                    childNode.Attributes["value"].Value = "true";
                                else
                                    childNode.Attributes["value"].Value = "false";
                                break;
                            case "InscripcionDisable":
                                if (listRBHabilitaInscripcion.SelectedIndex == 0)
                                    childNode.Attributes["value"].Value = "false";
                                else
                                    childNode.Attributes["value"].Value = "true";
                                break;
                            case "ConstanciaRegularidadDisable":
                                if (listRBHabilitaConstancia.SelectedIndex == 0)
                                    childNode.Attributes["value"].Value = "false";
                                else
                                    childNode.Attributes["value"].Value = "true";
                                break;
                        }
                    }
                }
                xmlDoc.Save(AppDomain.CurrentDomain.BaseDirectory + "AppCustom.config");

                HttpRuntime.Close();
                Response.Redirect(Page.ResolveUrl("~") + ConfigurationManager.AppSettings["UrlLogin"]);
            }
            catch (ThreadAbortException)
            {

            }
            catch (Exception ex)
            {
                LogWriter log = new LogWriter();
                log.WriteLog(ex.Message, "ChangeTexts", Path.GetFileName(Request.PhysicalPath));
                throw ex;
            }
        }
开发者ID:unlz,项目名称:InscripcionesCursos,代码行数:84,代码来源:CambioTextos.aspx.cs


注:本文中的LogWriter.WriteLog方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。