Example #1
0
        public fa_Cliente_Info Get_Info_Cliente()
        {
            try
            {
                fa_Cliente_Info InfoCliente = new fa_Cliente_Info();


                if (cmb_beneficiario.EditValue != null && IdTipo_Persona == Cl_Enumeradores.eTipoPersona.CLIENTE)
                {
                    Info_Beneficiario = list_Beneficiario.FirstOrDefault(v => v.IdBeneficiario == Convert.ToString(cmb_beneficiario.EditValue));
                    fa_Cliente_Bus BusProvee = new fa_Cliente_Bus();

                    InfoCliente = BusProvee.Get_Info_Cliente(param.IdEmpresa, Info_Beneficiario.IdEntidad);
                }



                return(InfoCliente);
            }
            catch (Exception ex)
            {
                string NameMetodo = System.Reflection.MethodBase.GetCurrentMethod().Name;
                MessageBox.Show(NameMetodo + " - " + ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Log_Error_bus.Log_Error(NameMetodo + " - " + ex.ToString());
                return(new fa_Cliente_Info());
            }
        }
        private void load_combos()
        {
            try
            {
                this.tableLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, EjeY));
                this.tableLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 647 - EjeY));

                fa_Cliente_Bus bus_cliente = new fa_Cliente_Bus();
                Lista_Clientes = bus_cliente.Get_List_Clientes(param.IdEmpresa);

                fa_Vendedor_Bus bus_vendedor = new fa_Vendedor_Bus();
                Lista_Vendedores = bus_vendedor.Get_List_Vendedores(param.IdEmpresa);

                cmbCliente.Properties.DataSource    = Lista_Clientes;
                cmbCliente.Properties.DisplayMember = "Nombre_Cliente";
                cmbCliente.Properties.ValueMember   = "IdCliente";

                cmbVendedor.Properties.DataSource    = Lista_Vendedores;
                cmbVendedor.Properties.DisplayMember = "Ve_Vendedor";
                cmbVendedor.Properties.ValueMember   = "IdVendedor";
            }
            catch (Exception ex)
            {
                string NameMetodo = System.Reflection.MethodBase.GetCurrentMethod().Name;
                MessageBox.Show(NameMetodo + " - " + ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Log_Error_bus.Log_Error(NameMetodo + " - " + ex.ToString());
            }
        }
 void ucGe_Menu_event_btnAnular_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     try
     {
         if (info != null)
         {
             if (MessageBox.Show("¿Está seguro que desea anular el Cliente: " + tabla_info.Persona_Info.pe_nombre + " " + tabla_info.Persona_Info.pe_apellido + " ?", "Anulación de Clientes", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
             {
                 if (info.Estado == "A")
                 {
                     string         msg         = "";
                     fa_Cliente_Bus bus_cliente = new fa_Cliente_Bus();
                     info.IdUsuarioUltMod = param.IdUsuario;
                     info.Fecha_UltMod    = DateTime.Now;
                     info.IdUsuarioUltAnu = param.IdUsuario;
                     info.Fecha_UltAnu    = DateTime.Now;
                     bus_cliente.EliminarDB(info, ref msg);
                     MessageBox.Show(msg, "SISTEMA", MessageBoxButtons.OK, MessageBoxIcon.Information);
                     load_Información();
                 }
                 else
                 {
                     MessageBox.Show("No se pudo anular el Cliente: " + tabla_info.Persona_Info.pe_nombre + " " + tabla_info.Persona_Info.pe_apellido + " debido a que ya se encuentra anulado", "Anulación de Clientes", MessageBoxButtons.OK, MessageBoxIcon.Error);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Log_Error_bus.Log_Error(ex.ToString());
     }
 }
        public void CargarCombosXsucurlsa(int IdSucursal)
        {
            try
            {
                fa_Cliente_Bus bus_cliente = new fa_Cliente_Bus();
                Lista_Clientes = bus_cliente.Get_List_Clientes(param.IdEmpresa);
                var CXS = from q in Lista_Clientes
                          where q.IdSucursal == IdSucursal
                          select q;

                this.cmb_cliente.Properties.DataSource = CXS.ToList();

                fa_Vendedor_Bus bus_vendedor = new fa_Vendedor_Bus();
                Lista_Vendedores = bus_vendedor.Get_List_Vendedores(param.IdEmpresa);


                this.cmb_vendedor.Properties.DataSource    = Lista_Vendedores;
                this.cmb_vendedor.Properties.DisplayMember = "Ve_Vendedor";
                this.cmb_vendedor.Properties.ValueMember   = "IdVendedor";
            }
            catch (Exception ex)
            {
                string NameMetodo = System.Reflection.MethodBase.GetCurrentMethod().Name;
                MessageBox.Show(NameMetodo + " - " + ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Log_Error_bus.Log_Error(NameMetodo + " - " + ex.ToString());
            }
        }
Example #5
0
        public void Cargar_cliente()
        {
            try
            {
                fa_Cliente_Bus BusCliente = new fa_Cliente_Bus();

                cmb_cliente.Properties.DataSource = BusCliente.Get_List_Clientes(param.IdEmpresa);
            }
            catch (Exception ex)
            {
            }
        }
Example #6
0
 public frmCxc_XML_Digitalizacion()
 {
     InitializeComponent();
     event_delegate_frmCxc_XML_Digitalizacion_FormClosed += frmCxc_XML_Digitalizacion_event_delegate_frmCxc_XML_Digitalizacion_FormClosed;
     bus_ruta       = new cp_RutaPorEmpresaPorUsuario_Bus();
     blst           = new BindingList <cxc_XML_Documento_Info>();
     ListaTipoCobro = new List <cxc_cobro_tipo_Info>();
     busTipoCobro   = new cxc_cobro_tipo_Bus();
     busDet         = new cxc_XML_DocumentoDet_Bus();
     busCliente     = new fa_Cliente_Bus();
     ListaCliente   = new List <fa_Cliente_Info>();
     busXML         = new cxc_XML_Documento_Bus();
 }
        private void load_Información()
        {
            try
            {
                tb_persona_bus bus_pers = new tb_persona_bus();
                lista_persona = bus_pers.Get_List_Persona();

                fa_Cliente_Bus bus_client = new fa_Cliente_Bus();
                lista_clientes = new BindingList <fa_Cliente_Info>(bus_client.Get_List_Clientes(param.IdEmpresa));
                gridControl_Clientes.DataSource = lista_clientes;
            }
            catch (Exception ex)
            {
                Log_Error_bus.Log_Error(ex.ToString());
            }
        }
Example #8
0
        public void load_combos()
        {
            try
            {
                fa_Cliente_Bus bus_cliente = new fa_Cliente_Bus();

                tb_persona_bus bus_persona = new tb_persona_bus();



                listaPersona = bus_persona.Get_List_Persona();
            }
            catch (Exception ex)
            {
                Log_Error_bus.Log_Error(ex.ToString());
            }
        }
        private void FrmPrd_ObraMantemiento_Load(object sender, EventArgs e)
        {
            try
            {
                // txtCodigo.Text = Bus_Tip_movi.ObtenerIdObra(ref msg).ToString();
                fa_Cliente_Bus         busCateg = new fa_Cliente_Bus();
                List <fa_Cliente_Info> lista    = new List <fa_Cliente_Info>();
                lista = busCateg.Get_List_Clientes(param.IdEmpresa);

                cmb_cliente.Properties.DataSource    = lista;
                cmb_cliente.Properties.DisplayMember = "Nombre_Cliente";
                cmb_cliente.Properties.ValueMember   = "IdCliente";
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error " + ex.Message);
            }
        }
        private void FrmPrd_RegOrdenTaller_Load(object sender, EventArgs e)
        {
            try
            {
                UCOBra.Event_UCObra_Validating += new UCPrd_Obra.delegadoUCObra_Validating(UCOBra_Event_UCObra_Validating);
                ucFa_Cliente_Facturacion1.Size  = new System.Drawing.Size(380, 20);
                //carga_CmbListadoDiseno();
            }
            catch (Exception ex)
            {
                Log_Error_bus.Log_Error(ex.ToString());
            }


            fa_Cliente_Bus         busCateg = new fa_Cliente_Bus();
            List <fa_Cliente_Info> lista    = new List <fa_Cliente_Info>();

            lista = busCateg.Get_List_Clientes(param.IdEmpresa);
        }
Example #11
0
        public void getCabecera()
        {
            try
            {
                infoBodega   = UCfaBodega.get_bodega();
                infoSucursal = UCfaBodega.get_sucursal();

                infocotizacion.IdBodega       = infoBodega.IdBodega;
                infocotizacion.IdSucursal     = infoBodega.IdSucursal;
                infocotizacion.IdCliente      = Convert.ToInt32(UCfaCliente.cmb_cliente.EditValue);
                infocotizacion.cc_tipopago    = (rbtnContado.Checked == true) ? "CON" : "CRE";
                infocotizacion.cc_fecha       = dateFecha.Value;
                infocotizacion.cc_diasPlazo   = Convert.ToInt32(spinEditDiasPlazo.Value);
                infocotizacion.cc_observacion = txtObservacion.Text;
                infocotizacion.cc_interes     = Convert.ToDouble(txtInteres.EditValue);
                infocotizacion.cc_transporte  = Convert.ToDouble(txtTransporte.EditValue);
                infocotizacion.cc_otroValor1  = Convert.ToDouble(txtOtro1.EditValue);
                infocotizacion.cc_otroValor2  = Convert.ToDouble(txtOtro2.EditValue);
                infocotizacion.CodCotizacion  = txtCodigoCot.Text;
                infocotizacion.IdVendedor     = Convert.ToInt32(UCfaCliente.cmb_vendedor.EditValue);
                fa_Cliente_Bus   clientebus = new fa_Cliente_Bus();
                fa_Vendedor_Info vendedor   = new fa_Vendedor_Info();
                infoCliente.IdCliente = Convert.ToInt32(UCfaCliente.cmb_cliente.EditValue);
                clientebus.ConsultarClienteVendedor(param.IdEmpresa, ref infoCliente, ref vendedor);
                infocotizacion.cc_dirigidoA        = UCfaCliente.cmb_cliente.Text;
                infocotizacion.cc_fechaVencimiento = dateFechaVencimiento.Value;
                infocotizacion.IdEmpresa           = param.IdEmpresa;
                infocotizacion.IdUsuario           = param.IdUsuario;
                infocotizacion.ip     = param.ip;
                infocotizacion.nom_pc = param.nom_pc;
                infocotizacion.iva    = param.iva.porcentaje;
                infocotizacion.total  = Convert.ToDouble(txtTotal.EditValue);
            }
            catch (Exception ex)
            {
                Log_Error_bus.Log_Error(ex.ToString());
                MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Example #12
0
        private void guardar()
        {
            try
            {
                string         msg         = "";
                Boolean        Res         = true;
                fa_Cliente_Bus bus_cliente = new fa_Cliente_Bus();
                tb_persona_bus bus_persona = new tb_persona_bus();



                get_Cliente();
                switch (_Accion)
                {
                case Cl_Enumeradores.eTipo_action.grabar:

                    if (ValidarCajasTexto() == true)
                    {
                        return;
                    }

                    if (IdCliente_Registrado == true)
                    {
                        Res = bus_cliente.ModificarDB(info, ref msg);
                        listaCliente.Remove(info_tmp);
                        listaCliente.Add(info);
                    }
                    else
                    {
                        //Res = bus_cliente.GrabarDB(info, info_persona, ref id_persona, ref id_cliente, ref msg);
                        Res = bus_cliente.GrabarDB(info, ref id_persona, ref id_cliente, ref msg);
                    }

                    this.lbl_id_cliente.Text = id_cliente.ToString();
                    this.lbl_id_persona.Text = id_persona.ToString();

                    if (!Res)
                    {
                        MessageBox.Show("Error: " + msg, "SISTEMA", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                    else
                    {
                        MessageBox.Show("Se Guardo Exitosamente el Cliente", "SISTEMA", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        txt_cedula.Enabled = false;
                    }

                    break;

                case Cl_Enumeradores.eTipo_action.actualizar:
                    Res = bus_cliente.ModificarDB(info, ref msg);
                    if (!Res)
                    {
                        MessageBox.Show("Error: " + msg, "SISTEMA", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                    else
                    {
                        MessageBox.Show("Se Actualizo Exitosamente el Cliente", "SISTEMA", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                    break;

                case Cl_Enumeradores.eTipo_action.Anular:

                    break;

                case Cl_Enumeradores.eTipo_action.consultar:

                    break;
                }
            }
            catch (Exception ex)
            {
                Log_Error_bus.Log_Error(ex.ToString());
            }
        }