示例#1
0
        private void CargarLineas()
        {
            try
            {
                SocioLineaBE SocioLineaBE = new SocioLineaBE()
                {
                    OPCION  = 4,
                    USUARIO = General.General.GetUsuario,
                    IdSocio = _IdSocio
                };

                DataSet ds = new SocioLineaBL().ProcesarSocioLinea(SocioLineaBE);
                cboIdLinea.DataSource    = ds.Tables[0];
                cboIdLinea.DisplayMember = "Descripcion";
                cboIdLinea.ValueMember   = "IdLinea";

                if (ds.Tables[0].Rows.Count > 0)
                {
                    CargarDatos();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private bool ObtenerLinea(string RucSocio, string Moneda)
        {
            bool bResult = false;

            try
            {
                Moneda = Moneda.Equals("PEN") ? "00036" : Moneda;
                Moneda = Moneda.Equals("USD") ? "00037" : Moneda;

                SocioLineaBE IEnitty = new SocioLineaBE()
                {
                    OPCION      = 12,
                    RUCSocio    = RucSocio,
                    IdMoneda_tt = Moneda
                };
                DataSet ds = new DataSet();
                ds = new SocioLineaBL().ProcesarSocioLinea(IEnitty);

                if (ds.Tables[0].Rows.Count > 0)
                {
                    txtIdSocio.Text            = ds.Tables[0].Rows[0]["IdSocio"].ToString();
                    txtIdSocio_Dsc.Text        = ds.Tables[0].Rows[0]["IdSocio_Dsc"].ToString();
                    IdLinea                    = ds.Tables[0].Rows[0]["IdLinea"].ToString();
                    txtIdLinea_Dsc.Text        = ds.Tables[0].Rows[0]["IdLinea_Dsc"].ToString();
                    txtIdMoneda_tt_Dsc.Text    = ds.Tables[0].Rows[0]["IdMoneda_tt_Dsc"].ToString();
                    IdMoneda_tt                = ds.Tables[0].Rows[0]["IdMoneda_tt"].ToString();
                    txtIdTipoLinea_tt_Dsc.Text = ds.Tables[0].Rows[0]["IdTipoLinea_tt_Dsc"].ToString();
                    IdFormaDesembolso          = Convert.ToDecimal(ds.Tables[0].Rows[0]["IdFormaDesembolso"].ToString());
                    CargarGiradorOriginal();
                    bResult = true;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            return(bResult);
        }