Пример #1
0
        protected void DeleteButton_Click(object sender, EventArgs e)
        {
            base.CheckAdminPower("DeleteArticle", PowerCheckType.Single);
            string intsForm = RequestHelper.GetIntsForm("SelectID");

            if (intsForm != string.Empty)
            {
                ArticleBLL.DeleteArticle(intsForm);
                AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("DeleteRecord"), ShopLanguage.ReadLanguage("Article"), intsForm);
                ScriptHelper.Alert(ShopLanguage.ReadLanguage("DeleteOK"), RequestHelper.RawUrl);
            }
        }
Пример #2
0
        // GET: Article/Delete/5
        public ActionResult Delete(int id)
        {
            SystemFail error = new SystemFail();

            ArticleBLL.DeleteArticle(id, error);
            if (!error.Error)
            {
                TempData["StartUpScript"] = "$.notify('Se elimino correctamente el articulo','success');";
            }
            else
            {
                TempData["StartUpScript"] = "$.notify('" + error.Message + "','error');";
            }
            return(RedirectToAction("Index"));
        }