Пример #1
0
        protected void linkbtnRemoveID_Command(object sender, CommandEventArgs e)
        {
            try
            {
                if (e.CommandName == "RemoveID")
                {
                    _cmdArg = Convert.ToInt32(e.CommandArgument);
                    _status = SS.DeleteScheduling(_cmdArg);
                    if (_status == true)
                    {
                        _alert = AlertsClass.SuccessRemove;
                    }
                    else
                    {
                        _alert = AlertsClass.ErrorWentWrong;
                    }
                }

                GvdBindObjdetail(Convert.ToInt32(ddlObject.SelectedValue), Convert.ToInt32(ddlDays.SelectedValue));
                allowStaticMethods("ALerts('" + _alert + "');staticMethod();");
            }
            catch (Exception)
            { BindingClass.ExceptionAlertScriptManager(this.Page, this.GetType()); }

            //if (e.CommandName == "RemoveID")
            //{
            //    string scheduleId = Convert.ToString(e.CommandArgument);
            //    Session["scheduleId"] = Convert.ToInt32(scheduleId);
            //    ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "openDeleteModal();", true);
            //}
        }