Exemplo n.º 1
0
        protected override void OnLoad(EventArgs e)
        {
            if (userinfo == null || UserID <= 0)
            {
                return;
            }



            e_usertype = (Common.enumUserType)Enum.Parse(typeof(Common.enumUserType), UserType);
            base.OnLoad(e);
            if (this.UserType != Common.enumUserType.host.ToString() && this.UserType != Common.enumUserType.admin.ToString())
            {
                if (TabKey != null && TabKey.Length > 0)
                {
                    if (!TabKey.Trim().ToLower().Equals("all"))
                    {
                        bool isVIEW = PermissionBLL.GetPermission(TabKey, this.UserID, enum_userpermission.VIEW.ToString());
                        if (!isVIEW)
                        {
                            //Response.Write("<script language='javascript'>alert('无查看此页面权限!');</script>");
                            Response.Write("<div style='color:red;font-size:14px;text-align:center;margin-top:10px;'>无查看权限!</div>");
                            Response.End();
                        }
                    }
                }
                else
                {
                    Response.Write("<div style='color:red;font-size:14px;text-align:center;margin-top:10px;'>无查看权限!</div>");
                    Response.End();
                }
            }
        }
Exemplo n.º 2
0
 private void btnApprove_Click(object sender, EventArgs e)
 {
     PermissionBLL.UpdatePermission(detail.PermissionID, PermissionStates.Approved);
     MessageBox.Show("Permission approved");
     FillAll();
     CleanFilters();
 }
Exemplo n.º 3
0
        void FillAll()
        {
            dto = PermissionBLL.GetAll();
            if (!UserStatic.isAdmin)
            {
                dto.Permissions = dto.Permissions.Where(x => x.EmployeeID == UserStatic.EmployeeID).ToList();
            }
            dataGridView1.DataSource = dto.Permissions;

            combofull = false;

            cmbDepartment.DataSource    = dto.Departments;
            cmbDepartment.DisplayMember = "DepartmentName";
            cmbDepartment.ValueMember   = "ID";
            cmbDepartment.SelectedIndex = -1;

            cmbPosition.DataSource    = dto.Positions;
            cmbPosition.DisplayMember = "PositionName";
            cmbPosition.ValueMember   = "ID";
            cmbPosition.SelectedIndex = -1;

            combofull              = true;
            cmbState.DataSource    = dto.States;
            cmbState.DisplayMember = "StateName";
            cmbState.ValueMember   = "ID";
            cmbState.SelectedIndex = -1;
        }
Exemplo n.º 4
0
        public void Dispose()
        {
            if (SeriesRepository != null)
            {
                SeriesRepository.Dispose();
                SeriesRepository = null;
            }

            if (BookingRepository != null)
            {
                BookingRepository.Dispose();
                BookingRepository = null;
            }

            if (PermissionBLL != null)
            {
                PermissionBLL.Dispose();
                PermissionBLL = null;
            }

            if (UserBLL != null)
            {
                UserBLL.Dispose();
                UserBLL = null;
            }

            if (BookingHistoryRepository != null)
            {
                BookingHistoryRepository.Dispose();
                BookingHistoryRepository = null;
            }
        }
Exemplo n.º 5
0
        public IHttpActionResult Get()
        {
            //申明返回对象
            ExtRole model = new ExtRole();

            model.ExtFuns = new List <ExtFun>();

            FunctionBLL       fctionBLL   = new FunctionBLL();
            PermissionBLL     perBLL      = new PermissionBLL();
            List <Function>   Functions   = fctionBLL.GetList(p => p.ISMENU && !string.IsNullOrEmpty(p.PARENTID) && !p.ISPUBLIC && !p.ISDELETED);
            List <Permission> Permissions = perBLL.GetList();

            foreach (Function fun in Functions)
            {
                ExtFun extFun = new ExtFun();
                extFun.FunctionID   = fun.FunctionID;
                extFun.FunctionCode = fun.FunctionCode;
                extFun.FunctionName = fun.FunctionName;
                extFun.IsMenu       = fun.IsMenu;
                extFun.Permissions  = Permissions;

                model.ExtFuns.Add(extFun);
            }

            //返回
            return(Ok(model));
        }
 private void btnDisaprpove_Click(object sender, EventArgs e)
 {
     PermissionBLL.UpdatePermission(detail.PermissionID, PermissionStates.Disapproved);
     MessageBox.Show("Disapproved!");
     FillAllData();
     ClearFilters();
 }
Exemplo n.º 7
0
        protected void Page_Unload(object sender, EventArgs e)
        {
            if (sailsMasterBLL != null)
            {
                sailsMasterBLL.Dispose();
                sailsMasterBLL = null;
            }

            if (permissionBLL != null)
            {
                permissionBLL.Dispose();
                permissionBLL = null;
            }

            if (userBLL != null)
            {
                userBLL.Dispose();
                userBLL = null;
            }

            if (!IsPostBack)
            {
                ClearMessage();
            }
        }
Exemplo n.º 8
0
        protected void Page_Unload(object sender, EventArgs e)
        {
            if (sailsMasterBLL != null)
            {
                sailsMasterBLL.Dispose();
                sailsMasterBLL = null;
            }

            if (permissionBLL != null)
            {
                permissionBLL.Dispose();
                permissionBLL = null;
            }

            if (userBLL != null)
            {
                userBLL.Dispose();
                userBLL = null;
            }

            if (!Page.IsPostBack)
            {
                Session["Redirect"] = false;
            }

            if (!(bool)Session["Redirect"])
            {
                ClearMessage();
            }
        }
Exemplo n.º 9
0
 public SeriesManagerBLL()
 {
     SeriesRepository         = new SeriesRepository();
     BookingRepository        = new BookingRepository();
     PermissionBLL            = new PermissionBLL();
     UserBLL                  = new UserBLL();
     BookingHistoryRepository = new BookingHistoryRepository();
 }
Exemplo n.º 10
0
 protected void Page_Unload(object sender, EventArgs e)
 {
     if (userBLL != null)
     {
         userBLL.Dispose();
         userBLL = null;
     }
     if (permissionBLL != null)
     {
         permissionBLL.Dispose();
         permissionBLL = null;
     }
 }
Exemplo n.º 11
0
 public ResponseUserRoleCheckedGet UserRoleCheckedGet([FromBody] RequestUserRoleCheckedGet request)
 {
     try
     {
         PermissionBLL bll = new PermissionBLL();
         return(bll.UserRoleCheckedGet(request));
     }
     catch (Exception ex)
     {
         throw new HttpResponseException(
                   Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message));
     }
 }
Exemplo n.º 12
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (txtDayAmount.Text.Trim() == "")
            {
                MessageBox.Show("Please pick start date or end date");
            }
            else if (Convert.ToInt32(txtDayAmount.Text) <= 0)
            {
                MessageBox.Show("Please pick start and end date correctly");
            }
            else if (txtExplanation.Text.Trim() == "")
            {
                MessageBox.Show("Explanation is empty!");
            }
            else
            {
                PERMISSION permission = new PERMISSION();
                if (!isUpdated)
                {
                    permission.EmployeeID            = UserStatic.EmployeeID;
                    permission.PermissionState       = 1;
                    permission.PermissionStartDate   = dpStart.Value.Date;
                    permission.PermissionEndDate     = dpEnd.Value.Date;
                    permission.PermissionDay         = Convert.ToInt32(txtDayAmount.Text);
                    permission.PermissionExplanation = txtExplanation.Text;
                    PermissionBLL.AddPermission(permission);
                    MessageBox.Show("Permission added!");
                    permission    = new PERMISSION();
                    dpStart.Value = DateTime.Today;
                    dpEnd.Value   = DateTime.Today;
                    txtDayAmount.Clear();
                    txtExplanation.Clear();
                }

                else if (isUpdated)
                {
                    DialogResult dialogResult = MessageBox.Show("Are you sure?", "Warning", MessageBoxButtons.YesNo);
                    if (dialogResult == DialogResult.Yes)
                    {
                        permission.ID = detail.PermissionID;
                        permission.PermissionExplanation = txtExplanation.Text;
                        permission.PermissionStartDate   = dpStart.Value;
                        permission.PermissionEndDate     = dpEnd.Value;
                        permission.PermissionDay         = Convert.ToInt32(txtDayAmount.Text);
                        PermissionBLL.UpdatePermission(permission);
                        MessageBox.Show("Permission updated!");
                        this.Close();
                    }
                }
            }
        }
