Beispiel #1
0
        public ActionResult CreateContragent(string name, int humanID, int clientID)
        {
            var mng = new FinanceManager();

            int?humanID_ = null;

            if (humanID != 0)
            {
                humanID_ = humanID;
            }

            int?clientID_ = null;

            if (clientID != 0)
            {
                clientID_ = clientID;
            }

            var item = new fin_contragents
            {
                id       = 0,
                humanID  = humanID_,
                clientID = clientID_,
                name     = name
            };

            mng.SaveFinContragents(item);

            return(Json(new
            {
                result = item.id > 0,
                contragentID = item.id
            }));
        }