Exemplo n.º 1
0
 /// <summary>
 /// 分页获取(车队,旅游用品,购物点)列表
 /// </summary>
 /// <param name="pageSize">每页显示的条数</param>
 /// <param name="pageIndex">当前页码</param>
 /// <param name="recordCount">总记录数</param>
 /// <param name="CompanyName">供应商名称</param>
 /// <param name="ProvinceId">省份编号</param>
 /// <param name="CityId">城市编号</param>
 /// <param name="CompanyType">公司类型</param>
 /// <returns></returns>
 public IList <EyouSoft.Model.CompanyStructure.SupplierInfo> GetList(int pageSize, int pageIndex, ref int recordCount, string CompanyName, int ProvinceId, int CityId, EyouSoft.Model.CompanyStructure.BusinessProperties CompanyType)
 {
     return(dal.GetList(pageSize, pageIndex, ref recordCount, CompanyName, ProvinceId, CityId, 0, 0, CompanyType));
 }
Exemplo n.º 2
0
        /// <summary>
        /// 删除
        /// </summary>
        protected string DeletCompany()
        {
            string Result = "未选择要删除的公司!";

            string[] strCompanyId = Request.Form.GetValues("ckCompanyId");
            if (strCompanyId != null)
            {
                bool isManage = CheckMasterGrant(EyouSoft.Common.YuYingPermission.会员管理_管理该栏目);
                bool isTure   = false;
                //是否拥有删除的权限
                for (int i = 0; i < strCompanyId.Length; i++)
                {
                    EyouSoft.Model.CompanyStructure.CompanyInfo CompanyInfo = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(strCompanyId[i]);
                    if (CompanyInfo != null)
                    {
                        EyouSoft.Model.CompanyStructure.BusinessProperties CompanyType = CompanyInfo.BusinessProperties;
                        if (CompanyType == EyouSoft.Model.CompanyStructure.BusinessProperties.旅游社)
                        {
                            if (isManage && CheckMasterGrant(EyouSoft.Common.YuYingPermission.旅行社汇总管理_删除))
                            {
                                isTure = true;
                            }
                            else
                            {
                                Result = "您无权删除旅行社会员!";
                                break;
                            }
                        }
                        if (CompanyType == EyouSoft.Model.CompanyStructure.BusinessProperties.酒店)
                        {
                            if (isManage && CheckMasterGrant(EyouSoft.Common.YuYingPermission.酒店汇总管理_删除))
                            {
                                isTure = true;
                            }
                            else
                            {
                                Result = "您无权删除酒店会员!";
                                break;
                            }
                        }
                        if (CompanyType == EyouSoft.Model.CompanyStructure.BusinessProperties.景区)
                        {
                            if (isManage && CheckMasterGrant(EyouSoft.Common.YuYingPermission.景区汇总管理_删除))
                            {
                                isTure = true;
                            }
                            else
                            {
                                Result = "您无权删除景区会员!";
                                break;
                            }
                        }
                        if (CompanyType == EyouSoft.Model.CompanyStructure.BusinessProperties.车队)
                        {
                            if (isManage && CheckMasterGrant(EyouSoft.Common.YuYingPermission.车队汇总管理_删除))
                            {
                                isTure = true;
                            }
                            else
                            {
                                Result = "您无权删除车队会员!";
                                break;
                            }
                        }
                        if (CompanyType == EyouSoft.Model.CompanyStructure.BusinessProperties.旅游用品店)
                        {
                            if (isManage && CheckMasterGrant(EyouSoft.Common.YuYingPermission.旅游用品店汇总管理_删除))
                            {
                                isTure = true;
                            }
                            else
                            {
                                Result = "您无权删除旅游用品会员!";
                                break;
                            }
                        }
                        if (CompanyType == EyouSoft.Model.CompanyStructure.BusinessProperties.购物店)
                        {
                            if (isManage && CheckMasterGrant(EyouSoft.Common.YuYingPermission.购物店汇总管理_删除))
                            {
                                isTure = true;
                            }
                            else
                            {
                                Result = "您无权删除购物点会员!";
                                break;
                            }
                        }
                        if (CompanyType == EyouSoft.Model.CompanyStructure.BusinessProperties.机票供应商)
                        {
                            if (isManage && CheckMasterGrant(EyouSoft.Common.YuYingPermission.机票供应商管理_删除))
                            {
                                isTure = true;
                            }
                            else
                            {
                                Result = "您无权删除机票供应商会员!";
                                break;
                            }
                        }
                        if (CompanyType == EyouSoft.Model.CompanyStructure.BusinessProperties.其他采购商)
                        {
                            if (isManage && CheckMasterGrant(EyouSoft.Common.YuYingPermission.其他采购商管理_删除))
                            {
                                isTure = true;
                            }
                            else
                            {
                                Result = "您无权删除其他采购商会员!";
                                break;
                            }
                        }
                    }
                }
                if (isTure)
                {
                    if (EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().Remove(strCompanyId))
                    {
                        Result = "True";
                    }
                    else
                    {
                        Result = "删除失败!";
                    }
                }
            }
            return(Result);
        }