예제 #1
0
 public void LlenaCombo(Int32 Id1, Int32 Id2, Int32 Id3, int?Id4, int?Id5, string conexion, string SP, ref Telerik.Web.UI.RadComboBox RadComboBox)
 {
     try
     {
         System.Collections.Generic.List <Comun> Lista = new System.Collections.Generic.List <Comun>();
         CapaDatos.CD__Comun claseCapaDatos            = new CapaDatos.CD__Comun();
         claseCapaDatos.LlenaCombo(Id1, Id2, Id3, Id4, Id5, SP, conexion, ref Lista);
         if (Lista.Count > 0)
         {
             RadComboBox.DataSource     = Lista;
             RadComboBox.DataValueField = "Id";
             if (Lista.ToArray()[0].Relacion != "sin_relacion")
             {
                 RadComboBox.DataTextField = "Relacion";
             }
             else
             {
                 RadComboBox.DataTextField = "Descripcion";
             }
             RadComboBox.DataBind();
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #2
0
 public string Actual(int Id_Emp, int Id_Cd, string Emp_Cnx, int?Cte, int?Prd, int?Terr, string mov, DateTime Fecha)
 {
     try
     {
         double actual  = 0;
         double actual2 = 0;
         CapaDatos.CD__Comun claseCapaDatos = new CapaDatos.CD__Comun();
         if (mov == "1")
         {
             claseCapaDatos.Actual(Id_Emp, Id_Cd, Emp_Cnx, Cte, Prd, Terr, "BiFacturado", Fecha, ref actual);
         }
         else if (mov == "2")
         {
             claseCapaDatos.Actual(Id_Emp, Id_Cd, Emp_Cnx, Cte, Prd, Terr, "BiComodato", Fecha, ref actual);
         }
         else
         {
             claseCapaDatos.Actual(Id_Emp, Id_Cd, Emp_Cnx, Cte, Prd, Terr, "BiGlobal", Fecha, ref actual);
         }
         return((actual + actual2).ToString());
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #3
0
 public void CorreoRecuperaDatos(ref CentroDistribucion Oficina, ref ConfiguracionGlobal Configuracion, string conexion)
 {
     try
     {
         CapaDatos.CD__Comun claseCapaDatos = new CapaDatos.CD__Comun();
         claseCapaDatos.CorreoRecuperaDatos(ref Oficina, ref Configuracion, conexion);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #4
0
 public void Deshabilitar(Catalogo ct, string Conexion, ref bool verificador)
 {
     try
     {
         System.Collections.Generic.List <Comun> Lista = new System.Collections.Generic.List <Comun>();
         CapaDatos.CD__Comun claseCapaDatos            = new CapaDatos.CD__Comun();
         claseCapaDatos.Deshabilitar(ct, Conexion, ref verificador);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #5
0
 public string Maximo(int Id_Emp, string Tabla, int naturaleza, string Columna, string Conexion, string SP)
 {
     try
     {
         string maximo = "";
         System.Collections.Generic.List <Comun> Lista = new System.Collections.Generic.List <Comun>();
         CapaDatos.CD__Comun claseCapaDatos            = new CapaDatos.CD__Comun();
         claseCapaDatos.Maximo(Id_Emp, Tabla, naturaleza, Columna, SP, Conexion, ref maximo);
         return(maximo);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #6
0
        public void LlenaCombo(Int32 Id1, Int32 Id2, string conexion, string SP, ref Telerik.Web.UI.RadComboBox RadComboBox, params bool[] claveString)
        {
            try
            {
                System.Collections.Generic.List <Comun> Lista = new System.Collections.Generic.List <Comun>();
                CapaDatos.CD__Comun claseCapaDatos            = new CapaDatos.CD__Comun();
                claseCapaDatos.LlenaCombo(Id1, Id2, SP, conexion, ref Lista, claveString);

                if (Lista.Count > 0)
                {
                    RadComboBox.DataSource = Lista;
                    if (claveString.Length > 0)
                    {
                        if (claveString[0])
                        {
                            RadComboBox.DataValueField = "IdStr";
                        }
                        else
                        {
                            RadComboBox.DataValueField = "Id";
                        }
                    }
                    else
                    {
                        RadComboBox.DataValueField = "Id";
                    }
                    if (Lista.ToArray()[0].Relacion != "sin_relacion")
                    {
                        RadComboBox.DataTextField = "Relacion";
                    }
                    else
                    {
                        RadComboBox.DataTextField = "Descripcion";
                    }

                    RadComboBox.DataBind();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #7
0
 public void LlenaCombo(Int32 Id1, string conexion, string SP, ref Telerik.Web.UI.RadComboBox RadComboBox)
 {
     try
     {
         System.Collections.Generic.List <Comun> Lista = new System.Collections.Generic.List <Comun>();
         CapaDatos.CD__Comun claseCapaDatos            = new CapaDatos.CD__Comun();
         claseCapaDatos.LlenaCombo(Id1, SP, conexion, ref Lista);
         if (Lista.Count > 0)
         {
             RadComboBox.DataSource     = Lista;
             RadComboBox.DataValueField = "Id";
             RadComboBox.DataTextField  = "Descripcion";
             RadComboBox.DataBind();
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #8
0
        public void LlenaComboTabla(Int32 Id1, Int32 Id2, Int32 Id3, string conexion, string SP, ref Telerik.Web.UI.RadComboBox RadComboBox)
        {
            try
            {
                System.Collections.Generic.List <Comun> Lista = new System.Collections.Generic.List <Comun>();
                CapaDatos.CD__Comun claseCapaDatos            = new CapaDatos.CD__Comun();
                claseCapaDatos.LlenaComboTabla(Id1, Id2, Id3, SP, conexion, ref Lista);

                for (Int32 i = 0; i <= Lista.Count - 1; i++)
                {
                    Telerik.Web.UI.RadComboBoxItem Item = new Telerik.Web.UI.RadComboBoxItem();
                    Item.Value = Lista[i].Id.ToString();
                    Item.Text  = Lista[i].Descripcion;
                    RadComboBox.Items.Add(Item);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }