示例#1
0
        public void loadReportToday()
        {
            string pathReport = @"C:\Charger DC Tester\Report\Report-" + DateTime.Now.ToString("yyyy-MM-dd") + ".txt";

            String[] dataInLine;
            if (File.Exists(pathReport)) // if computer has report file, push it on data grit view
            {
                var lines = File.ReadAllLines(pathReport);
                for (int i = lines.Length - 1; i >= 0; i--)
                {
                    dataInLine = lines[i].Split('/');
                    if (dataInLine[1].Contains("OK"))
                    {
                        Ok++;
                    }
                    if (dataInLine[1].Contains("NG"))
                    {
                        NG++;
                    }
                    if (dataInLine[0].Contains("L"))
                    {
                        Total++;
                        dgReport.Rows.Add(Total.ToString(), dataInLine[1], dataInLine[2], dataInLine[3], dataInLine[4], dataInLine[5], dataInLine[6], dataInLine[7]);
                    }
                }
                lbStaTTnum.Text = Total.ToString();
                lbStaOKnum.Text = Ok.ToString("D");
                lbStaNGnum.Text = NG.ToString("D");
            }
        }
示例#2
0
        public void loadReport(DateTime date)
        {
            String[] dataInLine;
            dgReport.SelectAll();
            dgReport.ClearSelection();
            string pathReport = @"C:\Charger DC Tester\Report\Report-" + date.ToString("yyyy-MM-dd") + ".txt";

            if (File.Exists(pathReport)) // if computer has report file, push it on data grit view
            {
                var lines = File.ReadAllLines(pathReport);
                for (int i = lines.Length - 1; i >= 0; i--)
                {
                    dataInLine = lines[i].Split('/');

                    if (dataInLine[2] == productNameList[cbModel.SelectedIndex])
                    {
                        if (dataInLine[1].Contains("OK"))
                        {
                            Ok++;
                        }
                        if (dataInLine[1].Contains("NG"))
                        {
                            NG++;
                        }
                        if (dataInLine[0].Contains("L"))
                        {
                            Total++;
                        }
                        dgReport.Rows.Add(Total.ToString(), dataInLine[1], dataInLine[2], dataInLine[3], dataInLine[4], dataInLine[5], dataInLine[6], dataInLine[7]);
                    }
                    else if (productNameList[cbModel.SelectedIndex] == "None")
                    {
                        if (dataInLine[1].Contains("OK"))
                        {
                            Ok++;
                        }
                        if (dataInLine[1].Contains("NG"))
                        {
                            NG++;
                        }
                        if (dataInLine[0].Contains("L"))
                        {
                            Total++;
                            dgReport.Rows.Add(Total.ToString(), dataInLine[1], dataInLine[2], dataInLine[3], dataInLine[4], dataInLine[5], dataInLine[6], dataInLine[7]);
                        }
                    }
                }
                lbStaTTnum.Text = Total.ToString();
                lbStaOKnum.Text = Ok.ToString("D");
                lbStaNGnum.Text = NG.ToString("D");
            }
        }
        public IList <DTOSelecPorAgrupamento> SelectPorAgrupamento()
        {
            List <DTOSelecPorAgrupamento> ListaDTOSelecPorAgrupamento = new List <DTOSelecPorAgrupamento>();

            var AgrupamentoPorData =
                from valorcalculo in ValoresCalculados
                group valorcalculo by valorcalculo.DataDoCalculo into NG
                select new DTOSelecPorAgrupamento
            {
                DataReferecia      = NG.Key,
                QTDMotosNaData     = NG.Where(x => x.veiculo.GetType() == typeof(Moto)).Count(),
                QTDCarrosNaData    = NG.Where(x => x.veiculo.GetType() == typeof(Carro)).Count(),
                QTDCamioneteNaData = NG.Where(x => x.veiculo.GetType() == typeof(Camionete)).Count()
            };

            return(AgrupamentoPorData.ToList());
        }
        protected void ButtonSecuencial_Click(object sender, EventArgs e)
        {
            try
            {
                SolicitudAvaluos objSolicitudAvaluos = null;
                objSolicitudAvaluos = new NG().ObtenerJustipreciacionAvaluos(this.TextBoxSecuencial.Text.Trim());

                if (objSolicitudAvaluos == null)
                {
                    this.LabelInfoSec.Text = "No existe";
                }
                else
                {
                    string SupRentable = null;
                    //existen justipreciaciones de renta que no tienen SuperficieRentableDictaminado, entonces se tomara la capturada
                    if (objSolicitudAvaluos.SuperficieRentableDictaminado.Value > 0 && String.IsNullOrEmpty(objSolicitudAvaluos.SuperficieRentableDictaminado.ToString()) == false)
                    {
                        //se toma como 1ra opcion, siempre la Sup. rentable dictaminada
                        SupRentable = objSolicitudAvaluos.SuperficieRentableDictaminado.ToString();
                    }
                    else//la sup. rentable que se toma, es la captura por el promovente en la solicitud
                    {
                        SupRentable = objSolicitudAvaluos.SuperficieRentable.ToString();
                    }

                    this.LabelInfoSec.Text = "Estatus: " + objSolicitudAvaluos.Estatus +
                                             "</br>Estado: " + objSolicitudAvaluos.EstadoDescripcion +
                                             "</br>Mpo: " + objSolicitudAvaluos.MunicipioDescripcion +
                                             "</br>CP: " + objSolicitudAvaluos.CP +
                                             "</br># ext: " + objSolicitudAvaluos.NoExterior +
                                             "</br>Fecha Dictamen: " + objSolicitudAvaluos.FechaDictamen +
                                             "</br>Sup. m2 : " + SupRentable +
                                             "</br>Unidad de medida rentable: " + objSolicitudAvaluos.UnidadMedidaRentable +
                                             "</br>Monto Dictaminado $: " + objSolicitudAvaluos.MontoDictaminado;
                }
            }
            catch (Exception ex)
            {
                this.LabelInfoSec.Text = ex.Message;
            }
        }
