Exemple #1
0
        protected void OnRowCmdParams(Object Sender, GridViewCommandEventArgs args)
        {
            RedirectController redirCtrl = new RedirectController();

            switch (args.CommandName)
            {
            case "del":
                redirCtrl.RemoveRedirectParam(Convert.ToInt32(args.CommandArgument));
                break;

            case "priority_up":
                RedirectInfoParam rinc = redirCtrl.GetRedirectParamById(Convert.ToInt32(args.CommandArgument));
                rinc.RedirectPriority++;
                rinc.Save();
                break;

            case "priority_down":
                RedirectInfoParam rdec = redirCtrl.GetRedirectParamById(Convert.ToInt32(args.CommandArgument));
                rdec.RedirectPriority--;
                rdec.Save();
                break;
            }

            BindData();
        }
        protected void OnRowCmdParams(Object Sender, GridViewCommandEventArgs args)
        {
            RedirectController redirCtrl = new RedirectController();
            switch (args.CommandName) {
                case "del":
                    redirCtrl.RemoveRedirectParam(Convert.ToInt32(args.CommandArgument));
                    break;
                case "priority_up":
                    RedirectInfoParam rinc = redirCtrl.GetRedirectParamById(Convert.ToInt32(args.CommandArgument));
                    rinc.RedirectPriority++;
                    rinc.Save();
                    break;
                case "priority_down":
                    RedirectInfoParam rdec = redirCtrl.GetRedirectParamById(Convert.ToInt32(args.CommandArgument));
                    rdec.RedirectPriority--;
                    rdec.Save();
                    break;
            }

            BindData();
        }