Пример #1
0
        public static string DeleteFun(string id, string dwbm)
        {
            //检查参数是否有误
            if (string.IsNullOrWhiteSpace(id) || string.IsNullOrWhiteSpace(dwbm))
            {
                return(ReturnString.JsonToString(Prompt.error, "请选中一个选中项", null));
            }


            var bll = new EDRS.BLL.XT_QX_GNDY(request);

            //删除
            try
            {
                //修改标记为:"Y"
                var mode = bll.GetModel(id, dwbm);

                bll.Delete(mode.GNBM, mode.DWBM);
            }
            catch (Exception)
            {
                return(ReturnString.JsonToString(Prompt.error, "删除数据发生异常", null));
            }
            return(ReturnString.JsonToString(Prompt.win, "删除成功", null));
        }
Пример #2
0
    /// <summary>
    /// 绑定菜单
    /// </summary>
    public string GetBindingMenu()
    {
        string dwbm = this.userInfo.DWBM;
        string gh   = this.userInfo.GH;

        if (string.IsNullOrEmpty(dwbm) || string.IsNullOrEmpty(gh))
        {
            return(ReturnString.JsonToString(Prompt.error, "参数错误", null));
        }
        string where = "";
        //switch (this.UserDwbm.DWJB) {
        //    case "1":
        //        where = " and sfgjysy='Y'";
        //        break;
        //    case "2":
        //        where = " and sfsysy='Y'";
        //        break;
        //    case "3":
        //        where = " and sfsjysy='Y'";
        //        break;
        //    case "4":
        //        where = " and sfqysy='Y'";
        //        break;
        //}

        EDRS.BLL.XT_QX_GNDY bll = new EDRS.BLL.XT_QX_GNDY(this.Request);
        DataSet             ds  = bll.GetListByBound(dwbm, gh, where, null);

        if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
        {
            bool isOpen = true;

            return(new TreeJson(ds.Tables[0], "flbm", "flmc", "fflbm", "gnct", "", "", "", isOpen, true).ResultJson.ToString());
        }
        return(ReturnString.JsonToString(Prompt.error, "该账号未设置任何功能", null));
    }
Пример #3
0
 /// <summary>
 /// 根据工号和单位编码获取功能列表
 /// </summary>
 /// <param name="dwbm"></param>
 /// <param name="gh"></param>
 /// <returns></returns>
 private DataSet GetListByBound(string dwbm, string gh)
 {
     EDRS.BLL.XT_QX_GNDY bll = new EDRS.BLL.XT_QX_GNDY(this.Request);
     return(bll.GetListByBound(dwbm, gh, "", null));
 }