示例#1
0
 public void Get()
 {
     try
     {
         _Info.IdEmpresa         = param.IdEmpresa;
         _Info.IdSucursal        = UCSucursal.get_IdSucursal();
         _Info.IdBodega          = UCSucursal.get_IdBodega();
         _Info.IdCliente         = ucFa_ClienteCmb.get_ClienteInfo().IdCliente;
         _Info.gi_fecha          = Convert.ToDateTime(dateFecha.Value.ToShortDateString());
         _Info.gi_fech_venc      = _Info.gi_fecha;
         _Info.gi_FecIniTraslado = Convert.ToDateTime(dtpFecIniTrasl.Value.ToShortDateString());
         _Info.gi_FecFinTraslado = Convert.ToDateTime(dtpFecFinTrasl.Value.ToShortDateString());
         _Info.CodGuiaRemision   = txtCodigo.Text;
         _Info.IdVendedor        = Convert.ToInt32(ultraComboEditorTransportista.EditValue);
         _Info.IdTransportista   = (decimal)ultraComboEditorTransportista.EditValue;
         _Info.gi_Observacion    = txtObservacion.Text;
         _Info.placa             = txtNumPlaca.Text;
         _Info.Direccion_Origen  = txtorigen.Text;
         _Info.ListaDetalle      = lista_guia_detalle.ToList();
     }
     catch (Exception ex)
     {
         Log_Error_bus.Log_Error(ex.ToString());
     }
 }
