Ejemplo n.º 1
0
        public void Del(Model.bi_t_supcust_info sup)
        {
            JsonRequest r = new JsonRequest();

            r.Write("supcust_no", sup.supcust_no);

            r.request("/cus?t=delete");

            if (!r.ReadSuccess())
            {
                throw new Exception(r.ReadMessage());
            }
        }
Ejemplo n.º 2
0
        public void Add(Model.bi_t_supcust_info sup)
        {
            JsonRequest r = new JsonRequest();

            r.Write <bi_t_supcust_info>(sup);

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

            if (!r.ReadSuccess())
            {
                throw new Exception(r.ReadMessage());
            }
        }
Ejemplo n.º 3
0
        public void Update(Model.bi_t_supcust_info sup)
        {
            JsonRequest r = new JsonRequest();

            r.Write <bi_t_supcust_info>(sup);

            r.request("/sup?t=change");

            if (!r.ReadSuccess())
            {
                throw new Exception(r.ReadMessage());
            }
        }
Ejemplo n.º 4
0
        private void LoadTv()
        {
            if (itemcls_lis != null && itemcls_lis.Count > 0)
            {
                this.itemcls_lis.Clear();
            }
            this.tv.Nodes.Clear();
            int      cb_index = Conv.ToInt(cb.SelectedValue);
            TreeNode tn       = new TreeNode("所有");

            if (cb_index == 1)
            {
                tn = new TreeNode("所有类别");
                IBLL.IItemCls bll = new BLL.ItemClsBLL();
                itemcls_lis = bll.GetAllList();
            }
            else if (cb_index == 2)
            {
                tn = new TreeNode("所有货商");
                IBLL.ISup bll = new BLL.SupBLL();
                int       tmp;
                var       tb = bll.GetDataTable("", "", 1, 1, 20000, out tmp);
                sup_lis = new List <bi_t_supcust_info>();
                foreach (DataRow row in tb.Rows)
                {
                    Model.bi_t_supcust_info it = DB.ReflectionHelper.DataRowToModel <Model.bi_t_supcust_info>(row);
                    sup_lis.Add(it);
                }
            }
            else if (cb_index == 3)
            {
                tn = new TreeNode("所有品牌");
            }
            else if (cb_index == 4)
            {
                tn = new TreeNode("所有属性");
            }
            tn.Tag = "";
            this.tv.Nodes.Add(tn);
            LoadTreeView();

            //
            this.tv.Nodes[0].Expand();
        }