Beispiel #1
0
        /// <summary>
        /// 获取充值记录列表
        /// </summary>
        /// <param name="id"></param>
        /// <param name="pageIndex"></param>
        /// <param name="page"></param>
        /// <returns></returns>
        public PagedList <V_Recharge_user_bank> Recharge(int id, string startdatetime, string enddatetime, int?pageIndex = 1, int page = 1, int PageSize = 5)
        {
            Expression <Func <V_Recharge_user_bank, bool> > where = PredicateExtensionses.True <V_Recharge_user_bank>();
            where = where.And(p => p.recharge_history_id > 0);
            where = where.And(p => p.membertable_registerid == id);

            DateTime sdatetime = new DateTime();
            DateTime edatetime = new DateTime();

            if (Utils.IsDate(startdatetime))
            {
                sdatetime = DateTime.Parse(startdatetime);
            }

            if (Utils.IsDate(enddatetime))
            {
                edatetime = DateTime.Parse(enddatetime);
            }

            if (sdatetime > DateTime.Parse("0001-01-01 00:00:00") && edatetime > DateTime.Parse("0001-01-01 00:00:00"))
            {
                where = where.And(p => ((DateTime)p.recharge_time).CompareTo(sdatetime) >= 0);
                DateTime dt2 = Convert.ToDateTime(edatetime.ToString("yyyy-MM-dd") + " 23:59:59");
                where = where.And(p => ((DateTime)p.recharge_time).CompareTo(dt2) <= 0);
            }

            var list = ef.V_Recharge_user_bank.Where(where).OrderByDescending(p => p.recharge_history_id).ToPagedList(pageIndex ?? 1, PageSize);

            return(list);
        }
Beispiel #2
0
        /// <summary>
        /// 邀请记录
        /// </summary>
        /// <param name="id"></param>
        /// <param name="startdatetime"></param>
        /// <param name="enddatetime"></param>
        /// <param name="pageIndex"></param>
        /// <param name="page"></param>
        /// <param name="pgaesize"></param>
        /// <returns></returns>
        public PagedList <hx_td_usrlogininfo> usrlogin(int id, string startdatetime, string enddatetime, int?acttype = 1, int?pageIndex = 1, int page = 1, int pgaesize = 5)
        {
            Expression <Func <hx_td_usrlogininfo, bool> > where = PredicateExtensionses.True <hx_td_usrlogininfo>();
            where = where.And(p => p.registerid == id);

            DateTime sdatetime = new DateTime();
            DateTime edatetime = new DateTime();

            if (Utils.IsDate(startdatetime))
            {
                sdatetime = DateTime.Parse(startdatetime);
            }

            if (Utils.IsDate(enddatetime))
            {
                edatetime = DateTime.Parse(enddatetime);
            }

            if (sdatetime > DateTime.Parse("0001-01-01 00:00:00") && edatetime > DateTime.Parse("0001-01-01 00:00:00"))
            {
                where = where.And(p => ((DateTime)p.logintime).CompareTo(sdatetime) >= 0);
                DateTime dt2 = Convert.ToDateTime(edatetime.ToString("yyyy-MM-dd") + " 23:59:59");
                where = where.And(p => ((DateTime)p.logintime).CompareTo(dt2) <= 0);
            }

            var list = ef.hx_td_usrlogininfo.Where(where).OrderByDescending(p => p.loginid).ToPagedList(pageIndex ?? 1, pgaesize);

            return(list);
        }
Beispiel #3
0
        /// <summary>
        /// 用户投资记录
        /// </summary>
        /// <param name="id"></param>
        /// <param name="startdatetime"></param>
        /// <param name="enddatetime"></param>
        /// <param name="pageIndex"></param>
        /// <param name="page"></param>
        /// <param name="pgaesize"></param>
        /// <returns></returns>
        public PagedList <V_hx_Bid_records_borrowing_target> Bid_RecordsList(int id, string startdatetime, string enddatetime, int?pageIndex = 1, int page = 1, int pgaesize = 5)
        {
            Expression <Func <V_hx_Bid_records_borrowing_target, bool> > where = PredicateExtensionses.True <V_hx_Bid_records_borrowing_target>();
            where = where.And(p => p.registerid > 0);
            where = where.And(p => p.registerid == id);
            DateTime sdatetime = new DateTime();
            DateTime edatetime = new DateTime();

            if (Utils.IsDate(startdatetime))
            {
                sdatetime = DateTime.Parse(startdatetime);
            }

            if (Utils.IsDate(enddatetime))
            {
                edatetime = DateTime.Parse(enddatetime);
            }

            if (sdatetime > DateTime.Parse("0001-01-01 00:00:00") && edatetime > DateTime.Parse("0001-01-01 00:00:00"))
            {
                where = where.And(p => ((DateTime)p.invest_time).CompareTo(sdatetime) >= 0);
                DateTime dt2 = Convert.ToDateTime(edatetime.ToString("yyyy-MM-dd") + " 23:59:59");
                where = where.And(p => ((DateTime)p.invest_time).CompareTo(dt2) <= 0);
            }

            var list = ef.V_hx_Bid_records_borrowing_target.Where(where).OrderByDescending(p => p.bid_records_id).ToPagedList(pageIndex ?? 1, pgaesize);

            return(list);
        }
Beispiel #4
0
        public PagedList <hx_td_LL_cash> UserLLCash(int id, string startdatetime, string enddatetime, int?pageIndex = 1, int page = 1, int pagesize = 5)
        {
            Expression <Func <hx_td_LL_cash, bool> > where = PredicateExtensionses.True <hx_td_LL_cash>();
            where = where.And(p => p.LLcashid > 0);
            where = where.And(p => p.Usrid == id);
            where = where.And(p => p.bank_code != null);


            DateTime sdatetime = new DateTime();
            DateTime edatetime = new DateTime();

            if (Utils.IsDate(startdatetime))
            {
                sdatetime = DateTime.Parse(startdatetime);
            }

            if (Utils.IsDate(enddatetime))
            {
                edatetime = DateTime.Parse(enddatetime);
            }

            if (sdatetime > DateTime.Parse("0001-01-01 00:00:00") && edatetime > DateTime.Parse("0001-01-01 00:00:00"))
            {
                where = where.And(p => ((DateTime)p.ordertime).CompareTo(sdatetime) >= 0);
                DateTime dt2 = Convert.ToDateTime(edatetime.ToString("yyyy-MM-dd") + " 23:59:59");
                where = where.And(p => ((DateTime)p.ordertime).CompareTo(dt2) <= 0);
            }

            var list = ef.hx_td_LL_cash.Where(where).OrderByDescending(p => p.LLcashid).ToPagedList(pageIndex ?? 1, pagesize);

            return(list);
        }
        public ActionResult Index(string mention_charges_name = "", int fees_unit = -1, int Page = 1, int pageSize = 10)
        {
            int pageNumber = Page / 1;

            Expression <Func <hx_Mention_charges, bool> > where = PredicateExtensionses.True <hx_Mention_charges>();
            where = where.And(p => p.mention_charges_id > 0);

            if (fees_unit > -1)
            {
                where = where.And(p => p.fees_unit == fees_unit);
            }


            if (!string.IsNullOrEmpty(mention_charges_name))
            {
                where = where.And(p => p.mention_charges_name.Contains(mention_charges_name));
            }

            IPagedList <hx_Mention_charges> list = ef.hx_Mention_charges.Where(where).OrderByDescending(p => p.mention_charges_id).ToPagedList(pageNumber, pageSize);

            ViewBag.mention_charges_name = mention_charges_name;
            ViewBag.fees_unit            = fees_unit;
            ViewBag.page = Page;
            return(View(list));
        }
Beispiel #6
0
 /// <summary>
 /// 加载数据
 /// </summary>
 private void LoadData(string strName)
 {
     try
     {
         if (expr == null)
         {
             if (expr == null)
             {
                 expr = PredicateExtensionses.True <View_ClientInfo>();
             }
         }
         if (txtSName.Text.Trim() != "")
         {
             expr = expr.And(n => SqlMethods.Like(n.Client_NAME, "%" + txtSName.Text.Trim() + "%"));
         }
         if (cmbSState.Text != "全部" && cmbSState.Text != "")
         {
             int did = Convert.ToInt32(cmbSState.SelectedValue.ToString());
             expr = expr.And(n => (n.Dictionary_ID == did));
         }
         this.dgvClient.DataSource          = null;
         page.PageMaxCount                  = tscbxPageSize2.SelectedItem.ToString();
         this.dgvClient.AutoGenerateColumns = false;
         dgvClient.DataSource               = page.BindBoundControl <View_ClientInfo>(strName, txtCurrentPage2, lblPageCount2, expr);
     }
     catch (Exception ex)
     {
         Common.WriteTextLog("客户端管理 LoadData()" + ex.Message.ToString());
     }
 }
Beispiel #7
0
        public ActionResult Index(string adname = "", int AdTypeState = -1, int ddlType = 8, int adstate = 0, int Page = 1, int pageSize = 10)
        {
            int pageNumber = Page / 1;

            Expression <Func <V_AD_type, bool> > where = PredicateExtensionses.True <V_AD_type>();
            where = where.And(p => p.Adid > 0);



            if (!string.IsNullOrEmpty(adname))
            {
                where = where.And(p => p.AdName.Contains(adname));
            }

            if (adstate == 1)
            {
                where = where.And(p => p.AdState == 0);
            }
            else if (adstate == 2)
            {
                where = where.And(p => p.AdState == 1);
            }
            if (AdTypeState != -1)
            {
                where = where.And(p => p.AdTypeId == AdTypeState);
            }
            IPagedList <V_AD_type> list = ef.V_AD_type.Where(where).OrderByDescending(p => p.Adid).ToPagedList(pageNumber, pageSize);

            ViewBag.adname      = adname;
            ViewBag.adstate     = adstate;
            ViewBag.AdTypeState = AdTypeState;
            ViewBag.ddlType     = ddlType;
            return(View(list));
        }
Beispiel #8
0
        public ActionResult Index(int page = 1, int pgaesize = 10)
        {
            int    pageIndex   = page / 1;
            string channelName = Utils.CheckSQLHtml(DNTRequest.GetString("ChannelName"));

            Expression <Func <hx_Channel, bool> > where = PredicateExtensionses.True <hx_Channel>();
            if (!string.IsNullOrEmpty(channelName))
            {
                where = where.And(p => p.ChannelName.Contains(channelName));
            }
            var list = ef.hx_Channel.Where(where).OrderByDescending(p => p.ChannelID).ToPagedList(pageIndex, pgaesize);
            Dictionary <int, int> dictRegister = new Dictionary <int, int>(); //邀请注册总数
            Dictionary <int, int> dictOrder    = new Dictionary <int, int>(); //邀请注册下单总数

            foreach (var item in list)
            {
                var count = ef.hx_member_table.Where(p => p.channel_invitedcode == item.Invitedcode).Count();
                dictRegister.Add(item.ChannelID, count);

                count = ef.V_Channel_Invite.Where(p => p.channel_invitedcode == item.Invitedcode).Count();
                dictOrder.Add(item.ChannelID, count);
            }
            ViewBag.DictRegister = dictRegister;
            ViewBag.DictOrder    = dictOrder;
            ViewBag.ChannelName  = channelName;
            return(View(list));
        }
Beispiel #9
0
        public List <PointPacketConfig> GetPointPacketConfigsList(ref DataPage dp)
        {
            Expression <Func <PointPacketConfig, bool> > exp = PredicateExtensionses.True <PointPacketConfig>();
            List <PointPacketConfig> packetentrylist         = GetEntityQueryList(ref dp, exp, p => p.ConfigId);

            return(packetentrylist);
        }
        public JsonResult GetZCZNow()
        {
            int _userid = (int)Session["user_id"];
            var _mc     = Request["mc"] ?? "";
            var _bh     = Request["bh"] ?? "";
            var _gg     = Request["gg"] ?? "";

            Expression <Func <base_shangpinzcz, bool> > where = PredicateExtensionses.True <base_shangpinzcz>();

            if (string.IsNullOrEmpty(_mc) && string.IsNullOrEmpty(_bh) && string.IsNullOrEmpty(_gg))
            {
                return(Json(1));
            }
            if (!string.IsNullOrEmpty(_mc))
            {
                where = where.And(p => p.Mingcheng.Contains(_mc));
            }
            if (!string.IsNullOrEmpty(_bh))
            {
                where = where.And(p => p.Bianhao.Contains(_bh));
            }
            if (!string.IsNullOrEmpty(_gg))
            {
                var _gglist  = ServiceFactory.base_zhucezhengggservice.LoadEntities(g => g.Guige.Contains(_gg)).ToList <base_zhucezhenggg>();
                var _zidlist = from gg in _gglist
                               select(int) gg.ZCZID;

                var _zid = _zidlist.Distinct().ToList();
                where = where.And(p => _zid.Contains(p.ID));
            }
            where = where.And(p => p.ShixiaoSF == false && p.IsDelete == false);
            var _zczlist = ob_base_shangpinzczservice.LoadSortEntities(where.Compile(), true, s => s.Bianhao);

            return(Json(_zczlist.ToList <base_shangpinzcz>()));
        }
Beispiel #11
0
        public ActionResult Index(string username = "", int OrdIdState = -1, int ddlType = 3, int OrdIdState1 = -1, int Page = 1, int pageSize = 10)
        {
            Response.BufferOutput = true;
            int pageNumber = Page / 1;

            Expression <Func <V_UserCash_Bank, bool> > where = PredicateExtensionses.True <V_UserCash_Bank>();
            where = where.And(p => p.UserCashId > 0);

            if (ddlType != 3 && OrdIdState == -1)
            {
                OrdIdState = OrdIdState1;
            }

            if (!string.IsNullOrEmpty(username))
            {
                where = where.And(p => p.username.Contains(username));
            }
            if (OrdIdState >= 0)
            {
                where = where.And(p => p.OrdIdState == (OrdIdState));
            }
            IPagedList <V_UserCash_Bank> list = ef.V_UserCash_Bank.Where(where).OrderByDescending(p => p.UserCashId).ToPagedList(pageNumber, pageSize);

            ViewBag.username    = username;
            ViewBag.OrdIdState  = OrdIdState;
            ViewBag.ddlType     = ddlType;
            ViewBag.OrdIdState1 = OrdIdState1;

            return(View(list));
        }
Beispiel #12
0
        public List <TaskConfig> GetTaskConfig(ref DataPage dp)
        {
            Expression <Func <TaskConfig, bool> > exp = PredicateExtensionses.True <TaskConfig>();
            List <TaskConfig> resultlist2             = ptx.GetEntityQueryList(ref dp, exp, p => p.TaskConfigId);

            return(resultlist2);
        }
Beispiel #13
0
        public ActionResult Index(string contract_template_name = "", int contract_type_id = -1, int Page = 1, int pageSize = 10)
        {
            int pageNumber = Page / 1;

            Expression <Func <V_contract_type_template, bool> > where = PredicateExtensionses.True <V_contract_type_template>();
            where = where.And(p => p.contract_template_id > 0);

            if (!String.IsNullOrEmpty(contract_template_name))
            {
                where = where.And(p => p.contract_template_name.Contains(contract_template_name));
            }
            if (contract_type_id >= 0)
            {
                where = where.And(p => p.contract_type_id == contract_type_id);
            }
            IPagedList <V_contract_type_template> list = ef.V_contract_type_template.Where(where).OrderByDescending(p => p.contract_template_id).ToPagedList(pageNumber, pageSize);

            //IEnumerable<SelectListItem> list_ConType = ef.hx_contract_type.OrderByDescending(p => p.contract_type_id).Select(p => new SelectListItem { Value = p.contract_type_id.ToString(), Text = p.contract_type_name });

            ViewBag.list_ConType           = GetContractTypeList();
            ViewBag.contract_template_name = contract_template_name;
            ViewBag.contract_type_id       = contract_type_id;

            return(View(list));
        }
Beispiel #14
0
 private void SelectShere()
 {
     try
     {
         //if (expr == null)
         //{
         expr = PredicateExtensionses.True <RoleInfo>();
         //}
         string SearchName = txtSearchName.Text.Trim();
         int    i          = 0;
         if (SearchName != "")//根据角色名查询
         {
             //expr = expr.And(n => n.Role_Name == SearchName);
             expr = expr.And(n => SqlMethods.Like(n.Role_Name, "%" + SearchName + "%"));
             i++;
         }
         if (i == 0)
         {
             expr = null;
         }
     }
     catch (Exception ex)
     {
         Common.WriteTextLog("UserRole.SelectShere()" + ex.Message.ToString());
     }
     finally
     {
         page = new PageControl();
         page.PageMaxCount = tscbxPageSize2.SelectedItem.ToString();
         LoadData();
     }
 }
Beispiel #15
0
        public ActionResult Index(string activity_schedule_name = "", int reward = -1, int Page = 1, int pageSize = 10)
        {
            int pageNumber = Page / 1;

            Expression <Func <hx_Activity_schedule, bool> > where = PredicateExtensionses.True <hx_Activity_schedule>();
            where = where.And(p => p.activity_schedule_id > 0);

            if (reward > -1)
            {
                where = where.And(p => p.reward == reward);
            }


            if (!string.IsNullOrEmpty(activity_schedule_name))
            {
                where = where.And(p => p.activity_schedule_name.Contains(activity_schedule_name));
            }

            IPagedList <hx_Activity_schedule> list = ef.hx_Activity_schedule.Where(where).OrderByDescending(p => p.activity_schedule_id).ToPagedList(pageNumber, pageSize);

            ViewBag.activity_schedule_name = activity_schedule_name;
            ViewBag.reward = reward;
            ViewBag.page   = Page;
            return(View(list));
        }
        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);
        }
Beispiel #17
0
        public ActionResult ChannelInvList(int page = 1, int pagesize = 10)
        {
            int     pageIndex     = page / 1;
            string  adminUserName = Utils.CheckSQLHtml(DNTRequest.GetString("AdminUserName"));
            string  channelName   = Utils.CheckSQLHtml(DNTRequest.GetString("ChannelName"));
            string  ordId         = Utils.CheckSQLHtml(DNTRequest.GetString("OrdId"));
            string  btitle        = Utils.CheckSQLHtml(DNTRequest.GetString("BTitle"));
            string  startTime     = DNTRequest.GetString("StartTime");
            string  endTime       = DNTRequest.GetString("EndTime");
            decimal orderid       = 0;

            decimal.TryParse(ordId, out orderid);
            Expression <Func <V_Channel_Invite, bool> > where = PredicateExtensionses.True <V_Channel_Invite>();
            if (!string.IsNullOrEmpty(channelName))
            {
                where = where.And(p => p.ChannelName.Contains(channelName));
            }
            if (!string.IsNullOrEmpty(adminUserName))
            {
                where = where.And(p => p.AdminUserName.Contains(adminUserName.Trim()));
            }
            if (!string.IsNullOrEmpty(ordId) && orderid > 0)
            {
                where = where.And(p => p.OrdId.ToString().Contains(ordId.Trim()));
            }
            if (!string.IsNullOrEmpty(btitle))
            {
                where = where.And(p => p.borrowing_title.Contains(btitle.Trim()));
            }

            if (!string.IsNullOrEmpty(startTime) && startTime != "")
            {
                DateTime stime = Convert.ToDateTime(startTime);
                where = where.And(p => DbFunctions.DiffDays(p.invest_time, stime) <= 0);
                DateTime etime = DateTime.Now;
                if (!string.IsNullOrEmpty(endTime) && endTime != "")
                {
                    etime = Convert.ToDateTime(endTime);
                }
                etime = etime.AddDays(1).AddSeconds(-1);
                where = where.And(p => DbFunctions.DiffDays(p.invest_time, etime) >= 0);
            }

            var list1 = ef.V_Channel_Invite.Where(where).ToList();

            var list2 = ef.V_Channel_Invite.Where(where).OrderByDescending(p => p.invest_time).ToList();

            var list = ef.V_Channel_Invite.Where(where).OrderByDescending(p => p.invest_time).ToPagedList(pageIndex, pagesize);


            ViewBag.AdminUserName = adminUserName;
            ViewBag.ChannelName   = channelName;
            ViewBag.OrdId         = ordId;
            ViewBag.StartTime     = startTime;
            ViewBag.EndTime       = endTime;
            ViewBag.BTitle        = btitle;
            return(View(list));
        }
 private void UpdateQCDetailsForm_Load(object sender, EventArgs e)
 {
     //调用显示状态
     BindState();
     expr = (Expression <Func <View_QCRecordInfo, bool> >)PredicateExtensionses.True <View_QCRecordInfo>();
     expr = n => n.QCInfo_ID == iqcinfoid;
     //调用显示加载数据的方法(查看详情)
     LoadData();
 }
 /// <summary>
 /// 加载用户
 /// </summary>
 private void InitUser()
 {
     expr = PredicateExtensionses.True <UserInfo>();
     expr = expr.And(n => n.UserLoginId != "emewe");
     this.lvwUserList.AutoGenerateColumns = false;//设置只显示列表控件绑定的列
     tscbxPageSize.SelectedIndex          = 2;
     //LoadData();
     cmbRoleUserDate();
 }
Beispiel #20
0
        public JsonResult AUListExcel()
        {
            //导出已注册的用户列表
            string adminUserName = Utils.CheckSQLHtml(DNTRequest.GetString("AdminUserName"));
            string username      = Utils.CheckSQLHtml(DNTRequest.GetString("UserName"));
            string startTime     = DNTRequest.GetString("StartTime");
            string endTime       = DNTRequest.GetString("EndTime");

            Expression <Func <V_Channel_UserList, bool> > where = PredicateExtensionses.True <V_Channel_UserList>();
            if (!string.IsNullOrEmpty(adminUserName))
            {
                where = where.And(p => p.AdminUserName.Contains(adminUserName.Trim()));
            }
            if (!string.IsNullOrEmpty(username))
            {
                where = where.And(p => p.username.Contains(username.Trim()));
            }
            if (!string.IsNullOrEmpty(startTime) && startTime != "")
            {
                DateTime stime = Convert.ToDateTime(startTime);
                where = where.And(p => DbFunctions.DiffDays(p.registration_time, stime) <= 0);
                DateTime etime = DateTime.Now;
                if (!string.IsNullOrEmpty(endTime) && endTime != "")
                {
                    etime = Convert.ToDateTime(endTime);
                }
                etime = etime.AddDays(1).AddSeconds(-1);
                where = where.And(p => DbFunctions.DiffDays(p.registration_time, etime) >= 0);
            }
            var list = ef.V_Channel_UserList.Where(where).OrderByDescending(p => p.registration_time).ToList();
            var dt   = new DataTable();

            #region List TO DataTable
            dt.Columns.Add("编号", typeof(string));
            dt.Columns.Add("渠道使用者", typeof(string));
            dt.Columns.Add("被邀请账号", typeof(string));
            dt.Columns.Add("被邀请真实姓名", typeof(string));
            dt.Columns.Add("注册时间", typeof(string));
            foreach (var item in list)
            {
                DataRow dr = dt.NewRow();
                dr[0] = item.ID.ToString();
                dr[1] = item.AdminUserName;
                dr[2] = item.username;
                dr[3] = item.realname;
                dr[4] = item.registration_time;
                dt.Rows.Add(dr);
            }
            #endregion
            string url    = Extensions.ExportExcel(dt);
            var    result = new { state = 1, msg = "投资列表导出完成!", data = url };
            if (string.IsNullOrEmpty(url))
            {
                result = new { state = 0, msg = "导出数据为空!", data = string.Empty };
            }
            return(Json(result));
        }
