Пример #1
0
        public ActionResult DeleteSummary(int id = 0)
        {
            FormsAuthenticationTicket authentication = CommonFuntion.GetAuthenticationTicket();
            int mana_id = authentication == null ? 0 : Convert.ToInt32(authentication.Name);

            var json_result = new JsonResult();

            InterfaceSummaryService summary_service = new SummaryService();

            try
            {
                t_summary delete = summary_service.GetByID(id);
                if (delete != null && delete.mana_id == mana_id)
                {
                    summary_service.Delete(delete);
                    json_result.Data = new { Result = true, Message = "" };
                }
                else
                {
                    json_result.Data = new { Result = false, Message = HtmlExtensions.Lang("_Error_Comm_Para") };
                }
            }
            catch
            {
                json_result.Data = new { Result = false, Message = HtmlExtensions.Lang("_Error_Comm_Para") };
            }
            return(json_result);
        }