Example #1
0
 private void cargagrid()
 {
     try
     {
         List <com_comprador_Info> LstC = new List <com_comprador_Info>();
         LstC = BusC.Get_List_comprador(param.IdEmpresa);
         gridControlComprador.DataSource = LstC;
     }
     catch (Exception ex)
     {
         Log_Error_bus.Log_Error(ex.ToString());
         MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Example #2
0
 private void CargarCombos()
 {
     try
     {
         de_Fecha.DateTime = DateTime.Now.Date;
         lst_producto      = bus_prod.GetListCombo(param.IdEmpresa);
         cmbProducto.Properties.DataSource  = lst_producto;
         cmbUnidad.Properties.DataSource    = bus_unidad.Get_list_UnidadMedida();
         cmbProveedor.Properties.DataSource = bus_prov.GetListCombo(param.IdEmpresa);
         cmbTermino.Properties.DataSource   = bus_termino.Get_List_TerminoPago();
         cmbComprador.Properties.DataSource = bus_comp.Get_List_comprador(param.IdEmpresa);
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #3
0
        void cargar_Comprador()
        {
            try
            {
                listComprador = new List <com_comprador_Info>();
                listComprador = BusComprador.Get_List_comprador(param.IdEmpresa);
                cmb_comprador.Properties.DataSource = listComprador;

                var lst = listComprador.FirstOrDefault(q => q.IdUsuario_com == param.IdUsuario);
                if (lst != null)
                {
                    cmb_comprador.EditValue = lst.IdComprador;
                }
            }
            catch (Exception ex)
            {
                string NameMetodo = System.Reflection.MethodBase.GetCurrentMethod().Name + " " + this.Name;
                MessageBox.Show(NameMetodo + " - " + ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Log_Error_bus.Log_Error(NameMetodo + " - " + ex.ToString());
            }
        }
Example #4
0
        private void CargarCombos()
        {
            try
            {
                deHasta.DateTime = DateTime.Now.Date;
                deDesde.DateTime = DateTime.Now.Date.AddDays(-7);
                cmbComprador.Properties.DataSource   = bus_comprador.Get_List_comprador(param.IdEmpresa);
                cmbProveedor.Properties.DataSource   = bus_proveedor.GetListCombo(param.IdEmpresa);
                cmbSolicitante.Properties.DataSource = bus_solicitante.Get_List_Solicitante(param.IdEmpresa);

                var solicitante = bus_solicitante.GetInfo(param.IdEmpresa, param.IdUsuario);
                if (solicitante != null)
                {
                    cmbSolicitante.EditValue = solicitante.IdSolicitante;
                }

                cmbProducto.Properties.DataSource = bus_producto.GetListCombo(param.IdEmpresa);
                txtIdOrdenPedido.EditValue        = IdOrdenPedido;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }