示例#1
0
        /// <summary>
        /// 删除科室
        /// </summary>
        /// <param name="u"></param>
        public void _DelDept(int id)
        {
            DT_WorkUnit wu    = wbll.QueryById(id);
            int         count = wbll.DelUnit(wu);

            if (count > 0)
            {
                Response.Write("<script type='text/javascript'>alert('删除成功!');</script>");
                Response.Write("<script type='text/javascript'>window.location.href='/SystemManage/WorkUnit';</script>");
            }
        }
示例#2
0
        /// <summary>
        /// 修改科室
        /// </summary>
        /// <param name="u"></param>
        public void _UpdDept(DT_WorkUnit w)
        {
            //根据id修改
            DT_WorkUnit wu = wbll.QueryById(w.Id);

            wu.UnitName    = w.UnitName;
            wu.UpdDeptTime = DateTime.Now;

            int count = wbll.UpdUnit(wu);

            if (count > 0)
            {
                Response.Write("1");
            }
            else
            {
                Response.Write("0");
            }
            Response.End();
        }
示例#3
0
        /// <summary>
        /// 添加单位
        /// </summary>
        /// <param name="u"></param>
        public void _AddUnit(DT_WorkUnit w)
        {
            DT_UserLoginRecord u = (DT_UserLoginRecord)Session["user"];

            DT_WorkUnit wu = new DT_WorkUnit();

            wu.UnitName    = w.UnitName;
            wu.AddUnitTime = DateTime.Now;
            wu.CreateUnit  = u.Telphone;

            int count = wbll.AddUnit(wu);

            if (count > 0)
            {
                Response.Write("1");
            }
            else
            {
                Response.Write("0");
            }
            Response.End();
        }
示例#4
0
 /// <summary>
 /// 删除单位
 /// </summary>
 /// <param name="u"></param>
 /// <returns></returns>
 public int DelUnit(DT_WorkUnit w)
 {
     return(wdal.DelUnit(w));
 }
示例#5
0
 /// <summary>
 /// 修改单位
 /// </summary>
 /// <param name="u"></param>
 /// <returns></returns>
 public int UpdUnit(DT_WorkUnit w)
 {
     return(wdal.UpdUnit(w));
 }
示例#6
0
        ///// <summary>
        ///// 查询出单位所有id
        ///// </summary>
        ///// <returns></returns>
        //public List<int> SelectIds()
        //{
        //    return wdal.SelectIds();
        //}

        /// <summary>
        /// 添加单位
        /// </summary>
        /// <param name="u"></param>
        /// <returns></returns>
        public int AddUnit(DT_WorkUnit w)
        {
            return(wdal.AddUnit(w));
        }