示例#2
0
 private void UCSucursal_Event_cmb_sucursal1_EditValueChanged(object sender, EventArgs e)
 {
     try
     {
         info_sucursal = (tb_Sucursal_Info)UCSucursal.get_sucursal();
         if (info_sucursal != null)
         {
             txtorigen.Text = info_sucursal.Su_Direccion;
         }
     }
     catch (Exception)
     {
         MessageBox.Show("Ha ocurrido un error comuniquese con sistema", param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
示例#3
0
 public void cargarNumDoc()
 {
     try
     {
         UCNumDoc.IdTipoDocumento = Cl_Enumeradores.eTipoDocumento_Talonario.FACT;
         if (UCSucursal.get_sucursal() != null && UCSucursal.get_bodega() != null)
         {
             UCNumDoc.IdEstablecimiento = UCSucursal.get_sucursal().Su_CodigoEstablecimiento;
             UCNumDoc.IdPuntoEmision    = UCSucursal.get_bodega().cod_punto_emision;
             UCNumDoc.Get_Primer_Documento_no_usado();
         }
     }
     catch (Exception ex)
     {
         string NameMetodo = System.Reflection.MethodBase.GetCurrentMethod().Name;
         NameMetodo = NameMetodo + " - " + ex.ToString();
         MessageBox.Show(NameMetodo + " " + param.Get_Mensaje_sys(enum_Mensajes_sys.Error_comunicarse_con_sistemas)
                         , param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
         Log_Error_bus.Log_Error(NameMetodo + " - " + ex.ToString());
     }
 }
示例#4
0
 public void Set()
 {
     try
     {
         txtCodigo.Text       = SetInfo.CodGuiaRemision;
         dateFecha.Value      = SetInfo.gi_fecha;
         dtpFecIniTrasl.Value = SetInfo.gi_FecIniTraslado;
         dtpFecFinTrasl.Value = SetInfo.gi_FecFinTraslado;
         ultraComboEditorTransportista.EditValue = SetInfo.IdTransportista;
         ucFa_ClienteCmb.set_ClienteInfo(SetInfo.IdCliente);
         UCSucursal.set_Idsucursal(SetInfo.IdSucursal);
         UCSucursal.set_Idbodega(SetInfo.IdSucursal, SetInfo.IdBodega);
         txtObservacion.Text           = SetInfo.gi_Observacion;
         txtNumPlaca.Text              = SetInfo.placa;
         SetInfo.ListaDetalle          = BusDetalle.Get_List_guia_remision_det(SetInfo.IdEmpresa, SetInfo.IdSucursal, SetInfo.IdBodega, SetInfo.IdGuiaRemision);
         gridControlGuia.DataSource    = SetInfo.ListaDetalle;
         lista_factura_x_guia          = bus_factura_x_guia.Get_List_factura_con_guia(SetInfo.IdEmpresa, SetInfo.IdSucursal, SetInfo.IdBodega, Convert.ToInt32(SetInfo.IdGuiaRemision));
         gridControlFactura.DataSource = lista_factura_x_guia;
     }
     catch (Exception ex)
     {
         Log_Error_bus.Log_Error(ex.ToString());
     }
 }
示例#5
0
 private void btnbuscar_Click(object sender, EventArgs e)
 {
     try
     {
         lista_factura_x_guia          = bus_factura_x_guia.Get_List_factura_sin_guia(param.IdEmpresa, UCSucursal.get_IdBodega(), UCSucursal.get_IdBodega(), Convert.ToInt32(ucFa_ClienteCmb.get_ClienteInfo().IdCliente), dtpdesde.Value, dtphasta.Value);
         gridControlFactura.DataSource = lista_factura_x_guia;
     }
     catch (Exception)
     {
     }
 }
示例#6
0
        public Boolean validar()
        {
            try
            {
                UCSucursal.Focus();
                cmbTerminoPago.Focus();

                double TotalPorcent = 0;

                if (TotalPorcent > 100)
                {
                    MessageBox.Show("La suma del porcentaje de formas de cobro no puede exeder el 100% ");; return(false);
                }
                ;

                if (cmb_vendedor.EditValue == null)
                {
                    MessageBox.Show("No ha Ingresado Vendedor", "", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return(false);
                }

                if (ucFa_ClienteCmb.get_ClienteInfo() == null)
                {
                    MessageBox.Show("No ha Ingresado Cliente", "", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return(false);
                }

                if (txt_observacion.Text == "")
                {
                    MessageBox.Show("No ha Ingresado la Observacion"); txt_observacion.Focus(); return(false);
                }


                if (cmbCaja.EditValue == null || Convert.ToString(cmbCaja.EditValue) == "" || Convert.ToInt32(cmbCaja.EditValue) == 0)
                {
                    MessageBox.Show("Ingrese la caja ", param.Nombre_sistema);
                    return(false);
                }

                if (this.cmbTerminoPago.EditValue == null || Convert.ToString(cmbTerminoPago.EditValue) == "")
                {
                    MessageBox.Show("Ingrese el Término de Pago ", param.Nombre_sistema);
                    return(false);
                }

                int count1 = blst_factura_det.Count(v => v.IdProducto > 0);

                if (count1 == 0)
                {
                    MessageBox.Show("No ha agregado Ningún Producto", param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return(false);
                }
                int count2 = ucFa_FormaPago_x_Factura.Get_List_factura_x_formaPago().Count();

                if (count2 == 0)
                {
                    MessageBox.Show("No ha seleccionado forma de pago", param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return(false);
                }

                foreach (var item in blst_factura_det)
                {
                    if (item.IdProducto != 0)
                    {
                        in_Producto_Info Info_producto = lst_producto.FirstOrDefault(q => q.IdProducto == item.IdProducto);


                        if (item.vt_cantidad == 0)
                        {
                            MessageBox.Show("El item " + Info_producto.pr_descripcion + " registra valores de cantidad en 0. Por favor ingrese la cantidad ", param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                            return(false);
                        }
                    }
                }

                if (UCNumDoc.Get_Info_Talonario().NumDocumento == null)
                {
                    return(false);

                    if (UCNumDoc.Get_Info_Talonario().NumDocumento == null)
                    {
                        return(false);
                    }
                }

                return(true);
            }
            catch (Exception ex)
            {
                string NameMetodo = System.Reflection.MethodBase.GetCurrentMethod().Name;
                NameMetodo = NameMetodo + " - " + ex.ToString();
                MessageBox.Show(NameMetodo + " " + param.Get_Mensaje_sys(enum_Mensajes_sys.Error_comunicarse_con_sistemas)
                                , param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
                Log_Error_bus.Log_Error(NameMetodo + " - " + ex.ToString());
                return(false);
            }
        }