List <Model.goods_cls> IGoodsCls.GetListForMenu() { var req = new Request(); var json = req.request("/goods_cls?t=get_list_for_menu", "{\"is_first_level\":\"0\"}"); ReadWriteContext.IReadContext read = new ReadWriteContext.ReadContextByJson(json); if (read.Read("errId") != "0") { throw new Exception(read.Read("errMsg")); } var lst = new List <Model.goods_cls>(); if (read.Read("datas") != "") { foreach (ReadWriteContext.IReadContext r in read.ReadList("datas")) { var item = new Model.goods_cls(); lst.Add(item); item.cls_id = r.Read("cls_id"); item.cls_no = r.Read("cls_no"); item.cls_name = r.Read("cls_name"); item.status = r.Read("status"); item.is_show_mall = r.Read("is_show_mall"); } } return(lst); }
List <Model.goods_cls> IGoodsCls.GetList(string parent_cls_no, string keyword, int pageSize, int pageIndex, out int total) { var req = new Request(); var json = req.request("/goods_cls?t=get_list", "{\"parent_cls_no\":\"" + parent_cls_no + "\",\"keyword\":\"" + keyword + "\",\"pageSize\":\"" + pageSize + "\",\"pageIndex\":\"" + pageIndex + "\"}"); ReadWriteContext.IReadContext read = new ReadWriteContext.ReadContextByJson(json); if (read.Read("errId") != "0") { throw new Exception(read.Read("errMsg")); } // total = Conv.ToInt(read.Read("total")); // var lst = new List <Model.goods_cls>(); if (read.Read("datas") != "") { foreach (ReadWriteContext.IReadContext r in read.ReadList("datas")) { var item = new Model.goods_cls(); lst.Add(item); item.cls_id = r.Read("cls_id"); item.cls_no = r.Read("cls_no"); item.cls_name = r.Read("cls_name"); item.status = r.Read("status"); item.is_show_mall = r.Read("is_show_mall"); item.cus_group = r.Read("cus_group"); item.supcust_groupname = r.Read("supcust_groupname"); } } return(lst); }
Model.goods_cls IGoodsCls.GetClsInfo(string cls_no) { var req = new Request(); var json = req.request("/goods_cls?t=get_cls_info", "{\"cls_no\":\"" + cls_no + "\"}"); ReadWriteContext.IReadContext read = new ReadWriteContext.ReadContextByJson(json); if (read.Read("errId") != "0") { throw new Exception(read.Read("errMsg")); } else { var item = new Model.goods_cls(); item.cls_id = read.Read("cls_id"); item.cls_no = read.Read("cls_no"); item.cls_name = read.Read("cls_name"); item.status = read.Read("status"); item.is_show_mall = read.Read("is_show_mall"); item.cus_group = read.Read("cus_group"); item.supcust_groupname = read.Read("supcust_groupname"); return(item); } }
public frmGoodsClsChange(string cls_id, Model.goods_cls item) { InitializeComponent(); // control.FormEsc.Bind(this); control.ClickActive.addActive(pnl_ok); control.ClickActive.addActive(pnl_cancel); bll = new BLL.GoodsCls(); // this.cls_id = cls_id; if (item != null) { lbl_cls_no.Text = item.cls_no; lbl_cls_name.Text = item.cls_name; if (item.is_show_mall == "1") { checkBox1.Checked = true; } } }