private void cmbSucursal_EditValueChanged(object sender, EventArgs e) { try { if (Convert.ToInt32(cmbSucursal.EditValue) <= 0) { cmbBodega.Properties.DataSource = null; } else { if (bodegas != null) { tb_Bodega_Info bod = new tb_Bodega_Info(); bod.bo_Descripcion = "TODAS LAS BODEGAS"; bod.IdBodega = 0; bodegas.Add(bod); cmbBodega.Properties.DataSource = bodegas; } } //setear el grid kardex = new List <in_movi_inve_detalle_x_Producto_CusCider_Info>(); gridCtrlKardex.DataSource = kardex; } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); } }
public void set_Bodega(tb_Bodega_Info info_bodega) { try { CargarCombo(); this.lbl_id_sucursal.Text = info_bodega.IdSucursal.ToString(); this.lbl_id_bodega.Text = info_bodega.IdBodega.ToString(); this.txt_bodega.Text = info_bodega.bo_Descripcion; this.chk_bodega.Checked = (info_bodega.bo_esBodega == "S") ? true : false; this.chk_manejaFacturacion.Checked = (info_bodega.bo_manejaFacturacion == "S") ? true : false; this.chk_estado.Checked = (info_bodega.Estado == true) ? true : false; this.txtPuntoEmi.EditValue = info_bodega.cod_punto_emision; ucCon_CentroCosto_ctas_Movi.set_item(info_bodega.IdCentroCosto); cmbEstadoAproba.EditValue = info_bodega.IdEstadoAproba_x_Ing_Egr_Inven; this.txt_cod_bodega.Text = info_bodega.cod_bodega; if (!chk_estado.Checked) { ucGe_Menu.Visible_btnGuardar = false; } info = info_bodega; cmb_ctacble_Inv.set_IdCtaCble(info_bodega.IdCtaCtble_Inve); cmb_ctacble_costo.set_IdCtaCble(info_bodega.IdCtaCtble_Costo); } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void cargar_sucursal_bodega_x_cta() { try { var Sucu = Sucursales.Get_List_Sucursal(param.IdEmpresa); var Lista = Bodega_B.Get_List_Bodega(param.IdEmpresa); int i = 1; foreach (var item in Sucu) { tb_Bodega_Info Bodega_I = new tb_Bodega_Info(); Bodega_I.NomSucursal = item.Su_Descripcion; Bodega_I.IdSucursal = 0; Bodega_I.IdBodega = i; Bodega_I.bo_Descripcion = item.Su_Descripcion; i++; Lista.Add(Bodega_I); } int c = Sucu.Count + 1; Lista.ForEach(v => { if (v.IdSucursal != 0) { v.IdBodega = c; c++; } }); ListaData = new BindingList <tb_Bodega_Info>(Lista); treeList1.DataSource = ListaData; treeList1.ExpandAll(); } catch (Exception ex) { MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
void ucGe_Menu_Mantenimiento_x_usuario_event_btnNuevo_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { try { info = new fa_pedido_Info(); info_sucursal = new tb_Sucursal_Info(); info_sucursal = ucGe_Menu_Mantenimiento_x_usuario.getSucursal_Info; info_bodega = new tb_Bodega_Info(); info_bodega = ucGe_Menu_Mantenimiento_x_usuario.getBodega_Info; info.IdSucursal = ucGe_Menu_Mantenimiento_x_usuario.getIdSucursal; info.IdBodega = 1;// ucGe_Menu_Mantenimiento_x_usuario.getIdBodega; frm = new frmFa_Pedido_Mant(); frm.Event_frmFA_Pedido_Mant_FormClosing += new frmFa_Pedido_Mant.delegate_frmFA_Pedido_Mant_FormClosing(frm_Event_frmFA_Pedido_Mant_FormClosing); frm.idsucursal = info.IdSucursal; frm.idbodega = info.IdBodega; frm.Accion = Cl_Enumeradores.eTipo_action.grabar; frm.MdiParent = this.MdiParent; frm.Show(); CargaGrid(param.IdEmpresa, ucGe_Menu_Mantenimiento_x_usuario.fecha_desde, ucGe_Menu_Mantenimiento_x_usuario.fecha_hasta); } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); } }
private void cargarData() { try { _sucuI = UCSucu.get_sucursal(); idSucuIni = _sucuI.IdSucursal; idSucuFin = _sucuI.IdSucursal; _bodegaI = UCSucu.get_bodega(); idBodegaIni = _bodegaI.IdBodega; idBodegaFin = idBodegaIni; idTipoMoviIni = Convert.ToInt32(cmbTipoMoviInven.SelectedValue); idTipoMoviFin = idTipoMoviIni; fechaIni = dtpDesde.Value; fechaFin = dtpHasta.Value; listMoviInve = MoviInven.Obtener_list_Movi_inven(param.IdEmpresa, idSucuIni, idSucuFin, idBodegaIni , idBodegaFin, idTipoMoviIni, idTipoMoviFin, fechaIni, fechaFin); gridControl.DataSource = listMoviInve; } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); } }
void ucGe_Menu_Mantenimiento_x_usuario_event_btnModificar_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { try { tb_Sucursal_Info InfoSu = new tb_Sucursal_Info(); tb_Bodega_Info InfoBo = new tb_Bodega_Info(); InfoSu = ucGe_Menu_Mantenimiento_x_usuario.getSucursal_Info; InfoBo = ucGe_Menu_Mantenimiento_x_usuario.getBodega_Info; frm = new frmFa_Pedido_Mant(InfoSu.IdSucursal, 1); frm.Event_frmFA_Pedido_Mant_FormClosing += new frmFa_Pedido_Mant.delegate_frmFA_Pedido_Mant_FormClosing(frm_Event_frmFA_Pedido_Mant_FormClosing); info.lista_detalle = pedido_det_bus.Get_List_pedido_det(param.IdEmpresa, InfoSu.IdSucursal, InfoBo.IdBodega, info.IdPedido); frm.obj = info; if (info.Estado == "I") { frm.Accion = Cl_Enumeradores.eTipo_action.consultar; } else { frm.Accion = Cl_Enumeradores.eTipo_action.actualizar; } frm.MdiParent = this.MdiParent; frm.Show(); } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); } }
void llamaFR_Bodega() { try { var c = gridView_ParamXCheqProtesto.GetFocusedRowCellValue(colpa_IdSucursal_x_default_x_cheqProtes); if (c == null) { MessageBox.Show("Antes de Seleccionar la Bodega debe seleccionar la Sucursal..", "SISTEMA", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { frmFa_Bodega_Consulta fr = new frmFa_Bodega_Consulta(param.IdEmpresa, Convert.ToInt32(c)); fr.ShowDialog(); Bodega_I = fr.Bodega_I; if (Bodega_I != null) { limpiarCell("bodega"); gridView_ParamXCheqProtesto.SetFocusedRowCellValue(colpa_IdBodega_x_default_x_cheqProtes, Bodega_I.IdBodega); gridView_ParamXCheqProtesto.SetFocusedRowCellValue(colBodega, Bodega_I.bo_Descripcion); } } } 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()); } }
private void frmIN_MovimientoInventarioTipoXBodegaxCtaCtble_Load(object sender, EventArgs e) { try { var Sucu = Sucursales.Obtener_Sucursal(param.IdEmpresa); var Lista = Bodega_B.Obtener_BodegasTodas(param.IdEmpresa); int i = 1; foreach (var item in Sucu) { tb_Bodega_Info Bodega_I = new tb_Bodega_Info(); Bodega_I.NomSucursal = item.Su_Descripcion; Bodega_I.IdSucursal = 0; Bodega_I.IdBodega = i; Bodega_I.bo_Descripcion = item.Su_Descripcion; i++; Lista.Add(Bodega_I); } int c = Sucu.Count + 1; Lista.ForEach(v => { if (v.IdSucursal != 0) { v.IdBodega = c; c++; } }); ListaData = new BindingList <tb_Bodega_Info>(Lista); treeList1.DataSource = ListaData; treeList1.ExpandAll(); } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); } }
private void gridViewBodega_RowCellStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowCellStyleEventArgs e) { try { Bodega = (tb_Bodega_Info)gridViewBodega.GetFocusedRow(); } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.ToString()); } try { var data = gridViewBodega.GetRow(e.RowHandle) as tb_Bodega_Info; if (data == null) { return; } if (data.Estado == false) { e.Appearance.ForeColor = Color.Red; } } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.ToString()); } }
public Boolean VerificarSiBodegaTieneMovimientos(tb_Bodega_Info info, ref string msg) { try { using (EntitiesInventario entitie = new EntitiesInventario()) { int cantidad = entitie.in_movi_inve.Count(v => v.IdEmpresa == info.IdEmpresa && v.IdSucursal == info.IdSucursal && v.IdBodega == info.IdBodega); if (cantidad != 0) { msg = "No se puede anular bodega debido a que tiene movimientos"; return(true); } else { { return(false); } } } } catch (Exception ex) { string arreglo = ToString(); tb_sis_Log_Error_Vzen_Data oDataLog = new tb_sis_Log_Error_Vzen_Data(); tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now); oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje); mensaje = ex.ToString() + " " + ex.Message; throw new Exception(ex.ToString()); } }
private void limpiar() { try { this.txtcodigoAjuste.Text = ""; this.txtNumAjuste.Text = "0"; this.txtObservacion.Text = ""; _sucursalInfo = null; _bodegaInfo = null; dtpFecha.Value = DateTime.Now; lblAnulado.Visible = false; _movi_inve_detalle_List_Info.Clear(); _movi_inve_Info = null; //cmb_tipoMoviInven.SelectedValue = -999; this.UCGridDetalleProduc.LimpiarGrid(); } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); } }
private void Punto_Venta(int id_pvta, string pvta, Boolean estado, string cod_punto_emision, string vta, string bod, Cl_Enumeradores.eTipo_action accion) { try { frmFa_Bodega frm = new frmFa_Bodega(); frm.set_Accion(accion); tb_Bodega_Info info_pvta = new tb_Bodega_Info(); info_pvta.IdEmpresa = param.IdEmpresa; info_pvta.IdSucursal = Convert.ToInt32(this.lbl_id_sucursal.Text); info_pvta.IdBodega = (id_pvta != 0) ? id_pvta : 0; info_pvta.bo_Descripcion = (pvta != "") ? pvta : ""; info_pvta.cod_punto_emision = cod_punto_emision; info_pvta.bo_manejaFacturacion = vta; info_pvta.bo_esBodega = bod; info_pvta.Estado = estado; info_pvta.ip = info.ip; info_pvta.nom_pc = info.nom_pc; info_pvta.IdUsuario = info.IdUsuario; info_pvta.IdUsuarioUltAnu = info.IdUsuarioUltAnu; info_pvta.IdUsuarioUltMod = info.IdUsuarioUltMod; info_pvta.Fecha_Transac = info.Fecha_Transac; info_pvta.Fecha_UltAnu = info.Fecha_UltAnu; info_pvta.Fecha_UltMod = info.Fecha_UltMod; frm.set_Bodega(info_pvta); frm.ShowDialog(); } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
void ucIn_Sucursal_Bodega1_Event_cmb_bodega1_EditValueChanged(object sender, EventArgs e) { try { gridControlActivoFijo.DataSource = null; BLst_det_info = new BindingList <in_Orden_servicio_x_Activo_fijo_det_Info>(); Bodega_info = ucIn_Sucursal_Bodega1.get_bodega(); Sucursal_info = ucIn_Sucursal_Bodega1.get_sucursal(); if (Bodega_info != null && Sucursal_info != null) { Lst_cmb_Producto = Lst_Producto_info.Where(q => q.IdSucursal == Sucursal_info.IdSucursal && q.IdBodega == Bodega_info.IdBodega).ToList(); cmb_Producto.DataSource = Lst_cmb_Producto; gridControlActivoFijo.DataSource = BLst_det_info; } else { cmb_Producto.DataSource = Lst_Producto_info; } } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
void ChangeCmbSucu() { try { // if (Cl_Enumeradores.eTipo_action.grabar == _Accion) if (Cl_Enumeradores.eTipo_action.grabar == enu) { info_sucursal = new tb_Sucursal_Info(); //Obtenemos el objeto info de la sucursal del control info_sucursal = ucIn_Sucursal_Bodega1.get_sucursal(); info_bodega = new tb_Bodega_Info(); //Obtenemos el objeto info de la bodega del control info_bodega = ucIn_Sucursal_Bodega1.get_bodega(); } if (info_sucursal.IdSucursal != 0 && info_bodega.IdBodega != 0) { repositoryCmbProduct.DataSource = lstProdu = new BindingList <in_Producto_Info>(BusProducto.Get_list_Producto(param.IdEmpresa, info_sucursal.IdSucursal, info_bodega.IdBodega)); } } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); } }
private void CargaGrid(int idempresa, DateTime fecha_ini, DateTime fecha_fin) { try { info_sucursal = ucGe_Menu_Mantenimiento_x_usuario.getSucursal_Info; info_bodega = ucGe_Menu_Mantenimiento_x_usuario.getBodega_Info; lista_pedido = new List <fa_pedido_Info>(); gridControlPedido.Refresh(); lista_pedido = bus_pers.Get_List_pedido(idempresa, fecha_ini, fecha_fin , info_sucursal.IdSucursal, info_bodega.IdBodega); //var sele = from q in lista_pedido // orderby q.IdPedido descending // select q; // gridControlPedido.DataSource = (List<fa_pedido_Info>)sele.ToList(); bindingSource1.DataSource = lista_pedido; //(List<fa_pedido_Info>)sele.ToList(); gridControlPedido.DataSource = lista_pedido; //bindingSource1; } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); } }
private void cmbSucursal_EditValueChanged(object sender, EventArgs e) { try { if (Convert.ToInt32(cmbSucursal.EditValue) <= 0) { cmbBodega.Properties.DataSource = null; } else { bodegas = busBod.Obtener_Bodegas(param.IdEmpresa, Convert.ToInt32(cmbSucursal.EditValue)); if (bodegas != null) { tb_Bodega_Info bod = new tb_Bodega_Info(); bod.bo_Descripcion = "TODAS LAS BODEGAS"; bod.IdBodega = 0; bodegas.Add(bod); cmbBodega.Properties.DataSource = bodegas; } } //setear el grid items = new List <in_movi_inve_detalle_x_Producto_CusCider_Info>(); gridCtrlConsulta.DataSource = items; chkTodos.Checked = false; } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); } }
public in_ajusteFisico_Info Get_info() { try { Info_AjusteFisico = new Info.Inventario.in_ajusteFisico_Info(); Info_AjusteFisico.IdEmpresa = param.IdEmpresa; Info_AjusteFisico.IdAjusteFisico = txtNumAjusteFisico.Text == "" ? 0 : Convert.ToDecimal(txtNumAjusteFisico.Text); gridViewAjusteInventario.ActiveFilterString = ""; Info_Bodega = Ctrl_SucBod.get_bodega(); Info_Sucursal = Ctrl_SucBod.get_sucursal(); Info_AjusteFisico.Observacion = txtObservacion.Text; Info_AjusteFisico.IdBodega = Info_Bodega.IdBodega; Info_AjusteFisico.IdSucursal = Info_Sucursal.IdSucursal; Info_AjusteFisico.IdMovi_inven_tipo_Egr = Ctrl_MoviEgreso.get_TipoMoviInvInfo().IdMovi_inven_tipo; Info_AjusteFisico.IdMovi_inven_tipo_Ing = Ctrl_MoviIngreso.get_TipoMoviInvInfo().IdMovi_inven_tipo; Info_AjusteFisico.Estado = (lblAnulado.Visible == true) ? "I" : "A"; Info_AjusteFisico.Fecha = dtp_fecha.Value; Info_AjusteFisico.IdEstadoAprobacion = ucIn_Catalogos_Cmb1.Get_CatalogosInfo().IdCatalogo; decimal En = 0; if (decimal.TryParse(txtNumMoviAjustEgreso.Text, out En)) { Info_AjusteFisico.IdNumMovi_Egr = En; } decimal Ing = 0; if (decimal.TryParse(txtMoviAjustIngreso.Text, out Ing)) { Info_AjusteFisico.IdNumMovi_Ing = Ing; } foreach (var item in BindingList_Producto) { in_AjusteFisico_Detalle_Info infoAjusteDetalle = new in_AjusteFisico_Detalle_Info(); infoAjusteDetalle.IdAjusteFisico = IdAjusteFisico; infoAjusteDetalle.IdEmpresa = param.IdEmpresa; infoAjusteDetalle.IdProducto = item.IdProducto; infoAjusteDetalle.CantidadAjustada = Convert.ToDouble(item.CantidadAjustada); infoAjusteDetalle.StockFisico = Convert.ToDouble(item.StockFisico); infoAjusteDetalle.StockSistema = item.pr_stock == null ? 0 : Convert.ToDouble(item.pr_stock); infoAjusteDetalle.IdCentroCosto = item.IdCentroCosto; Info_AjusteFisico.list_det_AjusteFisico.Add(infoAjusteDetalle); } return(Info_AjusteFisico); } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return(new in_ajusteFisico_Info()); } }
void getSucBod() { try { _sucursalInfo = ctrl_Sucbod.get_sucursal(); _bodegaInfo = ctrl_Sucbod.get_bodega(); } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.Message); } }
private void Set() { try { txtCodigo.Text = _Info.IdVenta_tel.ToString(); txtObservacion.Text = _Info.Observacion.Trim(); cmbCliente.EditValue = _Info.IdCliente; // cmbSucursal.EditValue = _Info.IdSucursal; info_sucursal = new tb_Sucursal_Info(); info_sucursal.IdSucursal = _Info.IdSucursal; this.ucIn_Sucursal_Bodega1.set_sucursal(info_sucursal); cmbMotivo.EditValue = _Info.IdMotivo; dtFecha.Text = _Info.Fecha.ToShortDateString(); if (_Info.Contactar_futuro == "S") { checkContactar.EditValue = true; } else { checkContactar.EditValue = false; } if (_Info.Estado != "A") { lbEstado.Text = " **Anulado** "; } ChangeCmbSucu(); info_bodega = new tb_Bodega_Info(); //Obtenemos el objeto info de la bodega del control info_bodega = ucIn_Sucursal_Bodega1.get_bodega(); if (info_sucursal.IdSucursal != 0 && info_bodega.IdBodega != 0) { repositoryCmbProduct.DataSource = lstProdu = new BindingList <in_Producto_Info>(BusProducto.Get_list_Producto(param.IdEmpresa, info_sucursal.IdSucursal, info_bodega.IdBodega)); } gridControlVentaFono.DataSource = busDet.Get_List_venta_telefonica_det(param.IdEmpresa, _Info.IdSucursal, _Info.IdVenta_tel); } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); } }
public void cargar_bodega_en_Combo(int IdEmpresa, int IdSucursal) { try { // List<tb_Bodega_Info> lbodega = new List<tb_Bodega_Info>(); lbodega = new List <tb_Bodega_Info>(); var qbodega = from bo in listBodega where bo.IdEmpresa == IdEmpresa && bo.IdSucursal == IdSucursal select bo; //if (TipoCarga == Cl_Enumeradores.eTipoFiltro.todos) //{ // tb_Bodega_Info info = new tb_Bodega_Info(); // info.bo_Descripcion = "todas las bodegas"; // info.IdBodega = 0; // lbodega.Add(info); //} foreach (tb_Bodega_Info item in qbodega) { tb_Bodega_Info obodega = new tb_Bodega_Info(); obodega.bo_Descripcion = "[" + item.IdBodega + "]-" + item.bo_Descripcion; obodega.bo_esBodega = item.bo_esBodega; obodega.cod_bodega = item.cod_bodega; obodega.bo_manejaFacturacion = item.bo_manejaFacturacion; obodega.cod_punto_emision = item.cod_punto_emision; obodega.Estado = item.Estado; obodega.IdBodega = item.IdBodega; obodega.IdEmpresa = item.IdEmpresa; obodega.IdSucursal = item.IdSucursal; lbodega.Add(obodega); } if (lbodega != null) { if (lbodega.Count != 0) { cmb_bodega.Properties.DataSource = lbodega; cmb_bodega.Properties.DisplayMember = "bo_Descripcion"; cmb_bodega.Properties.ValueMember = "IdBodega"; //cmb_bodega.EditValue = lbodega.FirstOrDefault().IdBodega; } else { MessageBox.Show("La sucursal seleccionada no tiene bodegas asignadas.\nEscoja una sucursal con bodegas", "Sistemas", MessageBoxButtons.OK, MessageBoxIcon.Information); cmb_bodega.Properties.DataSource = null; } } } 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()); } }
private void gridViewBodega_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e) { try { Bodega = (tb_Bodega_Info)gridViewBodega.GetFocusedRow(); } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.ToString()); } }
public void ObtenerIdBodegaSucursal() { try { _sucursalInfo = UCSucurBod.get_sucursal(); _bodegaInfo = UCSucurBod.get_bodega(); } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); } }
private void CargarDetalle() { blstProductoPorBodega = new BindingList <in_ProductoPor_tb_bodega_Info>(); infoBodega = null; if (cmbBodega.EditValue != null) { int IdSucursal = Convert.ToInt32(cmbSucursal.EditValue); int IdBodega = Convert.ToInt32(cmbBodega.EditValue); infoBodega = ListBodegas.Where(q => q.IdBodega == IdBodega).FirstOrDefault(); blstProductoPorBodega = new BindingList <in_ProductoPor_tb_bodega_Info>(busProductoPorBodega.GetList(param.IdEmpresa, IdSucursal, IdBodega, true)); } gcNoAsignado.DataSource = blstProductoPorBodega; }
private void gridViewBodega_DoubleClick(object sender, EventArgs e) { try { Bodega_I = Bodega; this.Close(); } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private bool get_Det() { try { if (BLst_det_info.Count() == 0) { MessageBox.Show("Debe agregar un Servicio a la Orden ", param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return(false); } foreach (var Serv in BLst_det_info) { if (Serv.Cantidad == 0) { this.item = Lst_Producto_info.FirstOrDefault(q => q.IdProducto == Serv.IdProducto); MessageBox.Show("Debe ingresar la cantidad al servicio " + item.pr_descripcion, param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return(false); } if (Serv.Costo == 0) { this.item = Lst_Producto_info.FirstOrDefault(q => q.IdProducto == Serv.IdProducto); MessageBox.Show("Debe ingresar el costo al servicio " + item.pr_descripcion, param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return(false); } } Sucursal_info = ucIn_Sucursal_Bodega1.get_sucursal(); Bodega_info = ucIn_Sucursal_Bodega1.get_bodega(); Proveedor_info = ucCp_Proveedor1.get_ProveedorInfo(); OS_Info.IdActivoFijo = ucaF_Activo_Fijo1.GetId_Activo_fijo(); OS_Info.IdBodega = Bodega_info == null ? 0 :Bodega_info.IdBodega; OS_Info.IdSucursal = Sucursal_info == null ? 0 : Sucursal_info.IdSucursal; OS_Info.IdProveedor = Proveedor_info == null ? 0 : Proveedor_info.IdProveedor; OS_Info.IdEmpresa = param.IdEmpresa; OS_Info.Num_Documento = txtNoDoc.Text.Trim(); OS_Info.Num_Fact = txtNoFact.Text.Trim(); OS_Info.IdCentroCosto = ucCon_CentroCosto_ctas_Movi1.Get_IdCentroCosto(); OS_Info.Fecha = deFecha.EditValue == null ? DateTime.Now : (DateTime)deFecha.EditValue; OS_Info.Observacion = txtObservacion.Text.Trim(); OS_Info.List_in_Orden_servicio_x_Activo_fijo_det = new List <in_Orden_servicio_x_Activo_fijo_det_Info>(BLst_det_info); OS_Info.Estado = "A"; return(true); } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return(false); } }
public tb_Bodega_Info Get_Info_Bodega(int IdEmpresa, int IdSucursal, int IdBodega) { try { tb_Bodega_Info bodega = new tb_Bodega_Info(); EntitiesGeneral Oenti = new EntitiesGeneral(); var bodegas = from bo in Oenti.tb_bodega join su in Oenti.tb_sucursal on new { bo.IdEmpresa, bo.IdSucursal } equals new { su.IdEmpresa, su.IdSucursal } where bo.IdEmpresa == IdEmpresa && bo.IdSucursal == IdSucursal && bo.IdBodega == IdBodega select new { bo.IdEmpresa, bo.IdBodega, bo.IdSucursal, bo.cod_bodega, bo.bo_Descripcion, su.Su_Descripcion, bo.cod_punto_emision, bo.IdCtaCtble_Inve, bo.IdCtaCtble_Costo }; foreach (var bod in bodegas) { bodega.IdEmpresa = bod.IdEmpresa; bodega.IdBodega = bod.IdBodega; bodega.IdSucursal = bod.IdSucursal; bodega.cod_bodega = bod.cod_bodega; bodega.bo_Descripcion = bod.bo_Descripcion; bodega.NomSucursal = bod.Su_Descripcion; bodega.cod_punto_emision = bod.cod_punto_emision; bodega.IdCtaCtble_Inve = bod.IdCtaCtble_Inve; bodega.IdCtaCtble_Costo = bod.IdCtaCtble_Costo; } return(bodega); } catch (Exception ex) { string arreglo = ToString(); tb_sis_Log_Error_Vzen_Data oDataLog = new tb_sis_Log_Error_Vzen_Data(); tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now); oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje); mensaje = ex.ToString() + " " + ex.Message; throw new Exception(ex.ToString()); } }
private void cmb_bodega1_EditValueChanged(object sender, EventArgs e) { try { _BodegaInfo = (tb_Bodega_Info)(listBodega.FirstOrDefault(v => v.IdSucursal == Convert.ToInt32(cmb_sucursal.EditValue) && v.IdBodega == Convert.ToInt32(cmb_bodega.EditValue))); Event_cmb_bodega1_EditValueChanged(sender, e); } 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()); } }
public void set_bodega(tb_Bodega_Info InfoBodega) { try { cmb_sucursal.EditValue = InfoBodega.IdSucursal; cmb_bodega.EditValue = InfoBodega.IdBodega; } 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()); } }
public void CargarTipoMovimiento() { try { _bodegaInfo = UCSucurBod.get_bodega(); _sucursalInfo = UCSucurBod.get_sucursal(); _listMovi_inve_tipo_info = tipoMoviBus.Obtener_list_movi_inven_tipo_x_bodega(param.IdEmpresa, _bodegaInfo.IdSucursal, _bodegaInfo.IdBodega, "", ""); cargar_tipoMovi_Inven(_bodegaInfo.IdBodega, "+", ""); } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); } }
public Boolean EliminarDB(tb_Bodega_Info info, ref string msg) { try { EntitiesGeneral OEGeneral = new EntitiesGeneral(); if (VerificarSiBodegaTieneMovimientos(info, ref msg)) { return(false); } var select = from q in OEGeneral.tb_bodega where q.IdEmpresa == info.IdEmpresa && q.IdSucursal == info.IdSucursal && q.IdBodega == info.IdBodega select q; if (select.ToList().Count > 0) { using (EntitiesGeneral context = new EntitiesGeneral()) { var contact = context.tb_bodega.First(obj => obj.IdEmpresa == info.IdEmpresa && obj.IdSucursal == info.IdSucursal && obj.IdBodega == info.IdBodega); contact.IdUsuarioUltAnu = info.IdUsuarioUltAnu; contact.Fecha_UltAnu = info.Fecha_UltAnu; contact.nom_pc = info.nom_pc; contact.ip = info.ip; contact.Estado = "I"; context.SaveChanges(); msg = "Se ha procedido anular el registro de la Bodega #: " + info.IdBodega.ToString() + " exitosamente"; } return(true); } else { msg = "No es posible anular el registro del Punto de Venta #: " + info.IdBodega.ToString() + " debido a que ya se encuentra anulado."; return(false); } } catch (Exception ex) { string arreglo = ToString(); tb_sis_Log_Error_Vzen_Data oDataLog = new tb_sis_Log_Error_Vzen_Data(); tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now); oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje); mensaje = ex.ToString() + " " + ex.Message; msg = "Se ha producido el siguiente error: " + ex.Message; throw new Exception(ex.ToString()); } }