private void toolStripButtonSave_Click(object sender, EventArgs e) { try { Boolean _selecciono = false; BLL.Tables.RECLAMOFACTURASINCARGAR _elimina = new BLL.Tables.RECLAMOFACTURASINCARGAR(); for (int i = 0; i < this.dataGridViewEliminaReclamos.Rows.Count; i++) { DataGridViewCheckBoxCell cellSelecion = dataGridViewEliminaReclamos.Rows[i].Cells[1] as DataGridViewCheckBoxCell; if (Convert.ToBoolean(cellSelecion.Value)) { _selecciono = true; // _elimina = new BLL.Tables.RECLAMOFACTURASINCARGAR(); _elimina.RemoveItem(Convert.ToInt32(dataGridViewEliminaReclamos.Rows[i].Cells[0].Value)); _elimina.WhereParameter.Clear(); } } if (_selecciono) { MessageBox.Show("Se eliminaron los reclamos seleccionados", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information); CargarReclamos(); //dataGridViewEliminaReclamos.Rows.Clear(); } else { MessageBox.Show("Debe seleccionar al menos un Reclamo", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Error); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void toolStripButtonSave_Click(object sender, EventArgs e) { if (VerificaIngreso()) { try { CultureInfo culture = new CultureInfo("en-US"); Entities.Tables.RECLAMOFACTURASINCARGAR _itemReclamo = new Entities.Tables.RECLAMOFACTURASINCARGAR(); BLL.Tables.RECLAMOFACTURASINCARGAR _reclamo = new BLL.Tables.RECLAMOFACTURASINCARGAR(); _itemReclamo.CCOEMP_CODIGO = Clases.Usuario.EmpresaLogeada.EmpresaIngresada.Trim(); _itemReclamo.CCO_CODPRO = ReclamoFact.CCO_CODPRO; _itemReclamo.CCO_FEMISION = this.dateTimeFechaFactrua.Value; _itemReclamo.CCO_IMPMONLOC = Convert.ToDouble(this.textBoxImporte.Text, culture); _itemReclamo.CCO_NRO = this.textBoxNro.Text; _itemReclamo.CCOPRO_RAZSOC = ReclamoFact.CCOPRO_RAZSOC; _itemReclamo.ENBEJERMAN = 0; _itemReclamo.FECHARECLAMO = Convert.ToDateTime(DateTime.Now.ToShortDateString()); _itemReclamo.OBS = this.textBoxObs.Text.Trim(); _itemReclamo.USUARIO = Clases.Usuario.UsuarioLogeado.usuario_Logeado; _reclamo.Add(_itemReclamo); MessageBox.Show("El reclamo se generó correctamente", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information); this.labelRazonSocial.Text = string.Empty; this.Dispose(); this.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
//FIN PERMISOS private void CargarReclamos() { try { BLL.Tables.RECLAMOFACTURASINCARGAR _re = new BLL.Tables.RECLAMOFACTURASINCARGAR(); _re.OrderByParameter.Add(DAL.Tables.RECLAMOFACTURASINCARGAR.ColumnEnum.fechaReclamo); this.bindingSourceReclamo.DataSource = _re.ItemList(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void TraeHistorial(string _proveed) { try { this.dataGridViewHistorial.AutoGenerateColumns = false; BLL.Tables.RECLAMOFACTURASINCARGAR _hist = new BLL.Tables.RECLAMOFACTURASINCARGAR(); _hist.WhereParameter.Add(DAL.Tables.RECLAMOFACTURASINCARGAR.ColumnEnum.cco_CodPro, DAL.SqlEnums.OperandEnum.Equal, _proveed); this.dataGridViewHistorial.DataSource = _hist.ItemList(); this.dataGridViewHistorial.ClearSelection(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }