Ejemplo n.º 1
0
        /// <summary>
        /// 获取当前页面对应的菜单类
        /// </summary>
        /// <param name="url"></param>
        /// <returns></returns>
        public PageMenu GetPageMenu(string url)
        {
            var manager = AppBizFactory.CreateInstance <IPageMenuManager>();
            var lst     = manager.GetEntityList(new SspPageMenu()
            {
                PageUrl = url
            });
            var      sspPageMenu = lst.FirstOrDefault();
            PageMenu result      = null;

            if (sspPageMenu != null)
            {
                result            = new PageMenu();
                result.Permit     = 0;
                result.NeedPermit = 1;
                result.ObjId      = (int)sspPageMenu.ObjId;
                result.PageUrl    = sspPageMenu.PageUrl;
                result.ShowName   = sspPageMenu.ShowName;
                if (sspPageMenu.DeleteFlag == 1)
                {
                    result.NeedPermit = 0;
                    result.Permit     = 1;
                }
            }
            return(result);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 获取当前用户在当前页面数据库对应的权限信息
        /// </summary>
        /// <returns></returns>
        public IList <PageAction> GetUserPageActionList(PageMenu pageMenu, UserData user)
        {
            var manager = AppBizFactory.CreateInstance <IPageActionManager>();
            var lst     = manager.GetUserPageActionList(pageMenu.ObjId, user.UserId);

            return(SspToPageAction(lst, pageMenu));
        }
        public App()
        {
            InitializeComponent();


            MainPage = new PageMenu();
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         PageMenu.Initialise(Page);
         if (Session["New"].Equals(""))
         {
             lblPrefix.Text    = "";
             lblUser.Text      = "";
             btnLogin.Visible  = true;
             btnLogout.Visible = false;
         }
         else
         {
             lblPrefix.Text    = "User Logged In is : ";
             lblUser.Text      = Session["New"].ToString();
             btnLogin.Visible  = false;
             btnLogout.Visible = true;
         }
     }
     catch (Exception exception)
     {
         Response.Write("<script> alert('Oops page failed to load properly!')</script>");
     }
 }
Ejemplo n.º 5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         PageMenu.Initialise(Page);
         txtGetUser.Text = Session["New"].ToString();
         try
         {
             SqlConnection conn = new SqlConnection("Server=146.230.177.46\\ist3;Database=group16;User ID=group16;Password=78fgg");
             conn.Open();
             string     checkuser = "******" + txtGetUser.Text + "'";
             SqlCommand com       = new SqlCommand(checkuser, conn);
             int        temp      = Convert.ToInt32(com.ExecuteScalar().ToString());
             conn.Close();
             txtGetUser.Text = temp.ToString();
         }
         catch (SqlException exception)
         {
             txtGetUser.Visible = true;
             txtGetUser.Text    = "Oops, an error was encountered while connecting to the server :( Our team is looking at the issue! Please retry later!";
         }
         catch (Exception exception)
         {
             txtGetUser.Visible = true;
             txtGetUser.Text    = "Oops, an error was encountered while loading this page :( Our team is looking at the issue! Please retry later!";
         }
     }
     catch (Exception)
     {
         txtGetUser.Text = "Oops, an error was encountered while loading this page :( Our team is looking at the issue! Please retry later!";
     }
 }
Ejemplo n.º 6
0
        public void InsertPageMenu(PageMenu pageMenu)
        {
            Context.PageMenus.Add(pageMenu);

            Context.Entry(pageMenu).State = EntityState.Added;
            Context.SaveChanges();
        }
Ejemplo n.º 7
0
        public ActionResult Create(PageMenuViewModel model, bool IsPopup)
        {
            if (ModelState.IsValid)
            {
                var PageMenu = new PageMenu();
                AutoMapper.Mapper.Map(model, PageMenu);

                _pageMenuRepository.InsertPageMenu(PageMenu);

                if (model.IsDashboard.HasValue && model.IsDashboard.Value)
                {
                    PageMenu.Url = "/Home/Dashboard/" + PageMenu.Id;
                }

                _pageMenuRepository.UpdatePageMenu(PageMenu);

                //Reset cache
                Erp.BackOffice.Helpers.CacheHelper.PagesMenu = null;

                if (IsPopup)
                {
                    return(RedirectToAction("_ClosePopup", "Home", new { area = "", FunctionCallback = "ClosePopupAndReloadPage" }));
                }
                else
                {
                    TempData[Globals.SuccessMessageKey] = App_GlobalResources.Wording.InsertSuccess;
                    return(RedirectToAction("Index"));
                }
            }
            return(View(model));
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Navigates to the menu
        /// </summary>
        public void NavigateToMenu()
        {
            PageMenu menu = new PageMenu(this);

            currentPage = menu;
            Navigate(menu);
        }
Ejemplo n.º 9
0
        public ActionResult Index(string page)
        {
            if (string.IsNullOrEmpty(page))
                page = "1";
            int userid = (int)Session["user_id"];
            string pagetag = "quan_zhiliangwh_index";
            PageMenu.Set("Index", "quan_zhiliangwh", "质量管理");
            Expression<Func<quan_zhiliangwh, bool>> where = PredicateExtensionses.True<quan_zhiliangwh>();
            searchcondition sc = searchconditionService.GetInstance().GetEntityById(searchcondition => searchcondition.UserID == userid && searchcondition.PageBrief == pagetag);
            if (sc != null && sc.ConditionInfo != null)
            {
                string[] sclist = sc.ConditionInfo.Split(';');
                foreach (string scl in sclist)
                {
                    string[] scld = scl.Split(',');
                    switch (scld[0])
                    {
                        case "chid":
                            string chid = scld[1];
                            string chidequal = scld[2];
                            string chidand = scld[3];
                            if (!string.IsNullOrEmpty(chid))
                            {
                                if (chidequal.Equals("="))
                                {
                                    if (chidand.Equals("and"))
                                        where = where.And(quan_zhiliangwh => quan_zhiliangwh.CHID == int.Parse(chid));
                                    else
                                        where = where.Or(quan_zhiliangwh => quan_zhiliangwh.CHID == int.Parse(chid));
                                }
                                if (chidequal.Equals(">"))
                                {
                                    if (chidand.Equals("and"))
                                        where = where.And(quan_zhiliangwh => quan_zhiliangwh.CHID > int.Parse(chid));
                                    else
                                        where = where.Or(quan_zhiliangwh => quan_zhiliangwh.CHID > int.Parse(chid));
                                }
                                if (chidequal.Equals("<"))
                                {
                                    if (chidand.Equals("and"))
                                        where = where.And(quan_zhiliangwh => quan_zhiliangwh.CHID < int.Parse(chid));
                                    else
                                        where = where.Or(quan_zhiliangwh => quan_zhiliangwh.CHID < int.Parse(chid));
                                }
                            }
                            break;
                        default:
                            break;
                    }
                }
                ViewBag.SearchCondition = sc.ConditionInfo;
            }

            where = where.And(quan_zhiliangwh => quan_zhiliangwh.IsDelete == false);

            var tempData = ob_quan_zhiliangwhservice.LoadSortEntities(where.Compile(), false, quan_zhiliangwh => quan_zhiliangwh.ID).ToPagedList<quan_zhiliangwh>(int.Parse(page), int.Parse(System.Web.Configuration.WebConfigurationManager.AppSettings["ShowPerPage"]));
            ViewBag.quan_zhiliangwh = tempData;
            return View(tempData);
        }
Ejemplo n.º 10
0
        //Método construtor recebendo o local e o nome do BD

        public App(String dbPath, String dbName)
        {
            InitializeComponent();
            //armazenando os valores nas propriedades públicas (globais)
            App.DbName = dbName;
            App.DbPath = dbPath;
            MainPage   = new PageMenu();
        }
        public App(string dbPath, string dbName)
        {
            InitializeComponent();

            App.DbName = dbName;
            App.DbPath = dbPath;
            MainPage   = new PageMenu();
        }
Ejemplo n.º 12
0
 private void Menu_Show(Grid grid, Point point)
 {
     if (menu_is_show)
     {
         return;
     }
     selected_grid = grid;
     PageMenu.ShowAt(grid, point);
 }
Ejemplo n.º 13
0
        /// <summary>
        /// 获取当前页面数据库对应的权限信息
        /// </summary>
        /// <returns></returns>
        public IList <PageAction> GetPageActionList(PageMenu pageMenu)
        {
            var m = new SspPageAction();

            m.PageMenuId = pageMenu.ObjId;
            var manager = AppBizFactory.CreateInstance <IPageActionManager>();
            var lst     = manager.GetEntityList(m);

            return(SspToPageAction(lst, pageMenu));
        }
Ejemplo n.º 14
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         PageMenu.Initialise(Page);
     }
     catch (Exception exception)
     {
         Response.Write("<script> alert('Oops page failed to load properly!')</script>");
     }
 }
