public ActionResult EditInvoice(Mikhailova_invoices item)
        {
            var mng = new ContractsManager();

            mng.SaveInvoice(item);

            return(Json(new { result = true }));
        }
        public ActionResult CreateInvoice(string number, int contagentID, string desc)
        {
            var mng      = new ContractsManager();
            int statusID = 1;
            var item     = new Mikhailova_invoices
            {
                id          = 0,
                number      = number,
                date        = DateTime.Now.Date,
                statusID    = statusID,
                contagentID = contagentID,
                desc        = desc
            };

            mng.SaveInvoice(item);
            return(Json(new
            {
                result = item.id > 0,
                savedID = item.id,
            }, JsonRequestBehavior.AllowGet));
        }