private void btnProcesar_Click(object sender, EventArgs e) { string DocRef, Contenedor = "", DepositoDestino; DocRef = txtDocRef.Text.Trim(); if (DocRef.Equals("")) { MessageBox.Show("Ingrese un BL", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } if (comboBox1.Text.Equals("Ransa San Agustin")) { DepositoDestino = "TCTP"; } else if (comboBox1.Text.Equals("Ransa Primax")) { DepositoDestino = "TCTA"; } else { DepositoDestino = ""; MessageBox.Show("Seleccione un depĆ³sito destino", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } try { if (checkBox1.Checked) { Contenedor = ""; da.ActualizarDepositoRecepcionPagos(DocRef, Contenedor, DepositoDestino); } else { for (int i = 0; i < dataGridView1.Rows.Count; i++) { if (dataGridView1.Rows[i].Cells["Seleccionar"].Value.Equals("1")) { Contenedor = dataGridView1.Rows[i].Cells["NroContenedor"].Value.ToString(); da.ActualizarDepositoRecepcionPagos(DocRef, Contenedor, DepositoDestino); } } } MessageBox.Show("Registro exitoso!", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { MessageBox.Show("Error:" + ex.Message.ToString(), "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
/// <summary> /// Determines whether the specified <see cref="System.Object"/> is equal to this instance. /// </summary> /// <param name="obj">The <see cref="System.Object"/> to compare with this instance.</param> /// <returns><c>true</c> if the specified <see cref="System.Object"/> is equal to this instance; otherwise, <c>false</c>.</returns> public override bool Equals(object obj) { if (obj is DocListFilteredCriteria) { var c = (DocListFilteredCriteria)obj; if (!DocID.Equals(c.DocID)) { return(false); } if (!DocClassID.Equals(c.DocClassID)) { return(false); } if (!DocTypeID.Equals(c.DocTypeID)) { return(false); } if (!SenderID.Equals(c.SenderID)) { return(false); } if (!RecipientID.Equals(c.RecipientID)) { return(false); } if (!DocRef.Equals(c.DocRef)) { return(false); } if (!DocDate.Equals(c.DocDate)) { return(false); } if (!Subject.Equals(c.Subject)) { return(false); } if (!DocStatusID.Equals(c.DocStatusID)) { return(false); } if (!CreateDate.Equals(c.CreateDate)) { return(false); } if (!CreateUserID.Equals(c.CreateUserID)) { return(false); } if (!ChangeDate.Equals(c.ChangeDate)) { return(false); } if (!ChangeUserID.Equals(c.ChangeUserID)) { return(false); } return(true); } return(false); }