示例#5
0
 public List <NodeGroup> Get(NG req)
 {
     return(RemotingManager.GetRemoteObject().GetNodeGroups());
 }
示例#6
0
        //interconexion con el BUS
        private bool InterconectarCredencialesConSSO()
        {
            UserName = Request.QueryString["UserName"];
            Token    = Request.QueryString["Token"];

            if (Request.QueryString["DebugMode"] != null)
            {
                //UserName = "******";
                //Token = "organocontrolinterno01";

                //UserName = "******";
                //Token = "promovente01";

                //UserName = "******";
                //Token = "administrador01";

                //UserName = "******";
                //Token = "desa11";

                //UserName = "******";
                //Token = "desa14";

                //UserName = "******";
                //Token = "*****@*****.**";

                UserName = "******";
                Token    = "desa03";

                //UserName = "******";
                //Token = "genguntza";

                //UserName = "******";
                //Token = "desa10";

                //UserName = "******";
                //Token = "desa04";
            }

            Boolean Ok = false;

            if (String.IsNullOrEmpty(UserName) || String.IsNullOrEmpty(Token))
            {
                redireccionSSO();
            }
            else
            {
                ////interconexion con el BUS para ejecutar metodo
                SSO usuario = null;
                try
                {
                    usuario             = new NG().ObtenerUsuario(UserName);
                    Session["Contexto"] = usuario;

                    if (usuario != null)
                    {
                        String RolUsr = UtilContratosArrto.ObtenerNombreRolUsrApp(usuario.LRol);
                        //if (RolUsr == UtilContratosArrto.Roles.OIC.ToString())
                        //    ScriptManager.RegisterStartupScript(this, typeof(Page), "soloLectura", "ValidarSoloLectura('none');", true);
                    }
                    else
                    {
                        //ScriptManager.RegisterStartupScript(this, typeof(Page), "soloLectura", "ValidarSoloLectura('none');", true);
                        //ScriptManager.RegisterStartupScript(this, typeof(Page), "alertUsuario", "alert('No se ha podido recuperar el objeto Contexto del usuario firmado, contacte al administrador del sistema.');", true);
                    }
                    Ok = true;
                }
                catch (Exception ex)
                {
                    string msj = ex.InnerException == null ? ex.Message : ex.InnerException.Message;
                    Session["Msj"] = msj;
                    Response.Redirect("Msj.aspx", false);
                }
            }
            return(Ok);
        }