Esempio n. 1
0
        public ActionResult Addaccount()
        {
            Entity.account_Entity account = new account_Entity();


            account.AgencyNo     = Request["AgencyNo"];
            account.account_no   = Request["account_no"];
            account.account_name = Request["account_name"];
            account.rg_code      = Request["rg_code"];
            account.type_code    = Request["type_code"];
            account.type_name    = Request["type_name"];
            int i = account_BLL.Createaccount(account);

            if (i > 0)
            {
                var json = new
                {
                    code = 0,
                    msg  = "添加成功!"
                };
                return(Json(json));
            }
            else
            {
                var json = new
                {
                    code = 1,
                    msg  = "添加失败!"
                };
                return(Json(json));
            }
        }
Esempio n. 2
0
        public ActionResult delaccount()
        {
            Entity.account_Entity account = new account_Entity();

            int id = Convert.ToInt32(Request["ID"]);

            account.AgencyNo     = Request["AgencyNo"];
            account.account_no   = Request["account_no"];
            account.account_name = Request["account_name"];
            account.rg_code      = Request["rg_code"];
            account.type_code    = Request["type_code"];
            account.type_name    = Request["type_name"];
            int i = account_BLL.deleteaccount(id);

            if (i > 0)
            {
                var json = new
                {
                    code = 0,
                    msg  = "删除成功!"
                };
                return(Json(json));
            }
            else
            {
                var json = new
                {
                    code = 1,
                    msg  = "删除失败!"
                };
                return(Json(json));
            }
        }