private void SetCombosData() { DataTable listaDePreciosTable = businessrules.tsh_ListasDePrecios.GetList().tsh_ListasDePrecios; _listaDePrecios = VariablesListComparer.FilterDataTable(_processName, _taskName, "ListasDePrecios", KeyValueListaDePrecios, listaDePreciosTable); _idListaDePreciosDefault = Variables.GetValueString(_processName, _taskName, "ListaDePreciosDefault"); if (_idListaDePreciosDefault.Equals(string.Empty)) { _idListaDePreciosDefault = businessrules.tsh_ListasDePrecios.GetDefault().IdListaDePrecio; } _tipoDePrecioDeCostoDefault = Variables.GetValueString(_processName, _taskName, "PrecioDeCosto.Origen"); if (_tipoDePrecioDeCostoDefault.Equals(string.Empty)) { _tipoDePrecioDeCostoDefault = Variables.GetValueString("Productos.PrecioDeCosto.Origen"); } }
private void SetCombosData() { tsh_ListasDePreciosDataset.tsh_ListasDePreciosDataTable listaDePreciosTable = businessrules.tsh_ListasDePrecios.GetList().tsh_ListasDePrecios; _listaDePrecios = (tsh_ListasDePreciosDataset.tsh_ListasDePreciosDataTable)VariablesListComparer.FilterDataTable(this._comprobanteDeVenta.GetProcessManagerParent().Process.ProcessName, this._comprobanteDeVenta.GetTaskName(), "ListasDePrecios", KeyValueListaDePrecios, listaDePreciosTable); _idListaDePreciosDefault = Variables.GetValueString(this._comprobanteDeVenta.GetProcessManagerParent().Process.ProcessName, this._comprobanteDeVenta.GetTaskName(), "ListaDePreciosDefault"); if (_idListaDePreciosDefault.Equals(string.Empty)) { _idListaDePreciosDefault = businessrules.tsh_ListasDePrecios.GetDefault().IdListaDePrecio; } }
public void Init() { string Proceso = ""; string Tarea = ""; if (_brClass != null) { Proceso = _brClass.GetProcessName(); Tarea = _brClass.GetTaskName(); if (Proceso.Equals("ProcesoEditarCuentasObservaciones")) { _tipo = "CUENTA"; } else { _tipo = "PROVEEDOR"; } } else { Proceso = _proceso; Tarea = _tarea; } if (_tipo.Equals("CUENTA")) { _tipos = mz.erp.businessrules.tsa_CuentasObservacionesTipos.GetListTiposPerfil("Ver").tsa_CuentasObservacionesTipos; DataRow row = _tipos.NewRow(); row["IdCuentaObservacionTipo"] = String.Empty; row["Descripcion"] = String.Empty; _tipos.Rows.Add(row); _estados = mz.erp.businessrules.tsa_CuentasObservacionesEstados.GetList().tsa_CuentasObservacionesEstados; _estados = VariablesListComparer.FilterDataTable(Proceso, Tarea, "ListaCuentasObservacionesEstados", "IdCuentaObservacionEstado", _estados); DataRow rowE = _estados.NewRow(); rowE["IdCuentaObservacionEstado"] = String.Empty; rowE["Descripcion"] = String.Empty; _estados.Rows.Add(rowE); string valor = Variables.GetValueString("CuentasObservaciones.Busquedas.TipoDefault"); foreach (DataRow rowTipos in _tipos.Rows) { if (Convert.ToString(rowTipos["IdCuentaObservacionTipo"]) == valor) { _idTipoDefault = valor; } } } else if (_tipo.Equals("PROVEEDOR")) { _tipos = tpu_ProveedoresObservacionesTipos.GetListTiposPerfil("Add").tpu_ProveedoresObservacionesTipos; DataRow row = _tipos.NewRow(); row["IdProveedorObservacionTipo"] = String.Empty; row["Descripcion"] = String.Empty; _tipos.Rows.Add(row); _estados = mz.erp.businessrules.tpu_ProveedoresObservacionesEstados.GetList().tpu_ProveedoresObservacionesEstados; _estados = businessrules.VariablesListComparer.FilterDataTable(Proceso, Tarea, "ListaProveedoresObservacionesEstados", "IdProveedorObservacionEstado", _estados); DataRow rowE = _estados.NewRow(); rowE["IdProveedorObservacionEstado"] = String.Empty; rowE["Descripcion"] = String.Empty; _estados.Rows.Add(rowE); string valor = Variables.GetValueString("ProveedoresObservaciones.Busquedas.TipoDefault"); foreach (DataRow rowTipos in _tipos.Rows) { if (Convert.ToString(rowTipos["IdProveedorObservacionTipo"]) == valor) { _idTipoDefault = valor; } } } _usuarios = sy_Usuarios.GetList().sy_Usuarios; DataRow rowU = _usuarios.NewRow(); rowU["IdUsuario"] = String.Empty; rowU["Nombre"] = String.Empty; rowU["Clave"] = "."; rowU["IdConexionCreacion"] = 1; rowU["FechaCreacion"] = DateTime.Now; rowU["IntentosPermitidosConexion"] = 0; rowU["vencimientoclave"] = DateTime.Now; rowU["cantidadConexionesFallida"] = 0; _usuarios.Rows.Add(rowU); _fechaDesde = mz.erp.businessrules.Sistema.DateTime.Now.AddDays((-1) * Convert.ToDouble(_cantDiasDesde)); _fechaHasta = mz.erp.businessrules.Sistema.DateTime.Now.AddDays(Convert.ToDouble(_cantDiasHasta)); }