Exemple #1
0
        public static TransMaxMin getMaxMinTransaccion(int sCod, short sType)
        {
            TransMaxMin transMaxMin = new TransMaxMin();

            try
            {
                DataSet maxMinTransaccion = HelperMenu.ws.getMaxMinTransaccion(sCod, sType);
                if (maxMinTransaccion.Tables.Count != 0)
                {
                    DataTable item = maxMinTransaccion.Tables[0];
                    if (item.Rows.Count != 0)
                    {
                        if ((item.TableName == "SqlException" ? true : item.TableName == "Exception"))
                        {
                            throw new IBException(item.Rows[0]["NumeroError"].ToString().Trim(), "SQLIB");
                        }
                        transMaxMin = TransMaxMin.getNewTransMaxMin(item.Rows[0]);
                    }
                }
            }
            catch (WebException webException)
            {
                throw new IBException(webException.Message, "SQLIB");
            }
            return(transMaxMin);
        }
Exemple #2
0
        public static TransMaxMin GetCtaDestino(int sCod, short sType)
        {
            TransMaxMin transMaxMin = new TransMaxMin();

            try
            {
                transMaxMin = HelperMenu.getMaxMinTransaccion(sCod, sType);
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception.Message);
            }
            return(transMaxMin);
        }
Exemple #3
0
        public static string loadDescripcionPantalla(int sCod, short sType)
        {
            string mDDescTrans = "";

            try
            {
                TransMaxMin maxMinTransaccion = HelperMenu.getMaxMinTransaccion(sCod, sType);
                if (maxMinTransaccion != null)
                {
                    mDDescTrans = maxMinTransaccion.MD_Desc_Trans;
                }
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception.Message);
            }
            return(mDDescTrans);
        }
Exemple #4
0
 protected override void OnPreLoad(EventArgs e)
 {
     this.sCod = (string.IsNullOrEmpty(base.Request.QueryString["sCod"]) ? 0 : int.Parse(base.Request.QueryString["sCod"]));
     try
     {
         TransMaxMin maxMinTransaccion = HelperMenu.getMaxMinTransaccion(this.sCod, 0);
         if (maxMinTransaccion != null)
         {
             this.Max = maxMinTransaccion.MD_Mto_Max_Bco;
             this.Min = maxMinTransaccion.MD_Mto_Min_Bco;
             // Agregado 21/07/2018 por Liliana Guerra Limite por transacción
             this.MtoLimiteTrans = maxMinTransaccion.MD_Mto_Limite_Trans;
             this.LimiteDiario   = maxMinTransaccion.MD_Mto_Limite_Diario;
             if (string.IsNullOrEmpty(this.NombrePantalla))
             {
                 this.NombrePantalla = maxMinTransaccion.MD_Desc_Trans;
             }
             this.MontoComision         = maxMinTransaccion.MD_Mto_Comision;
             this.CuentaAdministrativa1 = maxMinTransaccion.MD_Cta_Administrativa1;
             this.CuentaAdministrativa2 = maxMinTransaccion.MD_Cta_administrativa2;
             this.Tipo_Seguridad        = maxMinTransaccion.MD_Tipo_Seguridad;
         }
     }
     catch (IBException bException)
     {
     }
     this.path = base.ResolveUrl("~");
     if (!base.IsCallback)
     {
         this.SessionId = base.Request.QueryString["SessionId"];
         if (string.IsNullOrEmpty(this.SessionId))
         {
             this.SessionId = this.Session["SessionId"] as string;
         }
         HelperSession.ValidateSession(this.SessionId);
         this.Afiliado = this.Session["Afiliado"] as IBBAV.Entidades.Afiliado;
         if (this.Afiliado == null)
         {
             base.Response.Redirect("~/Login.aspx?msg=2");
         }
         else if (this.Afiliado.nES_Id == (long)4)
         {
             this.sesionnovalida = true;
             base.Response.Redirect("~/Login.aspx?msg=4");
         }
         else if (this.Afiliado.nES_Id != (long)6)
         {
             if (this.Afiliado.nES_Id == (long)8)
             {
                 this.sesionnovalida = true;
                 base.Response.Redirect("~/Login.aspx?msg=6");
                 return;
             }
             if (this.Context.Items["Afiliado"] == null)
             {
                 this.Context.Items.Add("Afiliado", this.Afiliado);
             }
             else
             {
                 this.Context.Items["Afiliado"] = this.Afiliado;
             }
             if (!base.Request.RawUrl.Contains("CambioClave.aspx"))
             {
                 if (this.Afiliado.AF_FechaPassword == new DateTime(2000, 1, 1))
                 {
                     base.Response.Redirect(string.Concat("~/pages/IB/Claves/CambioClave.aspx?sCod=20&Type=0&SessionId=", this.SessionId));
                 }
                 else if ((this.Afiliado.AF_DiasPassword == 0 ? false : DateAndTime.DateDiff(DateInterval.Day, this.Afiliado.AF_FechaPassword, DateTime.Now) >= (long)this.Afiliado.AF_DiasPassword))
                 {
                     base.Response.Redirect(string.Concat("~/pages/IB/Claves/CambioClave.aspx?sCod=20&Type=1&SessionId=", this.SessionId));
                 }
             }
             base.OnPreLoad(e);
             return;
         }
         else
         {
             this.sesionnovalida = true;
             base.Response.Redirect("~/Login.aspx?msg=5");
         }
     }
     else
     {
         base.OnPreLoad(e);
         return;
     }
 }