Esempio n. 1
0
        public ActionResult PartVendorQuotesGridViewPartialDelete([ModelBinder(typeof(DevExpressEditorsBinder))] System.Int32 RowId)
        {
            if (RowId >= 0)
            {
                var tranDT   = new ObjectParameter("TranDT", typeof(DateTime?));
                var result   = new ObjectParameter("Result", typeof(Int32?));
                var debugMsg = new ObjectParameter("DebugMsg", typeof(String));

                string attachmentCategory = "VendorQuote";
                try
                {
                    _context.usp_DeletePartVendorQuote("", RowId, attachmentCategory, tranDT, result, 0, debugMsg);
                }
                catch (EntityCommandExecutionException e)
                {
                    ViewData["EditError"] = "SQL Error: " + e.Message + " " + e.InnerException?.Message;
                }
                catch (Exception e)
                {
                    ViewData["EditError"] = "NON-SQL Error: " + e.Message + " " + e.InnerException?.Message;
                }
            }

            return(PartVendorQuotesGridViewPartial());
        }