Exemplo n.º 1
0
        protected void rdClienteUsuario_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            DBConn oConn = new DBConn();

            if (oConn.Open())
            {
                SysClienteUsuario oClienteUsuario = new SysClienteUsuario(ref oConn);
                oClienteUsuario.CodUsuario  = CodUsuario.Value;
                rdClienteUsuario.DataSource = oClienteUsuario.Get();

                oConn.Close();
            }
        }
Exemplo n.º 2
0
        protected void rdCliente_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            DBConn oConn = new DBConn();

            if (oConn.Open())
            {
                SysClienteUsuario oClienteUsuario = new SysClienteUsuario(ref oConn);
                oClienteUsuario.CodUsuario = CodUsuario.Value;
                oClienteUsuario.sNombre    = txtBuscarCliente.Text;
                rdCliente.DataSource       = oClienteUsuario.GetClienteNotInUsuario();

                oConn.Close();
            }
        }
Exemplo n.º 3
0
 protected void rdCliente_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
 {
     switch (e.CommandName)
     {
     case "cmdAgregar":
         string nKeyUsuario = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["nkey_cliente"].ToString();
         DBConn oConn       = new DBConn();
         if (oConn.Open())
         {
             SysClienteUsuario oClienteUsuario = new SysClienteUsuario(ref oConn);
             oClienteUsuario.NkeyUser   = nKeyUsuario;
             oClienteUsuario.CodUsuario = CodUsuario.Value;
             oClienteUsuario.Accion     = "CREAR";
             oClienteUsuario.Put();
             oConn.Close();
         }
         rdClienteUsuario.Rebind();
         rdCliente.Rebind();
         UpdatePanel2.Update();
         break;
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            oIsUsuario = oWeb.ValidaUserAppReport();
            oIsUsuario = oWeb.GetObjUsuario();

            DateTime dTimeNow = DateTime.Now;
            //getMenu(idReportePago, oIsUsuario.CodUsuario, "1");
            //getMenu(idProcesoSeguimiento, oIsUsuario.CodUsuario, "2");
            //getMenu(idCartolas, oIsUsuario.CodUsuario, "3");
            //getMenu(idProcesoNormalizacion, oIsUsuario.CodUsuario, "4");
            //getMenu(idIndicadoresClaves, oIsUsuario.CodUsuario, "5");
            //getMenu(IndClasificacionRiesgo, oIsUsuario.CodUsuario, "6");
            //getMenuAntalis(indAntalis, oIsUsuario.CodUsuario);

            DBConn oConn = new DBConn();

            if (!IsPostBack)
            {
                if (oConn.Open())
                {
                    string            arrNkeyCliente  = string.Empty;
                    SysClienteUsuario oClienteUsuario = new SysClienteUsuario(ref oConn);
                    oClienteUsuario.CodUsuario = oIsUsuario.CodUsuario;
                    DataTable dt = oClienteUsuario.Get();
                    if (dt != null)
                    {
                        foreach (DataRow dRow in dt.Rows)
                        {
                            arrNkeyCliente = (string.IsNullOrEmpty(arrNkeyCliente) ? dRow["nkey_user"].ToString() : arrNkeyCliente + "," + dRow["nkey_user"].ToString());
                        }

                        hdd_arrNkeyCliente.Value = arrNkeyCliente;
                    }
                    dt = null;

                    if (arrNkeyCliente.Split(',').Count() > 0)
                    {
                        hdd_cli_show.Value = "V";
                        bCliente           = true;
                        cCliente oCliente = new cCliente(ref oConn);
                        oCliente.ArrNkeyCliente = arrNkeyCliente;
                        dt = oCliente.GetClientes();

                        if (dt != null)
                        {
                            cmbCliente.Items.Add(new ListItem("<< Seleccione Cliente >>", string.Empty));
                            foreach (DataRow oRow in dt.Rows)
                            {
                                cmbCliente.Items.Add(new ListItem(oRow["snombre"].ToString(), oRow["nkey_cliente"].ToString()));
                            }
                        }
                        dt = null;

                        colClientes.Visible = true;
                    }

                    cDebtUsrAsignados oDebtUsrAsignados = new cDebtUsrAsignados(ref oConn);
                    oDebtUsrAsignados.CodUsuario  = oIsUsuario.CodUsuario;
                    oDebtUsrAsignados.CodConsulta = "23";
                    dt = oDebtUsrAsignados.Get();
                    if (dt != null)
                    {
                        if (dt.Rows.Count > 0)
                        {
                            bDeudor  = ((dt.Rows[0]["filtro_deudor"].ToString() == "V") ? true : false);
                            bHolding = ((dt.Rows[0]["filtro_holding"].ToString() == "V") ? true : false);
                        }
                    }
                    dt = null;

                    //if (bDeudor)
                    //  colDeudor.Visible = true;

                    if (bHolding)
                    {
                        colHolding.Visible = true;
                        cCliente oCliente = new cCliente(ref oConn);
                        oCliente.ArrNkeyCliente = arrNkeyCliente;
                        dt = oCliente.GetHolding();
                        if (dt != null)
                        {
                            if (dt.Rows.Count > 0)
                            {
                                cmbHolding.Visible = true;
                                cmbHolding.Items.Add(new ListItem("<< Seleccione Holding >>", string.Empty));
                                foreach (DataRow oRow in dt.Rows)
                                {
                                    cmbHolding.Items.Add(new ListItem(oRow["holding"].ToString(), oRow["ncodholding"].ToString()));
                                }
                            }
                        }
                    }

                    oConn.Close();
                }

                Log oLog = new Log();
                oLog.IdUsuario = oIsUsuario.CodUsuario;
                oLog.ObsLog    = "REPORTE CLIENTES RETENIDOS";
                oLog.CodEvtLog = "1";
                oLog.AppLog    = "REPORTES DEBTCONTROL";
                oLog.putLog();
            }

            if (oConn.Open())
            {
                if (!string.IsNullOrEmpty(cmbCliente.SelectedValue))
                {
                    cCliente oCliente = new cCliente(ref oConn);
                    oCliente.CodNkey = cmbCliente.SelectedValue;
                    DataTable dt = oCliente.GeCliente();
                    if (dt != null)
                    {
                        if (dt.Rows.Count > 0)
                        {
                            Signomoneda = dt.Rows[0]["signomoneda"].ToString().Trim();
                            Decimales   = dt.Rows[0]["decimales"].ToString();
                        }
                    }
                    dt = null;

                    if (!string.IsNullOrEmpty(Signomoneda))
                    {
                        lblmoneda.Text = "Montos expresados en " + Signomoneda;
                    }
                }

                oConn.Close();
            }
        }
Exemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            oIsUsuario = oWeb.ValidaUserAppReport();
            oIsUsuario = oWeb.GetObjUsuario();
            DateTime dTimeNow = DateTime.Now;
            //getMenu(idReportePago, oIsUsuario.CodUsuario, "1");
            //getMenu(idProcesoSeguimiento, oIsUsuario.CodUsuario, "2");
            //getMenu(idCartolas, oIsUsuario.CodUsuario, "3");
            //getMenu(idProcesoNormalizacion, oIsUsuario.CodUsuario, "4");
            //getMenu(idIndicadoresClaves, oIsUsuario.CodUsuario, "5");
            //getMenu(IndClasificacionRiesgo, oIsUsuario.CodUsuario, "6");
            //getMenuAntalis(indAntalis, oIsUsuario.CodUsuario);

            DBConn oConn = new DBConn();

            if (!IsPostBack)
            {
                if (oConn.Open())
                {
                    string            arrNkeyCliente  = string.Empty;
                    SysClienteUsuario oClienteUsuario = new SysClienteUsuario(ref oConn);
                    oClienteUsuario.CodUsuario = oIsUsuario.CodUsuario;
                    DataTable dt = oClienteUsuario.Get();
                    if (dt != null)
                    {
                        foreach (DataRow dRow in dt.Rows)
                        {
                            arrNkeyCliente = (string.IsNullOrEmpty(arrNkeyCliente) ? dRow["nkey_user"].ToString() : arrNkeyCliente + "," + dRow["nkey_user"].ToString());
                        }

                        hdd_arrNkeyCliente.Value = arrNkeyCliente;
                    }
                    dt = null;

                    if (arrNkeyCliente.Split(',').Count() > 0)
                    {
                        hdd_cli_show.Value = "V";
                        bCliente           = true;
                        cCliente oCliente = new cCliente(ref oConn);
                        oCliente.ArrNkeyCliente = arrNkeyCliente;
                        dt = oCliente.GetClientes();

                        if (dt != null)
                        {
                            cmbCliente.Items.Add(new ListItem("<< Seleccione Cliente >>", string.Empty));
                            foreach (DataRow oRow in dt.Rows)
                            {
                                cmbCliente.Items.Add(new ListItem(oRow["snombre"].ToString(), oRow["nkey_cliente"].ToString()));
                            }
                        }
                        dt = null;

                        colClientes.Visible = true;
                    }

                    oConn.Close();
                }

                RadDatePicker1.DateInput.DateFormat = "dd-MM-yyyy";
                RadDatePicker2.DateInput.DateFormat = "dd-MM-yyyy";
                RadDatePicker1.SelectedDate         = dTimeNow.AddMonths(-1);
                RadDatePicker2.SelectedDate         = dTimeNow;

                Log oLog = new Log();
                oLog.IdUsuario = oIsUsuario.CodUsuario;
                oLog.ObsLog    = "REPORTE DE COPIA CEDIBLE EN DEBTCONTROL";
                oLog.CodEvtLog = "1";
                oLog.AppLog    = "REPORTES DEBTCONTROL";
                oLog.putLog();
            }

            if (oConn.Open())
            {
                if (!string.IsNullOrEmpty(cmbCliente.SelectedValue))
                {
                    cCliente oCliente = new cCliente(ref oConn);
                    oCliente.CodNkey = cmbCliente.SelectedValue;
                    DataTable dt = oCliente.GeCliente();
                    if (dt != null)
                    {
                        if (dt.Rows.Count > 0)
                        {
                            Signomoneda = dt.Rows[0]["signomoneda"].ToString().Trim();
                            Decimales   = dt.Rows[0]["decimales"].ToString();
                        }
                    }
                    dt = null;

                    if (!string.IsNullOrEmpty(Signomoneda))
                    {
                        lblmoneda.Text = "Montos expresados en " + Signomoneda;
                    }
                }

                oConn.Close();
            }
        }