Beispiel #21
0
        /// <summary>
        /// 搜索待检测记录条件
        /// </summary>
        private void GetDgvDictionarySeacher()
        {
            try
            {
                var i = 0;
                if (expr == null)
                {
                    expr = (Expression <Func <Dictionary, bool> >)PredicateExtensionses.True <Dictionary>();
                }

                if (!string.IsNullOrEmpty(cbxDictionary_State.Text))
                {
                    if (cbxDictionary_State.Text == "启动")
                    {
                        expr = expr.And(n => n.Dictionary_State == true);
                    }
                    else
                    {
                        expr = expr.And(n => n.Dictionary_State == false);
                    }
                    i++;
                }
                if (!string.IsNullOrEmpty(txtDictionary_Value.Text))
                {
                    expr = expr.And(n => n.Dictionary_Value == txtDictionary_Value.Text.Trim());
                    i++;
                }
                if (!string.IsNullOrEmpty(txtDictionary_Name.Text))
                {
                    expr = expr.And(n => n.Dictionary_Name == txtDictionary_Name.Text.Trim());
                    i++;
                }
                if (cbxDictionary_OtherID.SelectedIndex >= 0)
                {
                    int itemid = Converter.ToInt(cbxDictionary_OtherID.SelectedValue.ToString());
                    if (itemid > 0)
                    {
                        expr = expr.And(n => n.Dictionary_OtherID == itemid);
                    }
                    i++;
                }
                if (!string.IsNullOrEmpty(txtDictionary_Remark.Text))
                {
                    expr = expr.And(n => n.Dictionary_Remark == txtDictionary_Remark.Text.Trim());
                    i++;
                }
                if (i == 0)
                {
                    expr = null;
                }
            }
            catch (Exception ex)
            {
                Common.WriteTextLog("DictionaryAdmin.GetDgvDictionarySeacher异常:" + ex.Message.ToString());
            }
        }
Beispiel #22
0
        /// <summary>
        /// 搜索
        /// </summary>
        private void selectTJ()
        {
            try
            {
                //if (expr == null)
                //{
                //expr = PredicateExtensionses.True<View_UserInfo_D_R_d>();
                expr = (Expression <Func <View_UserInfo2_D_R_d, bool> >)PredicateExtensionses.True <View_UserInfo2_D_R_d>();
                //}
                int i = 0;
                //if (txtSearchId.Text.Trim() != "")//用户名
                //{
                //    //expr = expr.And(n => n.UserLoginId == txtSearchId.Text.Trim());
                //    expr = expr.And(n => SqlMethods.Like(n.UserLoginId, "%" + txtSearchId.Text.Trim() + "%") && n.UserLoginId != "emewe");
                //    i++;

                //}
                if (txt_Name.Text.Trim() != "")//真实姓名
                {
                    //expr = expr.And(n => n.UserName == txt_Name.Text.Trim());
                    expr = expr.And(n => SqlMethods.Like(n.UserName, "%" + txt_Name.Text.Trim() + "%"));
                    i++;
                }
                if (cobDuty_Name2.SelectedValue != "") //职位
                {
                    expr = expr.And(n => SqlMethods.Like(n.Duty_Name, "%" + cobDuty_Name2.Text.Trim() + "%"));
                    i++;
                }
                //if (cmbSearchRole.Text != "")//角色
                //{
                //    expr = expr.And(n => n.Role_Name == cmbSearchRole.Text && n.UserLoginId != "emewe");

                //    i++;
                //}
                //if (i == 0)
                //{
                //    expr = expr.And(n => n.UserLoginId != "emewe");
                //}
            }
            catch (Exception ex)
            {
                Common.WriteTextLog("用户管理 selectTJ()" + ex.Message.ToString());
            }
            finally
            {
                page = new PageControl();
                page.PageMaxCount = tscbxPageSize2.SelectedItem.ToString();
                LoadData();
            }
        }
        private void LoadData(string strName)
        {
            if (expr == null)
            {
                expr = (Expression <Func <idebarJoinU9, bool> >)PredicateExtensionses.True <idebarJoinU9>();
            }

            if (txtPRODID2.Text != "")
            {
                expr = expr.And(n => SqlMethods.Like(n.idebarJoinU9_PROD_ID, "%" + txtPRODID2.Text.Trim() + "%"));
            }

            dgvView_WaterSet.AutoGenerateColumns = false;
            dgvView_WaterSet.DataSource          = page.BindBoundControl <idebarJoinU9>(strName, txtCurrentPage1, lblPageCount1, expr, "idebarJoinU9_id");
        }
Beispiel #24
0
        public ActionResult InvalidInvst()
        {
            Expression <Func <V_Bid_records_Lost, bool> > where = PredicateExtensionses.True <V_Bid_records_Lost>();
            where = where.And(p => p.bid_records_id > 0);
            //清理10分钟之前的无效标的
            DateTime dt2 = DateTime.Now.AddMinutes(-10);

            where = where.And(a => ((DateTime)a.invest_time) <= dt2);
            List <V_Bid_records_Lost> list = ef.V_Bid_records_Lost.Where(where).AsNoTracking().ToList();

            foreach (V_Bid_records_Lost item in list)
            {
                setRecords_Lost(item.investor_registerid.ToString(), item.bid_records_id.ToString(), item.OrdId.ToString(), DateTime.Parse(item.invest_time.ToString()).ToString("yyyyMMdd"), item.UsrCustId.ToString(), item.FrozenidNo, item.investment_amount.ToString(), item.FreezeTrxId == null ? "" : item.FreezeTrxId.ToString(), "", "TENDER");
            }
            return(Content("远程调用成功"));
        }
Beispiel #25
0
 public PagingOutput <Accounts> GetPageList(GetPageListInput input)
 {
     return(AutofacConfig.Resolve <AccountsRepository>().GetPageList(
                input.PageIndex,
                input.PageSize,
                PredicateExtensionses.True <Accounts>().AndIf(a => a.LoginAccount == input.LoginAccount, !string.IsNullOrWhiteSpace(input.LoginAccount))
                .AndIf(a => a.LoginName.Contains(input.LoginName), !string.IsNullOrWhiteSpace(input.LoginName))
                .And(a => a.IsDeleted == input.IsDeleted)
                .AndIf(a => a.Email == input.Email, !string.IsNullOrWhiteSpace(input.Email))
                .AndIf(a => a.CreateTime >= input.CreateTimeBegin.Value, input.CreateTimeBegin.HasValue)
                .AndIf(a => a.CreateTime < input.CreateTimeEnd.Value, input.CreateTimeEnd.HasValue)
                .AndIf(a => a.DeleteTime >= input.DeleteTimeBegin.Value, input.DeleteTimeBegin.HasValue)
                .AndIf(a => a.DeleteTime < input.DeleteTimeEnd.Value, input.DeleteTimeEnd.HasValue),
                a => a.CreateTime,
                true
                ));
 }
Beispiel #26
0
 private void Search()
 {
     Expression <Func <MODEL.GoodsInfo, bool> > where = PredicateExtensionses.True <MODEL.GoodsInfo>();
     if (!string.IsNullOrWhiteSpace(strGiEncoder))
     {
         where = where.And(u => u.GIEncoder == strGiEncoder);
     }
     if (!string.IsNullOrWhiteSpace(strGiName))
     {
         where = where.And(u => u.GIName == strGiName);
     }
     if (!string.IsNullOrWhiteSpace(strGiSize))
     {
         where = where.And(u => u.GISize == strGiSize);
     }
     GoodsInfoList = bllGoodsInfo.GetListBy(where);
 }
Beispiel #27
0
        public ActionResult AdminUserList(int page = 1, int pagesize = 10)
        {
            //渠道用户非,非后台登录用户
            hx_Channel_AdminUser adminUser = Session["Channel_AdminUser"] as hx_Channel_AdminUser;

            //判定用户
            if (adminUser == null)
            {
                return(RedirectToAction("LoginOut", "Channel"));
            }
            int    pageIndex = page / 1;
            string realname  = Utils.CheckSQLHtml(DNTRequest.GetString("RealName"));
            string username  = Utils.CheckSQLHtml(DNTRequest.GetString("UserName"));
            string startTime = DNTRequest.GetString("StartTime");
            string endTime   = DNTRequest.GetString("EndTime");

            Expression <Func <V_Channel_UserList, bool> > where = PredicateExtensionses.True <V_Channel_UserList>();
            where = where.And(p => p.AdminUserName == adminUser.AdminUserName);
            if (!string.IsNullOrEmpty(realname))
            {
                where = where.And(p => p.realname.Contains(realname.Trim()));
            }
            if (!string.IsNullOrEmpty(username))
            {
                where = where.And(p => p.username.Contains(username.Trim()));
            }
            if (!string.IsNullOrEmpty(startTime) && startTime != "")
            {
                DateTime stime = Convert.ToDateTime(startTime);
                where = where.And(p => DbFunctions.DiffDays(p.registration_time, stime) <= 0);
                DateTime etime = DateTime.Now;
                if (!string.IsNullOrEmpty(endTime) && endTime != "")
                {
                    etime = Convert.ToDateTime(endTime);
                }
                etime = etime.AddDays(1).AddSeconds(-1);
                where = where.And(p => DbFunctions.DiffDays(p.registration_time, etime) >= 0);
            }
            var list = ef.V_Channel_UserList.Where(where).OrderByDescending(p => p.registration_time).ToPagedList(pageIndex, pagesize);

            ViewBag.Username  = username;
            ViewBag.RealName  = realname;
            ViewBag.StartTime = startTime;
            ViewBag.EndTime   = endTime;
            return(View(list));
        }