Exemplo n.º 13
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     if (txtAmount.Text.Trim() == "")
     {
         MessageBox.Show("Please change end or start date");
     }
     else if (Convert.ToInt32(txtAmount.Text) <= 0)
     {
         MessageBox.Show("Permission day must be greater than 0");
     }
     else if (txtExplanation.Text.Trim() == "")
     {
         MessageBox.Show("Explain the permission");
     }
     else
     {
         Permission permission = new Permission();
         if (!isUpdated)
         {
             permission.EmployeeID          = UserStatic.EmployeeID;
             permission.PermissionState     = 1;
             permission.PermissionStartDate = dpStart.Value.Date;
             permission.PermissionEndDate   = dpFinish.Value.Date;
             permission.PermissionDay       = Convert.ToInt32(txtAmount.Text);
             permission.PermissionExplain   = txtExplanation.Text;
             PermissionBLL.AddPermission(permission);
             MessageBox.Show("Permission was created");
             permission     = new Permission();
             dpStart.Value  = DateTime.Today;
             dpFinish.Value = DateTime.Today;
             txtAmount.Clear();
             txtExplanation.Clear();
         }
         else if (isUpdated)
         {
             DialogResult result = MessageBox.Show("Do you want to continue?", "Warning", MessageBoxButtons.YesNo);
             if (result == DialogResult.Yes)
             {
                 permission.ID = detail.PermissionID;
                 permission.PermissionExplain   = txtExplanation.Text;
                 permission.PermissionStartDate = dpStart.Value;
                 permission.PermissionEndDate   = dpFinish.Value;
                 permission.PermissionDay       = Convert.ToInt32(txtAmount.Text);
                 PermissionBLL.UpdatePermission(permission);
                 MessageBox.Show("The permission was updated");
                 this.Close();
             }
         }
     }
 }
Exemplo n.º 14
0
        public string SystemBookingPendingMessaging()
        {
            if (CurrentUser == null)
            {
                return("");
            }

            if (PermissionBLL.UserCheckRole(CurrentUser.Id, (int)Roles.Administrator))
            {
                return("System total: " + SailsMasterBLL.SystemBookingPendingCount());
            }

            return("");
        }
Exemplo n.º 15
0
 public IHttpActionResult Get()
 {
     try
     {
         List <Permission>             list     = new PermissionBLL().GetList();
         Response <List <Permission> > response = new Response <List <Permission> >
         {
             Data = list,
         };
         return(Ok(response));
     }
     catch (Exception ex)
     {
         LogHelper.WriteInfo(ex.ToString());
         return(BadRequest(ex.Message));
     }
 }
        private void btnDelete_Click(object sender, EventArgs e)
        {
            DialogResult result = MessageBox.Show("Are you sure?", "Warning", MessageBoxButtons.YesNo);

            if (result == DialogResult.Yes)
            {
                if (detail.State == PermissionStates.Approved || detail.State == PermissionStates.Disapproved)
                {
                    MessageBox.Show("You can't delete approved or disapproved permission!");
                }
                else
                {
                    PermissionBLL.DeletePermision(detail.PermissionID);
                    MessageBox.Show("Permission deleted!");
                    FillAllData();
                    ClearFilters();
                }
            }
        }
Exemplo n.º 17
0
        public IList <Series> SeriesBookingGetAllByQueryString(System.Collections.Specialized.NameValueCollection nvcQueryString, int pageSize, int currentPageIndex, out int count)
        {
            string partnerName = null;

            try
            {
                partnerName = nvcQueryString["p"];
            }
            catch { }

            string seriesCode = null;

            try
            {
                seriesCode = nvcQueryString["sc"];
            }
            catch { }

            int agencyId = -1;

            try
            {
                agencyId = Int32.Parse(nvcQueryString["ai"]);
            }
            catch { }

            int salesInCharge = -1;

            try
            {
                salesInCharge = Int32.Parse(nvcQueryString["sic"]);
            }
            catch { }

            var haveViewAllSeriesPermission = PermissionBLL.UserCheckPermission(UserBLL.UserGetCurrent().Id, (int)PermissionEnum.VIEWALLSERIES);

            if (!haveViewAllSeriesPermission)
            {
                salesInCharge = UserBLL.UserGetCurrent().Id;
            }

            return(SeriesRepository.SeriesGetByQueryString(partnerName, seriesCode, agencyId, salesInCharge, pageSize, currentPageIndex, out count));
        }
