protected void clbSession_Callback(object source, DevExpress.Web.ASPxCallback.CallbackEventArgs e)
        {
            try
            {
                e.Result = string.Empty;
                var obrd  = new BRLogin();
                var brdoc = new BRDocument();
                var obec  = ((BEParameters)Session["InitPar"]);
                var obep  = new BEParameters();

                obep.UserName    = UserName.Text;
                obep.Password    = Password.Text;
                obep.SAPPASSWORD = tbPasswordConfirm.Text;

                List <BEParameters> lval = obrd.Get_val_usu(obep.UserName.Trim(), obec.Socied, obec.U_DXP_SEDE);

                if (obep.Password != obep.SAPPASSWORD)
                {
                    throw new KeyNotFoundException();
                }
                else if (lval.Count == 0)
                {
                    throw new KeyNotFoundException();
                }
                else
                {
                    brdoc.Recoverer(obep);
                    e.Result = "PERM#" + "Cambio Exitoso";
                }
            }
            catch (KeyNotFoundException ex)
            {
                e.Result = ex.Message;
            }
        }
        protected void clbSession_Callback(object source, DevExpress.Web.ASPxCallback.CallbackEventArgs e)
        {
            try
            {
                e.Result = string.Empty;

                if (Membership.ValidateUser(UserName.Text.Trim(), Password.Text))
                {
                    string proyect           = Convert.ToString(hdfLocal.Get("_proyc"));
                    List <BEParameters> lval = obrl.Get_val_usu(UserName.Text.Trim(), valor_sociedad, proyect);
                    if (lval.Count == 0 || lval[0].Permition == "0")
                    {
                        e.Result = "Val#";
                        FormsAuthentication.SignOut();
                    }
                    else
                    {
                        var _par = e.Parameter.Split(';');
                        ((BEParameters)Session["InitPar"]).UserName   = UserName.Text.Trim();
                        ((BEParameters)Session["InitPar"]).Socied     = valor_sociedad;
                        ((BEParameters)Session["InitPar"]).Project    = _par[0];
                        ((BEParameters)Session["InitPar"]).DscpLocal  = " - Local: " + _par[1];
                        ((BEParameters)Session["InitPar"]).U_DXP_SEDE = _par[1];

                        proyectos.ToList().ForEach(item =>
                        {
                            if (item.alf_soci == valor_sociedad && item.PrjCode == _par[0])
                            {
                                ((BEParameters)Session["InitPar"]).WhsCode        = item.WhsCode;
                                ((BEParameters)Session["InitPar"]).SRV            = item.SRV;
                                ((BEParameters)Session["InitPar"]).DBUSERNAME     = item.DBUSERNAME;
                                ((BEParameters)Session["InitPar"]).DBPASSWORD     = item.DBPASSWORD;
                                ((BEParameters)Session["InitPar"]).SAPUSERNAME    = item.SAPUSERNAME;
                                ((BEParameters)Session["InitPar"]).SAPPASSWORD    = item.SAPPASSWORD;
                                ((BEParameters)Session["InitPar"]).DIRECCIONIP    = item.DIRECCIONIP;
                                ((BEParameters)Session["InitPar"]).USUARIOMKT     = item.USUARIOMKT;
                                ((BEParameters)Session["InitPar"]).PASSWORDMKT    = item.PASSWORDMKT;
                                ((BEParameters)Session["InitPar"]).IPONU          = item.IPONU;
                                ((BEParameters)Session["InitPar"]).USUARIONU      = item.USUARIONU;
                                ((BEParameters)Session["InitPar"]).PASSWORDONU    = item.PASSWORDONU;
                                ((BEParameters)Session["InitPar"]).Permition      = item.Permition;
                                ((BEParameters)Session["InitPar"]).CompanyAddress = item.CompanyAddress;
                                //((BEParameters)Session["InitPar"]).Phone = item.Phone;
                                //((BEParameters)Session["InitPar"]).SerieMaqr = item.SerieMaqr;
                                ((BEParameters)Session["InitPar"]).U_BF_ADMIN = lval[0].U_BF_ADMIN;
                                ((BEParameters)Session["InitPar"]).Band       = true;
                                ((BEParameters)Session["InitPar"]).Currency   = "";
                            }
                        });

                        /*((string[])hdfLocal.Get("_lcl")).ToList()
                         *                              .ForEach(item =>
                         *                              {
                         *                                  var _spl = item.Split(',');
                         *                                  if (_spl[2] == valor_sociedad && _spl[0] == _par[0])
                         *                                  {
                         *                                      ((BEParameters)Session["InitPar"]).WhsCode = _spl[3];
                         *                                      ((BEParameters)Session["InitPar"]).Rate = Convert.ToDecimal(_spl[4]);
                         *                                      ((BEParameters)Session["InitPar"]).Permition = _spl[5];
                         *                                      ((BEParameters)Session["InitPar"]).CompanyAddress = _spl[6];
                         *                                      ((BEParameters)Session["InitPar"]).Phone = _spl[7];
                         *                                      ((BEParameters)Session["InitPar"]).SerieMaqr = _spl[8];
                         *                                      ((BEParameters)Session["InitPar"]).U_BF_ADMIN = lval[0].U_BF_ADMIN;
                         *                                  }
                         *                              });*/
                        var obep = new BEParameters();
                        obep.Socied   = valor_sociedad;
                        obep.UserName = UserName.Text.Trim();
                        ((BEParameters)Session["InitPar"]).U_BF_EMID = obrl.Get_OSCSP_IDOH(obep);
                        ((BEParameters)Session["InitPar"]).CompanyDB = NOMBRE_BD;
                        ((BEParameters)Session["InitPar"]).Permisos  = obrl.GET_PERMISOS(((BEParameters)Session["InitPar"]));
                        obep.CompanyDB   = NOMBRE_BD;
                        obep.SRV         = SRV;
                        obep.DBUSERNAME  = DBUSERNAME;
                        obep.DBPASSWORD  = DBPASSWORD;
                        obep.SAPUSERNAME = SAPUSERNAME;
                        obep.SAPPASSWORD = SAPPASSWORD;
                        var osbo = new BRSboConnect();
                        ((BEParameters)Session["InitPar"]).objSapSbo = osbo.Get_ComConnect(obep);
                        var rates = obrl.DXP_GET_RATE(obep);
                        if (rates.Count != 0)
                        {
                            rates.ForEach(i =>
                            {
                                if (i.Currency == "USD")
                                {
                                    ((BEParameters)Session["InitPar"]).Rate = i.Rate;
                                }
                                else if (i.Currency == "EUR")
                                {
                                    ((BEParameters)Session["InitPar"]).RateEur = i.Rate;
                                }
                            });
                        }
                        else
                        {
                            ;
                        }

                        if (!string.IsNullOrWhiteSpace(obep.Msg))
                        {
                            Session["InitPar"] = new BEParameters();
                            e.Result           = obep.Msg;
                            FormsAuthentication.SignOut();
                        }
                        else
                        {
                            e.Result = "PERM#" + ((BEParameters)Session["InitPar"]).Permition;
                            FormsAuthentication.SetAuthCookie(UserName.Text.Trim(), false);
                        }
                    }
                }
                else
                {
                    e.Result = "USI#";
                }
            }
            catch (KeyNotFoundException ex)
            {
                e.Result = ex.Message;
            }
        }