Ejemplo n.º 15
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         PageMenu.Initialise(Page);
         LabelError.Visible = false;
     }
     catch (Exception exception)
     {
         LabelError.Visible = true;
         LabelError.Text    = "Oops, an error was encountered while loading this page. Our team is looking at the issue! Please retry later!";
     }
 }
Ejemplo n.º 16
0
        public JsonResult EditInline(int Id, string OrderNo, string Name, int?PageId, string CssClassIcon)
        {
            PageMenu pageMenu = _pageMenuRepository.GetPageMenuById(Id);

            pageMenu.OrderNo      = Convert.ToInt32(OrderNo);
            pageMenu.Name         = Name;
            pageMenu.PageId       = PageId;
            pageMenu.CssClassIcon = CssClassIcon;
            _pageRepository.UpdatePageMenu(pageMenu);

            //Reset cache
            Erp.BackOffice.Helpers.CacheHelper.PagesMenu = null;

            return(Json(new { status = "success" }, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 17
0
        private IList <PageAction> SspToPageAction(IList <SspPageAction> lst, PageMenu pageMenu)
        {
            var result = new List <PageAction>();

            foreach (SspPageAction m in lst)
            {
                var a = new PageAction();
                a.PageMenu   = pageMenu;
                a.ActionId   = (int)m.ActionId;
                a.ActionName = "," + m.ActionName + ",";
                a.ShowName   = m.ShowName;
                result.Add(a);
            }
            return(result);
        }
Ejemplo n.º 18
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            PageMenu.Initialise(Page);

            if (Session["New"].Equals("") || Session["New"] == null)
            {
                lblPrefix.Text    = "";
                lblUser.Text      = "";
                btnLogin.Visible  = true;
                btnLogout.Visible = false;
                lblLoggedIn.Text  = "";
            }
            else
            {
                Label1.Visible     = false;
                HyperLink1.Visible = false;
                lblPrefix.Text     = "User Logged In is : ";
                lblUser.Text       = Session["New"].ToString();
                lblLoggedIn.Text   = Session["New"].ToString();
                btnLogin.Visible   = false;
                btnLogout.Visible  = true;
            }


            if (Session["Role"].ToString().Equals("Customer"))
            {
                CustomerNavigationMenu.Visible = true;
            }
            else if (Session["Role"].ToString().Equals("Employee"))
            {
                EmployeeNavigationMenu.Visible = true;
            }
            else if (Session["Role"].ToString().Equals("Manager"))
            {
                EmployeeNavigationMenu.Visible = true;
                ManagerNavigationMenu.Visible  = true;
            }
        }
        catch (Exception exception)
        {
            //Response.Write("<script> alert('Oops page failed to load properly!')</script>");
        }
    }
Ejemplo n.º 19
0
        public MainWindow()
        {
            InitializeComponent();

            CurrentPageAuth         = new PageAuth();
            CurrentPageMenu         = new PageMenu();
            CurrentPageResults      = new PageResults();
            CurrentPagePrescription = new PagePrescription();
            CurrentPageRedactor     = new PageRedactor();
            CurrentPageTest         = new PageTest();
            CurrentPageTestsList    = new PageTestsList();
            CurrentPageRes          = new PageRes();

            CurrentBackButton = BackButton;
            CurrentLabelName  = LabelName;
            CurrentFrame      = MainFrame;

            MainFrame.Navigate(CurrentPageAuth);
        }
Ejemplo n.º 20
0
        /// <summary>
        /// 获取页面类型信息
        /// </summary>
        /// <returns></returns>
        private PageMenu getPageMenu()
        {
            var      dbPage = new DbPage();
            PageMenu result = null;
            string   url    = this.GetPageUrl();

            result = dbPage.GetPageMenu(url);
            if (result == null)
            {
                PageMenu m = new PageMenu();
                m.ShowName = string.IsNullOrWhiteSpace(this.Title) ? "请设置名称" : this.Title;
                m.PageUrl  = url;
                dbPage.AddPageMenu(m);
                return(getPageMenu());
            }
            else
            {
                return(result);
            }
        }
Ejemplo n.º 21
0
        /// <summary>
        /// 将当前页面的菜单类保存到数据库
        /// </summary>
        /// <param name="page"></param>
        public void AddPageMenu(PageMenu page)
        {
            var    manager = AppBizFactory.CreateInstance <IPageMenuManager>();
            object max     = manager.GetMaxObjId(null);
            int    iMax    = 0;

            if (max != null)
            {
                int.TryParse(max.ToString(), out iMax);
            }
            iMax++;
            var sspPageMenu = new SspPageMenu();

            sspPageMenu.ObjId      = iMax;
            sspPageMenu.MenuLevel  = "00" + iMax.ToString();
            sspPageMenu.IsShow     = 1;
            sspPageMenu.SeqIndex   = 1;
            sspPageMenu.PageUrl    = page.PageUrl;
            sspPageMenu.ShowName   = page.ShowName;
            sspPageMenu.DeleteFlag = 1;
            manager.Insert(sspPageMenu);
        }
Ejemplo n.º 22
0
        public ActionResult ReminderList()
        {
            int _userid = (int)Session["user_id"];

            PageMenu.Set("ReminderList", "rmd_myreminder", "信息提醒");

            List <rmd_remindlistViewModel> _reminds = new List <rmd_remindlistViewModel>();
            var _myremind = ob_rmd_myreminderservice.LoadEntities(p => p.YonghuID == _userid && p.IsDelete == false).ToList <rmd_myreminder>();

            if (_myremind.Count > 0)
            {
                foreach (var rmd in _myremind)
                {
                    rmd_remindlistViewModel _rmd = GetReminder((int)rmd.TixingID, (int)rmd.TixingZQ);
                    if (_rmd != null)
                    {
                        _reminds.Add(_rmd);
                    }
                }
            }

            ViewBag.RemindList = _reminds;
            return(View());
        }
Ejemplo n.º 23
0
        public ActionResult Index(string page)
        {
            if (string.IsNullOrEmpty(page))
            {
                page = "1";
            }
            int    userid  = (int)Session["user_id"];
            string pagetag = "base_xiaoshou_index";

            PageMenu.Set("Index", "base_xiaoshou", "基础数据");
            Expression <Func <base_xiaoshou, bool> > where = PredicateExtensionses.True <base_xiaoshou>();
            searchcondition sc = searchconditionService.GetInstance().GetEntityById(searchcondition => searchcondition.UserID == userid && searchcondition.PageBrief == pagetag);

            if (sc != null)
            {
                string[] sclist = sc.ConditionInfo.Split(';');
                foreach (string scl in sclist)
                {
                    string[] scld = scl.Split(',');
                    switch (scld[0])
                    {
                    case "shouquanid":
                        string shouquanid      = scld[1];
                        string shouquanidequal = scld[2];
                        string shouquanidand   = scld[3];
                        if (!string.IsNullOrEmpty(shouquanid))
                        {
                            if (shouquanidequal.Equals("="))
                            {
                                if (shouquanidand.Equals("and"))
                                {
                                    where = where.And(base_xiaoshou => base_xiaoshou.ShouquanID == int.Parse(shouquanid));
                                }
                                else
                                {
                                    where = where.Or(base_xiaoshou => base_xiaoshou.ShouquanID == int.Parse(shouquanid));
                                }
                            }
                        }
                        break;

                    case "xingming":
                        string xingming      = scld[1];
                        string xingmingequal = scld[2];
                        string xingmingand   = scld[3];
                        if (!string.IsNullOrEmpty(xingming))
                        {
                            if (xingmingequal.Equals("="))
                            {
                                if (xingmingand.Equals("and"))
                                {
                                    where = where.And(base_xiaoshou => base_xiaoshou.Xingming == xingming);
                                }
                                else
                                {
                                    where = where.Or(base_xiaoshou => base_xiaoshou.Xingming == xingming);
                                }
                            }
                            if (xingmingequal.Equals("like"))
                            {
                                if (xingmingand.Equals("and"))
                                {
                                    where = where.And(base_xiaoshou => base_xiaoshou.Xingming.Contains(xingming));
                                }
                                else
                                {
                                    where = where.Or(base_xiaoshou => base_xiaoshou.Xingming.Contains(xingming));
                                }
                            }
                        }
                        break;

                    default:
                        break;
                    }
                }
                ViewBag.SearchCondition = sc.ConditionInfo;
            }

            where = where.And(base_xiaoshou => base_xiaoshou.IsDelete == false);

            var tempData = ob_base_xiaoshouservice.LoadSortEntities(where.Compile(), false, base_xiaoshou => base_xiaoshou.ID).ToPagedList <base_xiaoshou>(int.Parse(page), int.Parse(System.Web.Configuration.WebConfigurationManager.AppSettings["ShowPerPage"]));

            ViewBag.base_xiaoshou = tempData;
            return(View(tempData));
        }
Ejemplo n.º 24
0
        public ActionResult Index()
        {
            int    userid        = (int)Session["user_id"];
            string pagetag       = "rmd_myreminder_index";
            string page          = "1";
            string yonghuid      = Request["yonghuid"] ?? "";
            string yonghuidequal = Request["yonghuidequal"] ?? "";
            string yonghuidand   = Request["yonghuidand"] ?? "";

            PageMenu.Set("Index", "rmd_myreminder", "信息提醒");
            Expression <Func <rmd_myreminder, bool> > where = PredicateExtensionses.True <rmd_myreminder>();
            searchcondition sc = searchconditionService.GetInstance().GetEntityById(searchcondition => searchcondition.UserID == userid && searchcondition.PageBrief == pagetag);

            if (sc == null)
            {
                sc           = new searchcondition();
                sc.UserID    = userid;
                sc.PageBrief = pagetag;
                if (!string.IsNullOrEmpty(yonghuid))
                {
                    if (yonghuidequal.Equals("="))
                    {
                        if (yonghuidand.Equals("and"))
                        {
                            where = where.And(rmd_myreminder => rmd_myreminder.YonghuID == int.Parse(yonghuid));
                        }
                        else
                        {
                            where = where.Or(rmd_myreminder => rmd_myreminder.YonghuID == int.Parse(yonghuid));
                        }
                    }
                    if (yonghuidequal.Equals(">"))
                    {
                        if (yonghuidand.Equals("and"))
                        {
                            where = where.And(rmd_myreminder => rmd_myreminder.YonghuID > int.Parse(yonghuid));
                        }
                        else
                        {
                            where = where.Or(rmd_myreminder => rmd_myreminder.YonghuID > int.Parse(yonghuid));
                        }
                    }
                    if (yonghuidequal.Equals("<"))
                    {
                        if (yonghuidand.Equals("and"))
                        {
                            where = where.And(rmd_myreminder => rmd_myreminder.YonghuID < int.Parse(yonghuid));
                        }
                        else
                        {
                            where = where.Or(rmd_myreminder => rmd_myreminder.YonghuID < int.Parse(yonghuid));
                        }
                    }
                }
                if (!string.IsNullOrEmpty(yonghuid))
                {
                    sc.ConditionInfo = sc.ConditionInfo + string.Format("{0},{1},{2},{3};", "yonghuid", yonghuid, yonghuidequal, yonghuidand);
                }
                else
                {
                    sc.ConditionInfo = sc.ConditionInfo + string.Format("{0},{1},{2},{3};", "yonghuid", "", yonghuidequal, yonghuidand);
                }
                searchconditionService.GetInstance().AddEntity(sc);
            }
            else
            {
                sc.ConditionInfo = "";
                if (!string.IsNullOrEmpty(yonghuid))
                {
                    if (yonghuidequal.Equals("="))
                    {
                        if (yonghuidand.Equals("and"))
                        {
                            where = where.And(rmd_myreminder => rmd_myreminder.YonghuID == int.Parse(yonghuid));
                        }
                        else
                        {
                            where = where.Or(rmd_myreminder => rmd_myreminder.YonghuID == int.Parse(yonghuid));
                        }
                    }
                    if (yonghuidequal.Equals(">"))
                    {
                        if (yonghuidand.Equals("and"))
                        {
                            where = where.And(rmd_myreminder => rmd_myreminder.YonghuID > int.Parse(yonghuid));
                        }
                        else
                        {
                            where = where.Or(rmd_myreminder => rmd_myreminder.YonghuID > int.Parse(yonghuid));
                        }
                    }
                    if (yonghuidequal.Equals("<"))
                    {
                        if (yonghuidand.Equals("and"))
                        {
                            where = where.And(rmd_myreminder => rmd_myreminder.YonghuID < int.Parse(yonghuid));
                        }
                        else
                        {
                            where = where.Or(rmd_myreminder => rmd_myreminder.YonghuID < int.Parse(yonghuid));
                        }
                    }
                }
                if (!string.IsNullOrEmpty(yonghuid))
                {
                    sc.ConditionInfo = sc.ConditionInfo + string.Format("{0},{1},{2},{3};", "yonghuid", yonghuid, yonghuidequal, yonghuidand);
                }
                else
                {
                    sc.ConditionInfo = sc.ConditionInfo + string.Format("{0},{1},{2},{3};", "yonghuid", "", yonghuidequal, yonghuidand);
                }
                searchconditionService.GetInstance().UpdateEntity(sc);
            }
            ViewBag.SearchCondition = sc.ConditionInfo;
            where = where.And(rmd_myreminder => rmd_myreminder.IsDelete == false);

            var tempData = ob_rmd_myreminderservice.LoadSortEntities(where.Compile(), false, rmd_myreminder => rmd_myreminder.ID).ToPagedList <rmd_myreminder>(int.Parse(page), int.Parse(System.Web.Configuration.WebConfigurationManager.AppSettings["ShowPerPage"]));

            ViewBag.rmd_myreminder = tempData;
            return(View(tempData));
        }
Ejemplo n.º 25
0
        public ActionResult Index(string page)
        {
            if (string.IsNullOrEmpty(page))
            {
                page = "1";
            }
            int    userid  = (int)Session["user_id"];
            string pagetag = "rmd_myreminder_index";

            PageMenu.Set("Index", "rmd_myreminder", "信息提醒");
            Expression <Func <rmd_myreminder, bool> > where = PredicateExtensionses.True <rmd_myreminder>();
            searchcondition sc = searchconditionService.GetInstance().GetEntityById(searchcondition => searchcondition.UserID == userid && searchcondition.PageBrief == pagetag);

            if (sc != null && sc.ConditionInfo != null)
            {
                string[] sclist = sc.ConditionInfo.Split(';');
                foreach (string scl in sclist)
                {
                    string[] scld = scl.Split(',');
                    switch (scld[0])
                    {
                    case "yonghuid":
                        string yonghuid      = scld[1];
                        string yonghuidequal = scld[2];
                        string yonghuidand   = scld[3];
                        if (!string.IsNullOrEmpty(yonghuid))
                        {
                            if (yonghuidequal.Equals("="))
                            {
                                if (yonghuidand.Equals("and"))
                                {
                                    where = where.And(rmd_myreminder => rmd_myreminder.YonghuID == int.Parse(yonghuid));
                                }
                                else
                                {
                                    where = where.Or(rmd_myreminder => rmd_myreminder.YonghuID == int.Parse(yonghuid));
                                }
                            }
                            if (yonghuidequal.Equals(">"))
                            {
                                if (yonghuidand.Equals("and"))
                                {
                                    where = where.And(rmd_myreminder => rmd_myreminder.YonghuID > int.Parse(yonghuid));
                                }
                                else
                                {
                                    where = where.Or(rmd_myreminder => rmd_myreminder.YonghuID > int.Parse(yonghuid));
                                }
                            }
                            if (yonghuidequal.Equals("<"))
                            {
                                if (yonghuidand.Equals("and"))
                                {
                                    where = where.And(rmd_myreminder => rmd_myreminder.YonghuID < int.Parse(yonghuid));
                                }
                                else
                                {
                                    where = where.Or(rmd_myreminder => rmd_myreminder.YonghuID < int.Parse(yonghuid));
                                }
                            }
                        }
                        break;

                    default:
                        break;
                    }
                }
                ViewBag.SearchCondition = sc.ConditionInfo;
            }

            where = where.And(rmd_myreminder => rmd_myreminder.IsDelete == false);

            var tempData = ob_rmd_myreminderservice.LoadSortEntities(where.Compile(), false, rmd_myreminder => rmd_myreminder.ID).ToPagedList <rmd_myreminder>(int.Parse(page), int.Parse(System.Web.Configuration.WebConfigurationManager.AppSettings["ShowPerPage"]));

            ViewBag.rmd_myreminder = tempData;
            return(View(tempData));
        }
Ejemplo n.º 26
0
        public ActionResult Index()
        {
            int    userid  = (int)Session["user_id"];
            string pagetag = "cust_chukujihua_index";
            string page    = "1";
            //huozhuid
            string huozhuid      = Request["huozhuid"] ?? "";
            string huozhuidequal = Request["huozhuidequal"] ?? "";
            string huozhuidand   = Request["huozhuidand"] ?? "";
            //KehuMC
            string KehuMC      = Request["KehuMC"] ?? "";
            string KehuMCequal = Request["KehuMCequal"] ?? "";
            string KehuMCand   = Request["KehuMCand"] ?? "";
            //KehuDH
            string KehuDH      = Request["KehuDH"] ?? "";
            string KehuDHequal = Request["KehuDHequal"] ?? "";
            string KehuDHand   = Request["KehuDHand"] ?? "";
            //makedate
            string makedate      = Request["makedate"] ?? "";
            string makedateequal = Request["makedateequal"] ?? "";
            string makedateand   = Request["makedateand"] ?? "";

            PageMenu.Set("Index", "cust_chukujihua", "客户服务");
            Expression <Func <cust_chukujihua, bool> > where = PredicateExtensionses.True <cust_chukujihua>();
            searchcondition sc = searchconditionService.GetInstance().GetEntityById(searchcondition => searchcondition.UserID == userid && searchcondition.PageBrief == pagetag);

            if (sc == null)
            {
                sc           = new searchcondition();
                sc.UserID    = userid;
                sc.PageBrief = pagetag;
                //huozhuid
                if (!string.IsNullOrEmpty(huozhuid))
                {
                    if (huozhuidequal.Equals("="))
                    {
                        if (huozhuidand.Equals("and"))
                        {
                            where = where.And(p => p.HuozhuID == int.Parse(huozhuid));
                        }
                        else
                        {
                            where = where.Or(p => p.HuozhuID == int.Parse(huozhuid));
                        }
                    }
                }
                if (!string.IsNullOrEmpty(huozhuid))
                {
                    sc.ConditionInfo = sc.ConditionInfo + string.Format("{0},{1},{2},{3};", "huozhuid", huozhuid, huozhuidequal, huozhuidand);
                }
                else
                {
                    sc.ConditionInfo = sc.ConditionInfo + string.Format("{0},{1},{2},{3};", "huozhuid", "", huozhuidequal, huozhuidand);
                }
                //KehuMC
                if (!string.IsNullOrEmpty(KehuMC))
                {
                    if (KehuMCequal.Equals("="))
                    {
                        if (KehuMCand.Equals("and"))
                        {
                            where = where.And(p => p.KehuMC == KehuMC);
                        }
                        else
                        {
                            where = where.Or(p => p.KehuMC == KehuMC);
                        }
                    }
                    if (KehuMCequal.Equals("like"))
                    {
                        if (KehuMCand.Equals("and"))
                        {
                            where = where.And(p => p.KehuMC.Contains(KehuMC));
                        }
                        else
                        {
                            where = where.Or(p => p.KehuMC.Contains(KehuMC));
                        }
                    }
                }
                if (!string.IsNullOrEmpty(KehuMC))
                {
                    sc.ConditionInfo = sc.ConditionInfo + string.Format("{0},{1},{2},{3};", "KehuMC", KehuMC, KehuMCequal, KehuMCand);
                }
                else
                {
                    sc.ConditionInfo = sc.ConditionInfo + string.Format("{0},{1},{2},{3};", "KehuMC", "", KehuMCequal, KehuMCand);
                }
                //KehuDH
                if (!string.IsNullOrEmpty(KehuDH))
                {
                    if (KehuDHequal.Equals("="))
                    {
                        if (KehuDHand.Equals("and"))
                        {
                            where = where.And(p => p.KehuDH == KehuDH);
                        }
                        else
                        {
                            where = where.Or(p => p.KehuDH == KehuDH);
                        }
                    }
                    if (KehuDHequal.Equals("like"))
                    {
                        if (KehuDHand.Equals("and"))
                        {
                            where = where.And(p => p.KehuDH.Contains(KehuDH));
                        }
                        else
                        {
                            where = where.Or(p => p.KehuDH.Contains(KehuDH));
                        }
                    }
                }
                if (!string.IsNullOrEmpty(KehuDH))
                {
                    sc.ConditionInfo = sc.ConditionInfo + string.Format("{0},{1},{2},{3};", "KehuDH", KehuDH, KehuDHequal, KehuDHand);
                }
                else
                {
                    sc.ConditionInfo = sc.ConditionInfo + string.Format("{0},{1},{2},{3};", "KehuDH", "", KehuDHequal, KehuDHand);
                }
                //searchconditionService.GetInstance().AddEntity(sc);
                //makedate
                if (!string.IsNullOrEmpty(makedate))
                {
                    if (makedateequal.Equals("="))
                    {
                        if (makedateand.Equals("and"))
                        {
                            where = where.And(p => p.MakeDate.ToString("yyyy-MM-dd") == makedate);
                        }
                        else
                        {
                            where = where.Or(p => p.MakeDate.ToString("yyyy-MM-dd") == makedate);
                        }
                    }
                    if (makedateequal.Equals(">"))
                    {
                        if (makedateand.Equals("and"))
                        {
                            where = where.And(p => p.MakeDate > DateTime.Parse(makedate));
                        }
                        else
                        {
                            where = where.Or(p => p.MakeDate > DateTime.Parse(makedate));
                        }
                    }
                    if (makedateequal.Equals("<"))
                    {
                        if (makedateand.Equals("and"))
                        {
                            where = where.And(p => p.MakeDate < DateTime.Parse(makedate));
                        }
                        else
                        {
                            where = where.Or(p => p.MakeDate < DateTime.Parse(makedate));
                        }
                    }
                }
                if (!string.IsNullOrEmpty(makedate))
                {
                    sc.ConditionInfo = sc.ConditionInfo + string.Format("{0},{1},{2},{3};", "makedate", makedate, makedateequal, makedateand);
                }
                else
                {
                    sc.ConditionInfo = sc.ConditionInfo + string.Format("{0},{1},{2},{3};", "makedate", "", makedateequal, makedateand);
                }
                searchconditionService.GetInstance().AddEntity(sc);
            }
            else
            {
                sc.ConditionInfo = "";
                //huozhuid
                if (!string.IsNullOrEmpty(huozhuid))
                {
                    if (huozhuidequal.Equals("="))
                    {
                        if (huozhuidand.Equals("and"))
                        {
                            where = where.And(p => p.HuozhuID == int.Parse(huozhuid));
                        }
                        else
                        {
                            where = where.Or(p => p.HuozhuID == int.Parse(huozhuid));
                        }
                    }
                }
                if (!string.IsNullOrEmpty(huozhuid))
                {
                    sc.ConditionInfo = sc.ConditionInfo + string.Format("{0},{1},{2},{3};", "huozhuid", huozhuid, huozhuidequal, huozhuidand);
                }
                else
                {
                    sc.ConditionInfo = sc.ConditionInfo + string.Format("{0},{1},{2},{3};", "huozhuid", "", huozhuidequal, huozhuidand);
                }
                //KehuMC
                if (!string.IsNullOrEmpty(KehuMC))
                {
                    if (KehuMCequal.Equals("="))
                    {
                        if (KehuMCand.Equals("and"))
                        {
                            where = where.And(p => p.KehuMC == KehuMC);
                        }
                        else
                        {
                            where = where.Or(p => p.KehuMC == KehuMC);
                        }
                    }
                    if (KehuMCequal.Equals("like"))
                    {
                        if (KehuMCand.Equals("and"))
                        {
                            where = where.And(p => p.KehuMC.Contains(KehuMC));
                        }
                        else
                        {
                            where = where.Or(p => p.KehuMC.Contains(KehuMC));
                        }
                    }
                }
                if (!string.IsNullOrEmpty(KehuMC))
                {
                    sc.ConditionInfo = sc.ConditionInfo + string.Format("{0},{1},{2},{3};", "KehuMC", KehuMC, KehuMCequal, KehuMCand);
                }
                else
                {
                    sc.ConditionInfo = sc.ConditionInfo + string.Format("{0},{1},{2},{3};", "KehuMC", "", KehuMCequal, KehuMCand);
                }
                //KehuDH
                if (!string.IsNullOrEmpty(KehuDH))
                {
                    if (KehuDHequal.Equals("="))
                    {
                        if (KehuDHand.Equals("and"))
                        {
                            where = where.And(p => p.KehuDH == KehuDH);
                        }
                        else
                        {
                            where = where.Or(p => p.KehuDH == KehuDH);
                        }
                    }
                    if (KehuDHequal.Equals("like"))
                    {
                        if (KehuDHand.Equals("and"))
                        {
                            where = where.And(p => p.KehuDH.Contains(KehuDH));
                        }
                        else
                        {
                            where = where.Or(p => p.KehuDH.Contains(KehuDH));
                        }
                    }
                }
                if (!string.IsNullOrEmpty(KehuDH))
                {
                    sc.ConditionInfo = sc.ConditionInfo + string.Format("{0},{1},{2},{3};", "KehuDH", KehuDH, KehuDHequal, KehuDHand);
                }
                else
                {
                    sc.ConditionInfo = sc.ConditionInfo + string.Format("{0},{1},{2},{3};", "KehuDH", "", KehuDHequal, KehuDHand);
                }
                //makedate
                if (!string.IsNullOrEmpty(makedate))
                {
                    if (makedateequal.Equals("="))
                    {
                        if (makedateand.Equals("and"))
                        {
                            where = where.And(p => p.MakeDate.ToString("yyyy-MM-dd") == makedate);
                        }
                        else
                        {
                            where = where.Or(p => p.MakeDate.ToString("yyyy-MM-dd") == makedate);
                        }
                    }
                    if (makedateequal.Equals(">"))
                    {
                        if (makedateand.Equals("and"))
                        {
                            where = where.And(p => p.MakeDate > DateTime.Parse(makedate));
                        }
                        else
                        {
                            where = where.Or(p => p.MakeDate > DateTime.Parse(makedate));
                        }
                    }
                    if (makedateequal.Equals("<"))
                    {
                        if (makedateand.Equals("and"))
                        {
                            where = where.And(p => p.MakeDate < DateTime.Parse(makedate));
                        }
                        else
                        {
                            where = where.Or(p => p.MakeDate < DateTime.Parse(makedate));
                        }
                    }
                }
                if (!string.IsNullOrEmpty(makedate))
                {
                    sc.ConditionInfo = sc.ConditionInfo + string.Format("{0},{1},{2},{3};", "makedate", makedate, makedateequal, makedateand);
                }
                else
                {
                    sc.ConditionInfo = sc.ConditionInfo + string.Format("{0},{1},{2},{3};", "makedate", "", makedateequal, makedateand);
                }
                searchconditionService.GetInstance().UpdateEntity(sc);
            }
            ViewBag.SearchCondition = sc.ConditionInfo;
            userinfo _user = ServiceFactory.userinfoservice.GetEntityById(p => p.ID == userid && p.IsDelete == false);

            if (_user == null)
            {
                where = where.And(p => p.ID < 1);
            }
            else
            {
                switch (_user.AccountType)
                {
                case 100:
                    where = where.And(p => p.HuozhuID == _user.EmployeeID && p.IsDelete == false);
                    break;

                case 200:
                    where = where.And(p => p.KehuID == _user.EmployeeID && p.IsDelete == false);
                    break;

                case 300:
                    where = where.And(p => p.KefuID == _user.EmployeeID && p.IsDelete == false);
                    break;

                case 0:
                default:
                    where = where.And(cust_chukujihua => cust_chukujihua.IsDelete == false);
                    break;
                }
            }
            //where = where.And(cust_chukujihua => cust_chukujihua.IsDelete == false);

            var tempData = ob_cust_chukujihuaservice.LoadSortEntities(where.Compile(), true, cust_chukujihua => cust_chukujihua.JihuaZT).ToPagedList <cust_chukujihua>(int.Parse(page), int.Parse(System.Web.Configuration.WebConfigurationManager.AppSettings["ShowPerPage"]));

            ViewBag.cust_chukujihua = tempData;
            ViewBag.usertype        = _user.AccountType;
            return(View(tempData));
        }
Ejemplo n.º 27
0
        public ActionResult Index(string page)
        {
            if (string.IsNullOrEmpty(page))
            {
                page = "1";
            }
            int    userid  = (int)Session["user_id"];
            string pagetag = "cust_chukujihua_index";

            PageMenu.Set("Index", "cust_chukujihua", "客户服务");
            Expression <Func <cust_chukujihua, bool> > where = PredicateExtensionses.True <cust_chukujihua>();
            searchcondition sc = searchconditionService.GetInstance().GetEntityById(searchcondition => searchcondition.UserID == userid && searchcondition.PageBrief == pagetag);

            if (sc != null && sc.ConditionInfo != null)
            {
                string[] sclist = sc.ConditionInfo.Split(';');
                foreach (string scl in sclist)
                {
                    string[] scld = scl.Split(',');
                    switch (scld[0])
                    {
                    case "huozhuid":
                        string huozhuid      = scld[1];
                        string huozhuidequal = scld[2];
                        string huozhuidand   = scld[3];
                        if (!string.IsNullOrEmpty(huozhuid))
                        {
                            if (huozhuidequal.Equals("="))
                            {
                                if (huozhuidand.Equals("and"))
                                {
                                    where = where.And(p => p.HuozhuID == int.Parse(huozhuid));
                                }
                                else
                                {
                                    where = where.Or(p => p.HuozhuID == int.Parse(huozhuid));
                                }
                            }
                        }
                        break;

                    case "KehuMC":
                        string KehuMC      = scld[1];
                        string KehuMCequal = scld[2];
                        string KehuMCand   = scld[3];
                        if (!string.IsNullOrEmpty(KehuMC))
                        {
                            if (KehuMCequal.Equals("="))
                            {
                                if (KehuMCand.Equals("and"))
                                {
                                    where = where.And(p => p.KehuMC == KehuMC);
                                }
                                else
                                {
                                    where = where.Or(p => p.KehuMC == KehuMC);
                                }
                            }
                            if (KehuMCequal.Equals("like"))
                            {
                                if (KehuMCand.Equals("and"))
                                {
                                    where = where.And(p => p.KehuMC.Contains(KehuMC));
                                }
                                else
                                {
                                    where = where.Or(p => p.KehuMC.Contains(KehuMC));
                                }
                            }
                        }
                        break;

                    case "KehuDH":
                        string KehuDH      = scld[1];
                        string KehuDHequal = scld[2];
                        string KehuDHand   = scld[3];
                        if (!string.IsNullOrEmpty(KehuDH))
                        {
                            if (KehuDHequal.Equals("="))
                            {
                                if (KehuDHand.Equals("and"))
                                {
                                    where = where.And(p => p.KehuDH == KehuDH);
                                }
                                else
                                {
                                    where = where.Or(p => p.KehuDH == KehuDH);
                                }
                            }
                            if (KehuDHequal.Equals("like"))
                            {
                                if (KehuDHand.Equals("and"))
                                {
                                    where = where.And(p => p.KehuDH.Contains(KehuDH));
                                }
                                else
                                {
                                    where = where.Or(p => p.KehuDH.Contains(KehuDH));
                                }
                            }
                        }
                        break;

                    case "makedate":
                        string makedate      = scld[1];
                        string makedateequal = scld[2];
                        string makedateand   = scld[3];
                        if (!string.IsNullOrEmpty(makedate))
                        {
                            if (makedateequal.Equals("="))
                            {
                                if (makedateand.Equals("and"))
                                {
                                    where = where.And(p => p.MakeDate.ToString("yyyy-MM-dd") == makedate);
                                }
                                else
                                {
                                    where = where.Or(p => p.MakeDate.ToString("yyyy-MM-dd") == makedate);
                                }
                            }
                            if (makedateequal.Equals(">"))
                            {
                                if (makedateand.Equals("and"))
                                {
                                    where = where.And(p => p.MakeDate > DateTime.Parse(makedate));
                                }
                                else
                                {
                                    where = where.Or(p => p.MakeDate > DateTime.Parse(makedate));
                                }
                            }
                            if (makedateequal.Equals("<"))
                            {
                                if (makedateand.Equals("and"))
                                {
                                    where = where.And(p => p.MakeDate < DateTime.Parse(makedate));
                                }
                                else
                                {
                                    where = where.Or(p => p.MakeDate < DateTime.Parse(makedate));
                                }
                            }
                        }
                        break;

                    default:
                        break;
                    }
                }
                ViewBag.SearchCondition = sc.ConditionInfo;
            }
            userinfo _user = ServiceFactory.userinfoservice.GetEntityById(p => p.ID == userid && p.IsDelete == false);

            if (_user == null)
            {
                where = where.And(p => p.ID < 1);
            }
            else
            {
                switch (_user.AccountType)
                {
                case 100:
                    where = where.And(p => p.HuozhuID == _user.EmployeeID && p.IsDelete == false);
                    break;

                case 200:
                    where = where.And(p => p.ID < 1);
                    break;

                case 300:
                    where = where.And(p => p.KefuID == _user.EmployeeID && p.IsDelete == false);
                    break;

                case 0:
                default:
                    where = where.And(cust_chukujihua => cust_chukujihua.IsDelete == false);
                    break;
                }
            }
            //where = where.And(cust_chukujihua => cust_chukujihua.IsDelete == false);

            var tempData = ob_cust_chukujihuaservice.LoadSortEntities(where.Compile(), true, cust_chukujihua => cust_chukujihua.JihuaZT).ToPagedList <cust_chukujihua>(int.Parse(page), int.Parse(System.Web.Configuration.WebConfigurationManager.AppSettings["ShowPerPage"]));

            ViewBag.cust_chukujihua = tempData;
            ViewBag.usertype        = _user.AccountType;
            return(View(tempData));
        }
Ejemplo n.º 28
0
 protected void Page_Load(object sender, EventArgs e)
 {
     PageMenu.Initialise(Page);
 }
Ejemplo n.º 29
0
 public ViewModelHome()
 {
     PageMenu = PageMenu.Load("PageMenuHome");
 }
Ejemplo n.º 30
0
        public ActionResult Index()
        {
            int    userid          = (int)Session["user_id"];
            string pagetag         = "base_xiaoshou_index";
            string page            = "1";
            string shouquanid      = Request["shouquanid"] ?? "";
            string shouquanidequal = Request["shouquanidequal"] ?? "";
            string shouquanidand   = Request["shouquanidand"] ?? "";
            string xingming        = Request["xingming"] ?? "";
            string xingmingequal   = Request["xingmingequal"] ?? "";
            string xingmingand     = Request["xingmingand"] ?? "";

            PageMenu.Set("Index", "base_xiaoshou", "基础数据");
            Expression <Func <base_xiaoshou, bool> > where = PredicateExtensionses.True <base_xiaoshou>();
            searchcondition sc = searchconditionService.GetInstance().GetEntityById(searchcondition => searchcondition.UserID == userid && searchcondition.PageBrief == pagetag);

            if (sc == null)
            {
                sc           = new searchcondition();
                sc.UserID    = userid;
                sc.PageBrief = pagetag;
                //if (!string.IsNullOrEmpty(leibie))
                //{
                //    if (leibieequal.Equals("="))
                //    {
                //        if (leibieand.Equals("and"))
                //            where = where.And(base_xiaoshou => base_xiaoshou.Leibie == int.Parse(leibie));
                //        else
                //            where = where.Or(base_xiaoshou => base_xiaoshou.Leibie == int.Parse(leibie));
                //    }
                //    if (leibieequal.Equals(">"))
                //    {
                //        if (leibieand.Equals("and"))
                //            where = where.And(base_xiaoshou => base_xiaoshou.Leibie > int.Parse(leibie));
                //        else
                //            where = where.Or(base_xiaoshou => base_xiaoshou.Leibie > int.Parse(leibie));
                //    }
                //    if (leibieequal.Equals("<"))
                //    {
                //        if (leibieand.Equals("and"))
                //            where = where.And(base_xiaoshou => base_xiaoshou.Leibie < int.Parse(leibie));
                //        else
                //            where = where.Or(base_xiaoshou => base_xiaoshou.Leibie < int.Parse(leibie));
                //    }
                //}
                //if (!string.IsNullOrEmpty(leibie))
                //    sc.ConditionInfo = sc.ConditionInfo + string.Format("{0},{1},{2},{3};", "leibie", leibie, leibieequal, leibieand);
                //else
                //    sc.ConditionInfo = sc.ConditionInfo + string.Format("{0},{1},{2},{3};", "leibie", "", leibieequal, leibieand);
                if (!string.IsNullOrEmpty(shouquanid))
                {
                    if (shouquanidequal.Equals("="))
                    {
                        if (shouquanidand.Equals("and"))
                        {
                            where = where.And(base_xiaoshou => base_xiaoshou.ShouquanID == int.Parse(shouquanid));
                        }
                        else
                        {
                            where = where.Or(base_xiaoshou => base_xiaoshou.ShouquanID == int.Parse(shouquanid));
                        }
                    }
                }
                if (!string.IsNullOrEmpty(shouquanid))
                {
                    sc.ConditionInfo = sc.ConditionInfo + string.Format("{0},{1},{2},{3};", "shouquanid", shouquanid, shouquanidequal, shouquanidand);
                }
                else
                {
                    sc.ConditionInfo = sc.ConditionInfo + string.Format("{0},{1},{2},{3};", "shouquanid", "", shouquanidequal, shouquanidand);
                }

                if (!string.IsNullOrEmpty(xingming))
                {
                    if (xingmingequal.Equals("="))
                    {
                        if (xingmingand.Equals("and"))
                        {
                            where = where.And(base_xiaoshou => base_xiaoshou.Xingming == xingming);
                        }
                        else
                        {
                            where = where.Or(base_xiaoshou => base_xiaoshou.Xingming == xingming);
                        }
                    }
                    if (xingmingequal.Equals("like"))
                    {
                        if (xingmingand.Equals("and"))
                        {
                            where = where.And(base_xiaoshou => base_xiaoshou.Xingming.Contains(xingming));
                        }
                        else
                        {
                            where = where.Or(base_xiaoshou => base_xiaoshou.Xingming.Contains(xingming));
                        }
                    }
                }
                if (!string.IsNullOrEmpty(xingming))
                {
                    sc.ConditionInfo = sc.ConditionInfo + string.Format("{0},{1},{2},{3};", "xingming", xingming, xingmingequal, xingmingand);
                }
                else
                {
                    sc.ConditionInfo = sc.ConditionInfo + string.Format("{0},{1},{2},{3};", "xingming", "", xingmingequal, xingmingand);
                }

                searchconditionService.GetInstance().AddEntity(sc);
            }
            else
            {
                sc.ConditionInfo = "";
                if (!string.IsNullOrEmpty(shouquanid))
                {
                    if (shouquanidequal.Equals("="))
                    {
                        if (shouquanidand.Equals("and"))
                        {
                            where = where.And(base_xiaoshou => base_xiaoshou.ShouquanID == int.Parse(shouquanid));
                        }
                        else
                        {
                            where = where.Or(base_xiaoshou => base_xiaoshou.ShouquanID == int.Parse(shouquanid));
                        }
                    }
                }
                if (!string.IsNullOrEmpty(shouquanid))
                {
                    sc.ConditionInfo = sc.ConditionInfo + string.Format("{0},{1},{2},{3};", "shouquanid", shouquanid, shouquanidequal, shouquanidand);
                }
                else
                {
                    sc.ConditionInfo = sc.ConditionInfo + string.Format("{0},{1},{2},{3};", "shouquanid", shouquanid, shouquanidequal, shouquanidand);
                }


                if (!string.IsNullOrEmpty(xingming))
                {
                    if (xingmingequal.Equals("="))
                    {
                        if (xingmingand.Equals("and"))
                        {
                            where = where.And(base_xiaoshou => base_xiaoshou.Xingming == xingming);
                        }
                        else
                        {
                            where = where.Or(base_xiaoshou => base_xiaoshou.Xingming == xingming);
                        }
                    }
                    if (xingmingequal.Equals("like"))
                    {
                        if (xingmingand.Equals("and"))
                        {
                            where = where.And(base_xiaoshou => base_xiaoshou.Xingming.Contains(xingming));
                        }
                        else
                        {
                            where = where.Or(base_xiaoshou => base_xiaoshou.Xingming.Contains(xingming));
                        }
                    }
                }
                if (!string.IsNullOrEmpty(xingming))
                {
                    sc.ConditionInfo = sc.ConditionInfo + string.Format("{0},{1},{2},{3};", "xingming", xingming, xingmingequal, xingmingand);
                }
                else
                {
                    sc.ConditionInfo = sc.ConditionInfo + string.Format("{0},{1},{2},{3};", "xingming", "", xingmingequal, xingmingand);
                }

                searchconditionService.GetInstance().UpdateEntity(sc);
            }
            ViewBag.SearchCondition = sc.ConditionInfo;
            where = where.And(base_xiaoshou => base_xiaoshou.IsDelete == false);

            var tempData = ob_base_xiaoshouservice.LoadSortEntities(where.Compile(), false, base_xiaoshou => base_xiaoshou.ID).ToPagedList <base_xiaoshou>(int.Parse(page), int.Parse(System.Web.Configuration.WebConfigurationManager.AppSettings["ShowPerPage"]));

            ViewBag.base_xiaoshou = tempData;
            return(View(tempData));
        }