private void Inicializa() { empresaController = new EmpresaController(); traspasoController = new TraspasoController(); loteController = new LoteController(); traspasoController = new TraspasoController(); traspasopController = new TraspasopController(); productoController = new ProductoController(); movInvController = new MovInvController(); traspaso = null; partidas = new List <Traspasop>(); empresa = empresaController.SelectTopOne(); Ambiente.BorrarFile(empresa.DirectorioTrabajo + @"\PH.XLSX"); Ambiente.BorrarFile(empresa.DirectorioTrabajo + @"\PD.XLSX"); //Ambiente.VaciarDirectorio(empresa.DirectorioTraspasos); TxtOrigen.Text = ""; TxtDestino.Text = ""; TxtDocumento.Text = ""; TxtFechaDoc.Text = ""; TxtEnviadoPor.Text = ""; TxtSubtotal.Text = ""; TxtImpuesto.Text = ""; TxtTotal.Text = ""; Malla.Rows.Clear(); CargaTraspasosPendientes(); }
private void ResetPDT() { productoController = new ProductoController(); sucursalController = new SucursalController(); loteController = new LoteController(); traspasoController = new TraspasoController(); traspasopController = new TraspasopController(); movInvController = new MovInvController(); empresaController = new EmpresaController(); //listas partidas = new List <Traspasop>(); // Objetos traspaso = null; empresa = empresaController.SelectTopOne(); producto = null; sucursalO = null; lote = null; //Variables Subtotal = 0; Impuesto = 0; sobreGrid = false; SigPartida = 0; TxtOrigen.Text = ""; TxtDestino.Text = ""; TxtDocumento.Text = ""; TxtProductoId.Text = ""; NCantidad.Value = 1; TxtImpuestos.Text = ""; TxtSubtotal.Text = ""; TxtTotal.Text = ""; TxtDescripcion.Text = ""; TxtLoteId.Text = ""; TxtNoLote.Text = ""; TxtCaducidad.Text = ""; Malla.Rows.Clear(); MallaLote.Rows.Clear(); for (int i = 0; i < NPARTIDAS; i++) { Malla.Rows.Add(); Malla.Rows[i].Cells[3].Style.BackColor = Color.Yellow; Malla.Rows[i].Cells[4].Style.BackColor = Color.Yellow; Malla.Rows[i].Cells[6].Style.BackColor = Color.Yellow; Malla.Rows[i].Cells[8].Style.BackColor = Color.Yellow; } CreaTraspaso(); }