Пример #1
0
 protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
 {
     if (e.Argument.ToLower() == "bind")
     {
         BindModel();
     }
 }
Пример #2
0
 protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
 {
     if (e.Argument == "Rebind")
     {
         BindScheduler();
     }
 }
Пример #3
0
 protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
 {
     if (e.Argument == "Rebind")
     {
         RadGrid1.Rebind();//刷新
     }
 }
Пример #4
0
        protected void ramZona_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "CancelEdit();", true);
            }

            try
            {
                if (e.Argument.Split(',')[0] == "Registro")
                {
                    grdZona.MasterTableView.SortExpressions.Clear();
                    grdZona.MasterTableView.GroupByExpressions.Clear();
                    Zona_Listar();

                    lblMensaje.Text     = "Se realizo el registro del Zona";
                    lblMensaje.CssClass = "mensajeExito";
                }
            }
            catch (Exception ex)
            {
                lblMensaje.Text     = "ERROR: " + ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
Пример #5
0
        protected void rapFrequency_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
        {
            string Command = e.Argument;

            if (string.IsNullOrEmpty(Command) || Command.Length < 3)
            {
                return;
            }

            if (Command[0] != 'L' && Command[0] != 'R')
            {
                return;
            }
            int step = Command[0] == 'L' ? 1 : -1;

            int FrequencyID;

            if (!int.TryParse(Command.Substring(2), out FrequencyID))
            {
                return;
            }

            DateTime d = GetNavData(FrequencyID, Command[1], step);

            FrequencyFirstDate[FrequencyID] = d;
        }
Пример #6
0
 protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
 {
     switch (e.Argument)
     {
     case "Rebind":
         RadListView1.DataSource = partsChoice.partsChoiceList.OrderBy(x => x.PartID);
         foreach (var item in partsChoice.partsChoiceList)
         {
             aaa += Convert.ToDecimal(item.Partmoney);
         }
         if (partsChoice.partsChoiceList.Count <= 5)
         {
             RadDataPager1.Visible = false;
         }
         else
         {
             RadDataPager1.Visible = true;
         }
         Label5.Text   = aaa.ToString();
         TextBox1.Text = Convert.ToString(Convert.ToDecimal(Label5.Text) + Convert.ToDecimal(TextBox2.Text));
         Label9.Text   = Convert.ToString(Convert.ToDouble(Convert.ToDecimal(Label5.Text) + Convert.ToDecimal(TextBox2.Text)) * 0.95);
         RadListView1.Rebind();
         break;
     }
 }
Пример #7
0
        protected void AjaxManager_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
        {
            AjaxArguments args = new AjaxArguments(e);

            if (args.CommandName == "RunSearch")
            {
                string appId      = args[0];
                string customerId = args[1];
                string result     = null;

                using (var mgr = new ApplicationManager())
                {
                    IApplication app = mgr.GetById(appId);
                    if (app != null && app.CustomerID == customerId)
                    {
                        result = app.ID + "|" + app.DateApplied.GetValueOrDefault().ToString("yyyy年MM月dd日") + "|" +
                                 (app.Status == null
                                     ? JobStatus.None.ToLabel()
                                     : app.Status.Value);
                    }
                }

                AjaxManager.ResponseScripts.Add((result == null ? "ShowResult(null);" : "ShowResult('" + result + "');") +
                                                " return false;");
            }
        }
Пример #8
0
 protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
 {
     lblError.Text           = "";
     lblError.Visible        = false;
     lblPasswordSent.Visible = false;
     if (!UserBL.ExistsUsername(txtUsername.Text))
     {
         lblError.Visible = true;
         lblError.Text    = "Usuario no encontrado.";
         return;
     }
     else
     {
         var user                  = UserBL.GetUserByUsername(txtUsername.Text);
         var lstParameters         = ParameterBL.GetParameters();
         var ForgotPasswordSubject = lstParameters.Where(p => p.Name.Equals("ForgotPasswordSubject")).FirstOrDefault().Value;
         var ForgotPasswordBody    = lstParameters.Where(p => p.Name.Equals("ForgotPasswordBody")).FirstOrDefault().Value.Replace("{Password}", user.Password);
         EmailBL.SendEmails(new DA.MailMessageDA()
         {
             ToAddresses = new string[] { user.Email }, Subject = ForgotPasswordSubject, Body = ForgotPasswordBody
         });
         var PasswordSent = lstParameters.Where(p => p.Name.Equals("PasswordSentText")).FirstOrDefault().Value;
         lblPasswordSent.Text    = PasswordSent;
         lblPasswordSent.Visible = true;
     }
 }
Пример #9
0
 protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
 {
     if (e.Argument == "true")
     {
         if (!StoredData.User.AccessExpired.Value && !StoredData.User.TempDivision.Value)
         {
             UpdateMatch();
         }
     }
 }
Пример #10
0
 protected void radAjaxPanelPacientes_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
 {
     try
     {
         cargarPacientes(txtBusqueda.Text);
     }
     catch (Exception erAP)
     {
         Log.EscribeLog("Existe un error en radAjaxPanelPacientes_AjaxRequest: " + erAP.Message, 3, Usuario.vchUsuario);
     }
 }
Пример #11
0
 protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
 {
     if (e.Argument == "ZoomToTennisCourt")
     {
         if (ViewState["mapId"] != null)
         {
             int courtMapId = Convert.ToInt32(ViewState["mapId"]);
             ScriptManager.RegisterStartupScript(this, typeof(Page), "ZoomToCourt", string.Format("zoomToTennisCourt({0});", courtMapId), true);
         }
     }
 }
        /// <summary>
        /// Ajax回调事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
        {
            string argument = e.Argument;

            switch (argument)
            {
            default:
                cgrdDeclarationList.DoDataBind();
                break;
            }
        }
Пример #13
0
 protected void ramLogin_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
 {
     try
     {
         FormsAuthentication.RedirectFromLoginPage(e.Argument, true);
     }
     catch (Exception ex)
     {
         lblMensaje.Text     = ex.Message;
         lblMensaje.CssClass = "mensajeError";
     }
 }
Пример #14
0
        protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
        {
            if (e.Argument == "true")
            {
                if (!StoredData.User.AccessExpired.Value && !StoredData.User.TempDivision.Value)
                {
                    bool success = false;
                    using (FlexibleTennisLeagueDataContext dataContext = new FlexibleTennisLeagueDataContext())
                    {
                        int?     matchPointLogId  = 0;
                        int?     matchId          = null;
                        int?     opponentId       = null;
                        DateTime selectedDateTime = Convert.ToDateTime(RadDatePicker1.SelectedDate.Value.ToShortDateString() + " " + RadTimePicker1.SelectedDate.Value.ToShortTimeString());
                        using (TransactionScope transactionScope = new TransactionScope())
                        {
                            if (string.IsNullOrEmpty(matchIdHiddenField.Value))
                            {
                                opponentId = Convert.ToInt32(opponentDropDownList.SelectedItem.Value);
                                dataContext.InsertMatch(selectedDateTime, Convert.ToInt32(locationDropDownList.Text), StoredData.User.UserId, Convert.ToInt32(opponentDropDownList.SelectedItem.Value), 2, "0-0,0-0", ref matchId);
                            }
                            else
                            {
                                matchId    = Convert.ToInt32(matchIdHiddenField.Value);
                                opponentId = Convert.ToInt32(opponentIdHiddenField.Value);
                                dataContext.UpdateMatch(matchId.Value, selectedDateTime, Convert.ToInt32(locationDropDownList.Text), Convert.ToInt32(MatchStatus.Completed), "0-0,0-0");
                            }

                            dataContext.InsertMatchPointLog(matchId.Value, StoredData.User.UserId, true, 1, 0, 0, 3, ref matchPointLogId);
                            dataContext.InsertMatchPointLog(matchId.Value, opponentId.Value, false, 0, 0, 0, 0, ref matchPointLogId);

                            dataContext.UpdatePerformance(StoredData.User.UserId, 1, 0, 4, 0);
                            dataContext.UpdatePerformance(opponentId.Value, 0, 1, 0, 0);

                            dataContext.UpdateUserWarningByUserId(opponentId.Value, 2);

                            transactionScope.Complete();
                            success = true;
                        }
                    }
                    if (success)
                    {
                        string closingScript = "<script type='text/javascript'>Sys.Application.add_load(function () {closeRadWindowAndShowAlert('No show successfully recorded.');}); </script> ";
                        ScriptManager.RegisterStartupScript(this, this.GetType(), "radalert", closingScript, false);
                    }
                }
            }
            else
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "EnableButton", "changeButtonState('false');", true);
            }
        }
        protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
        {
            var argu = e.Argument;

            switch (argu)
            {
            case "update":
                UpdateInventory();
                break;

            default:
                cgrdInventory.DoDataBind();
                break;
            }
        }
        protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
        {
            string argument = e.Argument;

            switch (argument)
            {
            case "Delete":
                BatchDeleteBooks();
                cgrdBookQuery.DoDataBind();
                break;

            default:
                cgrdBookQuery.DoDataBind();
                break;
            }
        }
