Пример #1
0
        // GET: Salary_item
        public ActionResult Index()
        {
            IFBLLClient ibc = UserIOC.CreateClientBLL();
            List <config_public_charModel> list = ibc.SELECTClient();

            return(View(list));
        }
Пример #2
0
        public ActionResult Delete(int id, config_public_charModel cm)
        {
            IFBLLClient ibc    = UserIOC.CreateClientBLL();
            int         result = ibc.DELETEClient(cm);

            if (result > 0)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                return(View());
            }
        }
Пример #3
0
        // GET: Salary_item/Delete/5
        //删除
        public ActionResult Salary_itemDelete(int id)
        {
            IFBLLClient ibc = UserIOC.CreateClientBLL();
            int         i   = ibc.DELETEClient(new config_public_charModel()
            {
                Id = id
            });

            if (i > 0)
            {
                //return RedirectToAction("Index");
                return(Content("<script>alert('删除成功');window.location.href='/Salary_item/index'</script>"));
            }
            else
            {
                return(Content("<script>alert('删除失败');window.location.href='/Salary_item/index'</script>"));
            }
        }
Пример #4
0
        public ActionResult Create(config_public_charModel cm)
        {
            if (ModelState.IsValid)
            {
                IFBLLClient ibc    = UserIOC.CreateClientBLL();
                int         result = ibc.ADDClient(cm);
                if (result > 0)
                {
                    //return RedirectToAction("Index");

                    return(Content("<script>alert('新增成功');window.location.href='/Salary_item/index'</script>"));
                }
                else
                {
                    return(View());
                }
            }
            else
            {
                return(View());
            }
        }