Exemplo n.º 18
0
        public new void Dispose()
        {
            if (addSeriesBookingsBLL != null)
            {
                addSeriesBookingsBLL.Dispose();
                addSeriesBookingsBLL = null;
            }

            if (userBLL != null)
            {
                userBLL.Dispose();
                userBLL = null;
            }

            if (permissionBLL != null)
            {
                permissionBLL.Dispose();
                permissionBLL = null;
            }
        }
Exemplo n.º 19
0
        private void bindlist(Literal Literal1, int TabID)
        {
            List <PermissionInfo> list = PermissionBLL.GetList(-1, "PermissionCode='SYSTEM_TAB' AND (TabID=0 OR TabID is NULL or TabID=" + TabID + ")", "");//.GetListTabsPermission(TabID);
            string str = "";


            DataTable dt = BLL.TabPermissionBLL.GetAllTabPermission();// PermissionController.GetDataTableAllTabPermission();
            DataView  dv = new DataView(dt);


            foreach (PermissionInfo info in list)
            {
                string ck = "";
                dv.RowFilter = "RoleID=" + roleid + " and PermissionID=" + info.PermissionID + " and TabID=" + TabID.ToString();
                if (dv.Count > 0)
                {
                    ck = "checked=\"checked\"";
                }

                str += "<label><input type=\"checkbox\" name=\"PermissionBox\" id=\"Permission" + info.PermissionID + "\" value=\"" + info.PermissionID + "|" + TabID + "\" " + ck + " />&nbsp;" + info.PermissionName + "</label>&nbsp;&nbsp;";
            }
            Literal1.Text = str;
        }
Exemplo n.º 20
0
        /// <summary>
        /// 获取统计列表
        /// </summary>
        /// <returns></returns>
        public ActionResult ReportsList()
        {
            int pageSize = int.Parse(Request.Form["rows"]);
            //获取请求的页码
            int pageIndex = int.Parse(Request.Form["page"]);
            //从行数
            int rowCount = 0;

            //在session中获取CenterID
            //center center = SessionHelper.GetSession(SessionHelper.LoginCenter) as center;

            // 查询分页数据
            List <permission> list = new PermissionBLL().getPermissionBy(center.id, pageIndex, pageSize, out rowCount);
            // 生成规定格式的 json字符串发回 给异步对象
            DataGridModel dgModel = new DataGridModel()
            {
                total  = rowCount,
                rows   = list,
                footer = null
            };

            return(Json(dgModel));
        }
