Пример #1
0
        public void Add(Model.bi_t_branch_info branch)
        {
            JsonRequest r = new JsonRequest();

            r.Write <bi_t_branch_info>(branch);

            r.request("/branch?t=add");

            if (!r.ReadSuccess())
            {
                throw new Exception(r.ReadMessage());
            }
        }
Пример #2
0
        public Model.bi_t_branch_info GetItem(Model.bi_t_branch_info branch)
        {
            JsonRequest r = new JsonRequest();

            r.Write <bi_t_branch_info>(branch);

            r.request("/branch?t=get_item");

            if (!r.ReadSuccess())
            {
                throw new Exception(r.ReadMessage());
            }

            branch = r.GetObject <bi_t_branch_info>("data");

            return(branch);
        }