Exemplo n.º 1
0
        public JsonResult EditOrganization_type(FormCollection form)
        {
            Common.Json         json      = new Common.Json();
            B_Organization_type b_orgtype = new B_Organization_type();

            Domain.Organization_type m_orgtype = b_orgtype.Get(Convert.ToInt32(form["id"]));
            m_orgtype.orgtype_name = form["txt_name"];
            m_orgtype.sort_id      = Convert.ToInt32(form["txt_sort_id"]);
            m_orgtype.remark       = form["txt_remark"];
            b_orgtype.Update(m_orgtype);
            json.msg = "修改成功!";
            return(Json(json));
        }
Exemplo n.º 2
0
        public JsonResult AddOrganization_type(FormCollection form)
        {
            Common.Json         json      = new Common.Json();
            B_Organization_type b_orgtype = new B_Organization_type();

            Domain.Organization_type m_orgtype = new Domain.Organization_type();
            m_orgtype.orgtype_name = form["txt_name"];
            m_orgtype.sort_id      = Convert.ToInt32(form["txt_sort_id"]);
            m_orgtype.remark       = form["txt_remark"];
            var res = b_orgtype.Save(m_orgtype);

            if (res <= 0)
            {
                json.status = -1;
                json.msg    = "添加失败!";
                return(Json(json));
            }
            json.msg = "添加成功!";
            return(Json(json));
        }
Exemplo n.º 3
0
 public void Update(Domain.Organization_type model)
 {
     dal.Update(model);
 }
Exemplo n.º 4
0
 public int Save(Domain.Organization_type model)
 {
     return(Convert.ToInt32(dal.Save(model)));
 }