Beispiel #1
0
        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));
        }
Beispiel #2
0
        /// <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);
        }
Beispiel #3
0
        public int Delete(tb_XFMX p)
        {
            string res = http.Delete(GetUrl(RequestEnum.tb_XFMX), p).ReadAsStringAsync().Result;

            return(res.ToDeserialize <int>());
        }
Beispiel #4
0
        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> >());
        }
Beispiel #5
0
        public int Update(tb_XFMX p)
        {
            string res = http.Put(GetUrl(RequestEnum.tb_XFMX), p).ReadAsStringAsync().Result;

            return(res.ToSerializer <int>());
        }
Beispiel #6
0
        public int Delete(tb_XFMX parameter)
        {
            tb_XFMXBLL bll = new tb_XFMXBLL();

            return(bll.Delete(parameter));
        }
Beispiel #7
0
        public int Put([FromBody] tb_XFMX parameter)
        {
            tb_XFMXBLL bll = new tb_XFMXBLL();

            return(bll.Update(parameter));
        }
Beispiel #8
0
        public int Post([FromBody] tb_XFMX parameter)
        {
            tb_XFMXBLL bll = new tb_XFMXBLL();

            return(bll.Add(parameter));
        }