Пример #17
0
        protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
        {
            try
            {
                ErrorManager();
                string StrCnx = ConfigurationManager.AppSettings.Get("strConnection");
                Int32  Id     = default(Int32);

                ConfiguracionGlobal Configuracion = new ConfiguracionGlobal();
                Empresa             Empresa       = new Empresa();

                CentroDistribucion Cdis    = new CentroDistribucion();
                Usuario            Usuario = new Usuario();

                Usuario.Cu_User = this.txtUserName.Text;

                CapaNegocios.CN_Login CN_Login = new CapaNegocios.CN_Login();

                CN_Login.RecuperarContraseña(ref Usuario, ref Cdis, ref Configuracion, out Id, ConfigurationManager.AppSettings.Get("strConnection"));
                //Datos correctos
                if (Id == 1)
                {
                    if (Usuario.U_Correo != string.Empty)
                    {
                        EnviaEmail(Usuario, Cdis, Configuracion);
                        Alerta("La contraseña ha sido enviada por e-mail al correo que está registrado en la cuenta");
                    }
                    else
                    {
                        Alerta("No hay una cuenta de correo asociada para la cuenta, favor de comunicarse con el administrador");
                    }
                }
                else if (Id == 2)
                {
                    Alerta("La cuenta no existe");
                }
                else
                {
                    Alerta("No se regresó información de la base de datos");
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #18
0
 protected void radAjaxPanelVista_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
 {
     try
     {
         if (ddlTipoUsuario.SelectedValue != "")
         {
             if (Convert.ToInt32(ddlTipoUsuario.SelectedValue) > 0)
             {
                 cargagridVistas(Convert.ToInt32(ddlTipoUsuario.SelectedValue));
             }
         }
     }
     catch (Exception eddC)
     {
         Log.EscribeLog("Existe un error en radAjaxPanelVista_AjaxRequest: " + eddC.Message, 3, Usuario.vchUsuario);
         //
     }
 }
Пример #19
0
        void AjaxPanel1_AjaxRequest(object source, Telerik.Web.UI.AjaxRequestEventArgs e)
        {
            if (!e.Argument.StartsWith("ExecuteCommand"))
            {
                switch (e.Argument)
                {
                case "butPWSave":
                    ___butPWSave_OnClick(source, e);
                    break;

                case "butGroupCancel2":
                    ___butGroupCancel2_OnClick(source, e);
                    break;

                case "butGroupSave2":
                    ___butGroupSave2_OnClick(source, e);
                    break;

                case "butGroupNew2":
                    ___butGroupNew2_OnClick(source, e);
                    break;

                case "butGroupRemove2":
                    ___butGroupRemove2_OnClick(source, e);
                    break;

                case "Button1":
                    ___Button1_OnClick(source, e);
                    break;

                case "Button3":
                    ___Button3_OnClick(source, e);
                    break;

                case "Button4":
                    ___Button4_OnClick(source, e);
                    break;

                case "Button2":
                    ___Button2_OnClick(source, e);
                    break;
                }
            }
        }
Пример #20
0
        protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
        {
            if (e.Argument.StartsWith("Example:"))
            {
                String  errorMessage = null;
                String  filePath     = e.Argument.Substring(8, e.Argument.Length - 8);
                Boolean ok           = UCWeibullMarkov41.Initialize(filePath, out errorMessage);
                if (!ok)
                {
                    UCWeibullMarkov41.PolicyPane.DisplayError(errorMessage);
                }
            }
            else if (e.Argument.StartsWith("Policy") && e.Argument.EndsWith("GeneratePolicy"))
            {
                Boolean aok1 = true, aok2 = true, aok3 = true;
                Boolean tok1 = true, tok2 = true, tok3 = true, tok4 = true;

                Boolean aok = UCWeibullMarkov41.CheckActionPanes(out aok1, out aok2, out aok3);
                Boolean tok = UCWeibullMarkov41.CheckWeibullPanes(out tok1, out tok2, out tok3, out tok4);
                Boolean fok = UCWeibullMarkov41.FailureCostPane.Validate();
                Boolean dok = UCWeibullMarkov41.DiscountingPane.Validate();

                Boolean ok = aok && tok && fok && dok;

                if (!ok)
                {
                    UCWeibullMarkov41.PolicyPane.DisplayError(tok1, tok2, tok3, tok4, aok1, aok2, fok, dok, aok3);
                }
                else
                {
                    UCWeibullMarkov41.PolicyPane.EstimateModel(UCWeibullMarkov41.WeibullPane1,
                                                               UCWeibullMarkov41.WeibullPane2,
                                                               UCWeibullMarkov41.WeibullPane3,
                                                               UCWeibullMarkov41.WeibullPane4,
                                                               UCWeibullMarkov41.ActionPane1,
                                                               UCWeibullMarkov41.ActionPane2,
                                                               UCWeibullMarkov41.FailureCostPane,
                                                               UCWeibullMarkov41.DiscountingPane);
                }
            }
        }
Пример #21
0
        protected void rapFrequency_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
        {
            string Command = e.Argument;

            if (string.IsNullOrEmpty(Command) || Command.Length < 3)
            {
                return;
            }

            if (Command[0] != 'L' && Command[0] != 'R')
            {
                return;
            }
            int step = Command[0] == 'L' ? 1 : -1;

            int FrequencyID;

            if (!int.TryParse(Command.Substring(2), out FrequencyID))
            {
                return;
            }
            FrequencyFirstDate = MetricTrac.Bll.Frequency.AddPeriod(FrequencyFirstDate, FrequencyID, step);
        }
Пример #22
0
 protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
 {
 }
Пример #23
0
        // ---- AJAX request --------------------

        protected void rapFrequency_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
        {
            string Command = e.Argument;

            if (string.IsNullOrEmpty(Command) || Command.Length < 3)
            {
                return;
            }

            string[] ArgArray = Command.Split('|');
            if (ArgArray.Length < 7)
            {
                return;
            }

            if (Command[0] != 'L' && Command[0] != 'R')
            {
                return;
            }
            int step = Command[0] == 'L' ? 1 : -1;

            int FrequencyID;

            if (!int.TryParse(ArgArray[1], out FrequencyID))
            {
                return;
            }

            Bll.FrequencyMetricOrgLocationID CurTriplet = new MetricTrac.Bll.FrequencyMetricOrgLocationID();
            CurTriplet.FrequencyID = FrequencyID;

            try
            {
                Guid MetricID = new Guid(ArgArray[2]);

                Guid OrgLocationID = new Guid(ArgArray[3]);

                CurTriplet.MetricID      = MetricID;
                CurTriplet.OrgLocationID = OrgLocationID;

                DateTime PreviousDate = DateTime.Parse(ArgArray[4]);
                DateTime NextDate     = DateTime.Parse(ArgArray[5]);

                bool IsNextValues = bool.Parse(ArgArray[6]);

                DateTime NewDate = step > 0 ? NextDate : PreviousDate;

                if (!IsNextValues && (step > 0))
                {
                    if (FrequencyFirstDate.Keys.Contains(CurTriplet))
                    {
                        FrequencyFirstDate.Remove(CurTriplet);
                    }
                }
                else
                {
                    if (FrequencyFirstDate.Keys.Contains(CurTriplet))
                    {
                        FrequencyFirstDate[CurTriplet] = NewDate;
                    }
                    else
                    {
                        FrequencyFirstDate.Add(CurTriplet, NewDate);
                    }
                }
            }
            catch { return; }
        }
Пример #24
0
 protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
 {
     PruebasNegocio nKprueba      = new PruebasNegocio();
     E_RESULTADO    vObjetoPrueba = nKprueba.INICIAR_K_PRUEBA(pIdPrueba: vIdPrueba, pFeInicio: DateTime.Now, pClTokenExterno: vClToken, usuario: vClUsuario, programa: vNbPrograma);
 }
 protected void MasterAjaxManager_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
 {
 }
Пример #26
0
 protected void rapSaved_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
 {
     rcbSaved.DataBind();
 }