Пример #1
0
        public void BuscarJustificacion(string idjusti)
        {
            try
            {
                RN_Justificacion obj  = new RN_Justificacion();
                DataTable        data = new DataTable();

                data = obj.RN_BuscarJustificacion_porValor(idjusti.Trim());
                if (data.Rows.Count == 0)
                {
                    return;
                }
                {
                    Dtp_FechaJusti.Value  = Convert.ToDateTime(data.Rows[0]["FechaJusti"]);
                    cbo_motivJusti.Text   = Convert.ToString(data.Rows[0]["PrincipalMotivo"]);
                    txt_DetalleJusti.Text = Convert.ToString(data.Rows[0]["Detalle_Justi"]);
                }
                xedit = true;
                btn_aceptar.Enabled = true;
            }
            catch (Exception ex)
            {
                MessageBox.Show("Revisa el Error: " + ex.Message, "Advertencia de Seguridad", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
        private void Buscar_Justifiacion_porValor(string xvalor)
        {
            RN_Justificacion obj = new RN_Justificacion();
            DataTable        dt  = new DataTable();

            dt = obj.RN_BuscarJustificacion_porValor(xvalor.Trim());
            if (dt.Rows.Count > 0)
            {
                LlenarListView_Justi(dt);
            }
            else
            {
                lsv_justifi.Items.Clear();
            }
        }