Ejemplo n.º 1
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;");
            }
        }
Ejemplo n.º 2
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;");
            }
        }
Ejemplo n.º 3
0
        protected void OnAjaxRequest(object sender, AjaxRequestEventArgs e)
        {
            AjaxArguments args=new AjaxArguments(e);

            switch (args.CommandName)
            {
                case "Login":
                    string name = args[0];
                    string password = args[1];
                    Login(name,password);
                    break;
                case "Logout":
                    Logout();
                    break;
            }
        }
Ejemplo n.º 4
0
        protected void OnAjaxRequest(object sender, AjaxRequestEventArgs e)
        {
            AjaxArguments args = new AjaxArguments(e);

            switch (args.CommandName)
            {
            case "Login":
                string name     = args[0];
                string password = args[1];
                Login(name, password);
                break;

            case "Logout":
                Logout();
                break;
            }
        }
Ejemplo n.º 5
0
        protected void AjaxManager_AjaxRequest(object sender, AjaxRequestEventArgs e)
        {
            AjaxArguments args = new AjaxArguments(e);

            switch (args.CommandName)
            {
            case "ChangeStatus":
                string status = args[0];
                if (!string.IsNullOrEmpty(ItemId))
                {
                    using (var manager = new StatusManager())
                    {
                        manager.Update(ItemId, status);
                        InitializeStatusInput(status);
                        Dialog.Info(this, "状态更新成功!");
                    }
                    //btStatus.Visible = true;
                }
                break;

            case "InitStatus":
                string appid = args[0];
                if (!string.IsNullOrEmpty(appid))
                {
                    using (var manager = new ApplicationManager())
                    {
                        IApplication app = manager.GetById(appid);
                        if (app.Status != null)
                        {
                            InitializeStatusInput(app.Status.Value);
                        }
                    }
                    //btStatus.Visible = true;
                }
                break;

            default:
                break;
            }
        }
Ejemplo n.º 6
0
        protected void AjaxManager_AjaxRequest(object sender, AjaxRequestEventArgs e)
        {
            AjaxArguments args = new AjaxArguments(e);

            switch (args.CommandName)
            {
                case "ChangeStatus":
                    string status = args[0];
                    if (!string.IsNullOrEmpty(ItemId))
                    {
                        using (var manager = new StatusManager())
                        {
                            manager.Update(ItemId, status);
                            InitializeStatusInput(status);
                            Dialog.Info(this, "状态更新成功!");
                        }
                        //btStatus.Visible = true;
                    }
                    break;
                case "InitStatus":
                    string appid = args[0];
                    if (!string.IsNullOrEmpty(appid))
                    {
                        using (var manager = new ApplicationManager())
                        {
                            IApplication app = manager.GetById(appid);
                            if (app.Status != null)
                            {
                                InitializeStatusInput(app.Status.Value);
                            }
                        }
                        //btStatus.Visible = true;
                    }
                    break;
                default:
                    break;
            }
        }