Exemplo n.º 21
0
        public void NavigateVisibleByPermission()
        {
            if (CurrentUser == null)
            {
                return;
            }

            if (PermissionBLL.UserCheckRole(CurrentUser.Id, (int)Roles.Administrator))
            {
                return;
            }

            pAddBooking.Visible        = PermissionBLL.UserCheckPermission(CurrentUser.Id, (int)PermissionEnum.FORM_ADDBOOKING);
            pAddSeriesBookings.Visible = PermissionBLL.UserCheckPermission(CurrentUser.Id, (int)PermissionEnum.FORM_ADDBOOKING);
            pBookingList.Visible       = PermissionBLL.UserCheckPermission(CurrentUser.Id, (int)PermissionEnum.FORM_BOOKINGLIST);
            pSerialManager.Visible     = PermissionBLL.UserCheckPermission(CurrentUser.Id, (int)PermissionEnum.FORM_BOOKINGLIST);
            pOrders.Visible            = PermissionBLL.UserCheckPermission(CurrentUser.Id, (int)PermissionEnum.FORM_ORDERREPORT);
            pBookingDate.Visible       = PermissionBLL.UserCheckPermission(CurrentUser.Id, (int)PermissionEnum.FORM_BOOKINGREPORT);
            pBookingReport.Visible     = PermissionBLL.UserCheckPermission(CurrentUser.Id, (int)PermissionEnum.FORM_BOOKINGREPORTPERIOD);
            pIncomeReport.Visible      = PermissionBLL.UserCheckPermission(CurrentUser.Id, (int)PermissionEnum.FORM_INCOMEREPORT);
            pReceivable.Visible        = PermissionBLL.UserCheckPermission(CurrentUser.Id, (int)PermissionEnum.FORM_PAYMENTREPORT);
            pExpenseReport.Visible     = PermissionBLL.UserCheckPermission(CurrentUser.Id, (int)PermissionEnum.FORM_EXPENSEREPORT);
            pPayable.Visible           = PermissionBLL.UserCheckPermission(CurrentUser.Id, (int)PermissionEnum.FORM_PAYABLELIST);
            pBalance.Visible           = PermissionBLL.UserCheckPermission(CurrentUser.Id, (int)PermissionEnum.FORM_BALANCEREPORT);
            pSummary.Visible           = PermissionBLL.UserCheckPermission(CurrentUser.Id, (int)PermissionEnum.FORM_RECEIVABLETOTAL);
            pAgencyEdit.Visible        = PermissionBLL.UserCheckPermission(CurrentUser.Id, (int)PermissionEnum.FORM_AGENCYEDIT);
            pAgencyList.Visible        = PermissionBLL.UserCheckPermission(CurrentUser.Id, (int)PermissionEnum.FORM_AGENCYLIST);
            pAgencyPolicies.Visible    = PermissionBLL.UserCheckPermission(CurrentUser.Id, (int)PermissionEnum.FORM_AGENTLIST);
            pTripEdit.Visible          = PermissionBLL.UserCheckPermission(CurrentUser.Id, (int)PermissionEnum.FORM_SAILSTRIPEDIT);
            pTripList.Visible          = PermissionBLL.UserCheckPermission(CurrentUser.Id, (int)PermissionEnum.FORM_SAILSTRIPLIST);
            pCruiseEdit.Visible        = PermissionBLL.UserCheckPermission(CurrentUser.Id, (int)PermissionEnum.FORM_CRUISESEDIT);
            pCruiseList.Visible        = PermissionBLL.UserCheckPermission(CurrentUser.Id, (int)PermissionEnum.FORM_CRUISESLIST);
            pRoomClass.Visible         = PermissionBLL.UserCheckPermission(CurrentUser.Id, (int)PermissionEnum.FORM_ROOMCLASSEDIT);
            pRoomType.Visible          = PermissionBLL.UserCheckPermission(CurrentUser.Id, (int)PermissionEnum.FORM_ROOMTYPEXEDIT);
            pRoomEdit.Visible          = PermissionBLL.UserCheckPermission(CurrentUser.Id, (int)PermissionEnum.FORM_ROOMEDIT);
            pRoomList.Visible          = PermissionBLL.UserCheckPermission(CurrentUser.Id, (int)PermissionEnum.FORM_ROOMLIST);
            pExtraService.Visible      = PermissionBLL.UserCheckPermission(CurrentUser.Id, (int)PermissionEnum.FORM_EXTRAOPTIONEDIT);
            pCostingConfig.Visible     = PermissionBLL.UserCheckPermission(CurrentUser.Id, (int)PermissionEnum.FORM_COSTING);
            pDailyManualCost.Visible   = PermissionBLL.UserCheckPermission(CurrentUser.Id, (int)PermissionEnum.FORM_BOOKINGREPORT);
            pHaiPhong.Visible          = PermissionBLL.UserCheckPermission(CurrentUser.Id, (int)PermissionEnum.FORM_CRUISECONFIG);
            pExpensePeriod.Visible     = PermissionBLL.UserCheckPermission(CurrentUser.Id, (int)PermissionEnum.FORM_EXPENSEPERIOD);
            pCostTypes.Visible         = PermissionBLL.UserCheckPermission(CurrentUser.Id, (int)PermissionEnum.FORM_COSTTYPES);
            pUSDRate.Visible           = PermissionBLL.UserCheckPermission(CurrentUser.Id, (int)PermissionEnum.FORM_EXCHANGERATE);

            if (pAddBooking.Visible || pAddSeriesBookings.Visible || pBookingList.Visible || pSerialManager.Visible || pOrders.Visible || pBookingDate.Visible || pBookingReport.Visible)
            {
                tabBooking.Visible = true;
            }
            else
            {
                tabBooking.Visible = false;
            }

            if (pIncomeReport.Visible || pReceivable.Visible || pExpenseReport.Visible || pHaiPhongExpenseReport.Visible || pPayable.Visible ||
                pBalance.Visible || pSummary.Visible || pInspection.Visible)
            {
                tabReports.Visible = true;
            }
            else
            {
                tabReports.Visible = false;
            }

            if (pAgencyEdit.Visible || pVoucherEdit.Visible || pVoucherList.Visible || pVoucherTemplates.Visible || pAgencyList.Visible ||
                pAgencyPolicies.Visible || pAgencyViewMeetings.Visible || pAgencyLocation.Visible)
            {
                tabConfiguration.Visible = true;
            }
            else
            {
                tabConfiguration.Visible = false;
            }

            if (pTripEdit.Visible || pTripList.Visible || pCruiseEdit.Visible || pCruiseList.Visible)
            {
                tabTrips.Visible = true;
            }
            else
            {
                tabTrips.Visible = false;
            }

            if (pRoomClass.Visible || pRoomType.Visible || pRoomEdit.Visible || pRoomList.Visible)
            {
                tabRoom.Visible = true;
            }
            else
            {
                tabRoom.Visible = false;
            }

            if (pExtraService.Visible || pCostingConfig.Visible || pDailyManualCost.Visible || pExpensePeriod.Visible || pHaiPhong.Visible ||
                pCostTypes.Visible || pUSDRate.Visible)
            {
                tabCost.Visible = true;
            }
            else
            {
                tabCost.Visible = false;
            }
        }