Beispiel #28
0
        public Expression <Func <T, bool> > CreateDydaminWhereAndExpression <T>(T querymodel) where T : class
        {
            Expression <Func <T, bool> > finalexpression = PredicateExtensionses.True <T>();

            if (querymodel == null)
            {
                return(finalexpression);
            }
            Type t = querymodel.GetType();

            PropertyInfo[] properties = t.GetProperties();
            foreach (PropertyInfo item in properties)
            {
                object value = item.GetValue(querymodel, null);
                if (value != null)
                {
                    Type valuetype = value.GetType();
                    if (valuetype != typeof(Int32) && valuetype != typeof(Int64))
                    {
                        if (valuetype == typeof(DateTime) && (DateTime)value != DateTime.Parse("1900/1/1 0:00:00") && (DateTime)value != default(DateTime))
                        {
                            DateTime startdate = DateTime.Parse(Convert.ToDateTime(value).ToShortDateString());
                            DateTime enddate   = startdate.AddDays(1);
                            Expression <Func <T, bool> > startexpression = ExpressionOperator.CreateCompareExpression <T>(item.Name, startdate, "greaterthanorequal");
                            Expression <Func <T, bool> > endexpression   = ExpressionOperator.CreateCompareExpression <T>(item.Name, enddate, "lessthan");
                            finalexpression = finalexpression.And <T>(startexpression).And <T>(endexpression);
                        }
                        if (valuetype != typeof(DateTime) && valuetype != typeof(Boolean))
                        {
                            Expression <Func <T, bool> > currentexpression = ExpressionOperator.CreateCompareExpression <T>(item.Name, value);
                            finalexpression = finalexpression.And <T>(currentexpression);
                        }
                    }
                    else
                    {
                        long convervalue = Convert.ToInt64(value);
                        if (convervalue != 0)
                        {
                            Expression <Func <T, bool> > currentexpression = ExpressionOperator.CreateCompareExpression <T>(item.Name, value);
                            finalexpression = finalexpression.And <T>(currentexpression);
                        }
                    }
                }
            }
            return(finalexpression);
        }
Beispiel #29
0
 /// <summary>
 /// 加载用户
 /// </summary>
 private void InitUser()
 {
     expr = PredicateExtensionses.True <View_UserInfo2_D_R_d>();
     //  expr = expr.And(n => n.UserLoginId != "emewe");
     this.lvwUserList.AutoGenerateColumns = false;//设置只显示列表控件绑定的列
     LoadData();
     bingcob_Duty_Name();
     bingcob_QCGroup_Name(cbxState);
     //  bingcob_QCGroup_Name(cmbSearchRole);
     btnUpUser.Visible     = false;
     btnUserCancle.Visible = false;
     mf = new MainFrom();
     if (btnAdd.Visible)
     {
         rbool = true;
     }
 }
Beispiel #30
0
        public ActionResult Index(string page)
        {
            if (string.IsNullOrEmpty(page))
            {
                page = "1";
            }

            string zhanghao      = Request["zhanghao"] ?? "";
            string zhanghaoequal = Request["zhanghaoequal"] ?? "";
            string zhanghaoand   = Request["zhanghaoand"] ?? "";

            Expression <Func <base_yonghu, bool> > where = PredicateExtensionses.True <base_yonghu>();
            if (!string.IsNullOrEmpty(zhanghao))
            {
                if (zhanghaoequal.Equals("="))
                {
                    if (zhanghaoand.Equals("and"))
                    {
                        where = where.And(base_yonghu => base_yonghu.Zhanghao == zhanghao);
                    }
                    else
                    {
                        where = where.Or(base_yonghu => base_yonghu.Zhanghao == zhanghao);
                    }
                }
                if (zhanghaoequal.Equals("like"))
                {
                    if (zhanghaoand.Equals("and"))
                    {
                        where = where.And(base_yonghu => base_yonghu.Zhanghao.Contains(zhanghao));
                    }
                    else
                    {
                        where = where.Or(base_yonghu => base_yonghu.Zhanghao.Contains(zhanghao));
                    }
                }
            }

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

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

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