Ejemplo n.º 1
0
        public ActionResult DeleteFile(int id)
        {
            ICommonHandler handler = ServiceContainer.GetService <ICommonHandler>() as ICommonHandler;

            handler.DeleteAttachFileByID(id, Session.SessionID);
            List <tbt_AttachFile> list = handler.GetAttachFile(Session.SessionID);

            ViewBag.AttachFileList = list;
            return(View("Upload"));
        }
        /// <summary>
        /// Remove attach file
        /// </summary>
        /// <param name="AttachID"></param>
        /// <returns></returns>
        public ActionResult CTS230_RemoveAttach(string AttachID)
        {
            ObjectResultData res           = new ObjectResultData();
            ICommonHandler   commonhandler = ServiceContainer.GetService <ICommonHandler>() as ICommonHandler;

            try
            {
                int _attachID = int.Parse(AttachID);

                commonhandler.DeleteAttachFileByID(_attachID, GetCurrentKey());

                res.ResultData = true;
            }
            catch (Exception ex)
            {
                res.AddErrorMessage(ex);
            }

            return(Json(res));
        }