Exemplo n.º 22
0
 public PermissionController(ApplicationDbContext context)
 {
     _permissionBLL = new PermissionBLL(context);
 }
Exemplo n.º 23
0
        public IHttpActionResult Get(string roleId)
        {
            if (string.IsNullOrEmpty(roleId))
            {
                return(BadRequest("非法请求!"));
            }

            //申明返回对象
            ExtRole model = new ExtRole();
            Role    role  = bll.Get(roleId);

            if (role == null)
            {
                return(BadRequest("该记录不存在!"));
            }
            model.RoleID         = role.RoleID;
            model.RoleName       = role.RoleName;
            model.SystemCategory = role.SystemCategory;
            model.Remark         = role.Remark;
            model.ExtFuns        = new List <ExtFun>();

            FunctionBLL     fctionBLL = new FunctionBLL();
            RoleFunctionBLL rfBLL     = new RoleFunctionBLL();
            PermissionBLL   perBLL    = new PermissionBLL();

            List <Function>     Functions   = fctionBLL.GetList(p => p.ISMENU && !string.IsNullOrEmpty(p.PARENTID) && !p.ISPUBLIC && !p.ISDELETED);
            List <Permission>   Permissions = perBLL.GetList();
            List <RoleFunction> roleFuns    = rfBLL.GetList(p => !p.ISDELETED && p.ROLEID.Equals(roleId));

            foreach (Function fun in Functions)
            {
                List <Permission> _temPermission = new List <Permission>();

                foreach (Permission pm in Permissions)
                {
                    Permission _temp = new Permission();
                    _temp.PermissionID    = pm.PermissionID;
                    _temp.PermissionName  = pm.PermissionName;
                    _temp.PermissionValue = pm.PermissionValue;
                    _temp.PermissionCode  = pm.PermissionCode;
                    _temp.Remark          = pm.Remark;
                    _temp.CreateUserID    = pm.CreateUserID;
                    _temp.CreateUserName  = pm.CreateUserName;
                    _temp.CreateDateTime  = pm.CreateDateTime;
                    _temp.EditUserID      = pm.EditUserID;
                    _temp.EditUserName    = pm.EditUserName;
                    _temp.EditTime        = pm.EditTime;
                    _temp.OwnerID         = pm.OwnerID;
                    _temp.OwnerName       = pm.OwnerName;
                    _temp.IsDeleted       = pm.IsDeleted;

                    foreach (RoleFunction roleFun in roleFuns)
                    {
                        if (roleFun.FunctionID == fun.FunctionID && roleFun.PermissionValue == pm.PermissionValue)
                        {
                            _temp.Remark    = roleFun.DataRange;
                            _temp.IsDeleted = true;
                            break;
                        }
                    }

                    _temPermission.Add(_temp);
                }

                ExtFun extFun = new ExtFun();
                extFun.FunctionID   = fun.FunctionID;
                extFun.FunctionCode = "";
                extFun.FunctionName = fun.FunctionName;
                extFun.IsMenu       = fun.IsMenu;
                extFun.Permissions  = _temPermission;

                model.ExtFuns.Add(extFun);
            }

            return(Ok(model));
        }