public IEnumerable <tb_XFMX> Get(tb_XFMX parameter) { tb_XFMXBLL bll = new tb_XFMXBLL(); if (parameter.IsNotNull() && parameter.Beizhu.IsNotNull()) { switch (parameter.Beizhu) { case "GetHotProducts": string str_sql = "select top 3 count(*) as a,MX_Goods from tb_xfmx group by MX_Goods order by a desc"; return(bll.GetHotProducts(str_sql)); } } return(bll.Find(parameter)); }
/// <summary> /// 获取当前用户名 /// </summary> private void Form1_Load(object sender, EventArgs e) { //jiazai(); //显示当前用户 toolStripStatusLabel3.Text = App.CertificationUser.User_Name; //调用用户权限方法 PermissionInitialization(); ClientServicesProxy proxys = new ClientServicesProxy(); tb_XFMX p = new tb_XFMX { Beizhu = "GetHotProducts" }; GetHotProducts = proxys.Find(p); lv_info.Items.Clear(); panel11.Visible = false; toolStripButton18.Visible = false; Frm_JZ.clmc = this.Text.Trim().Remove(this.Text.Length - 4); Frm_QTxsJZ.clmc = this.Text.Trim().Remove(this.Text.Length - 4); }
public int Delete(tb_XFMX p) { string res = http.Delete(GetUrl(RequestEnum.tb_XFMX), p).ReadAsStringAsync().Result; return(res.ToDeserialize <int>()); }
public List <tb_XFMX> Find(tb_XFMX p) { string res = http.Get(GetUrl(RequestEnum.tb_XFMX), p).ReadAsStringAsync().Result; return(res.ToDeserialize <List <tb_XFMX> >()); }
public int Update(tb_XFMX p) { string res = http.Put(GetUrl(RequestEnum.tb_XFMX), p).ReadAsStringAsync().Result; return(res.ToSerializer <int>()); }
public int Delete(tb_XFMX parameter) { tb_XFMXBLL bll = new tb_XFMXBLL(); return(bll.Delete(parameter)); }
public int Put([FromBody] tb_XFMX parameter) { tb_XFMXBLL bll = new tb_XFMXBLL(); return(bll.Update(parameter)); }
public int Post([FromBody] tb_XFMX parameter) { tb_XFMXBLL bll = new tb_XFMXBLL(); return(bll.Add(parameter)); }