示例#1
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void DataInit()
        {
            #region 分页参数
            int pageSize    = 20;
            int pageIndex   = Utils.GetInt(Utils.GetQueryStringValue("page"), 1);
            int recordCount = 0;
            #endregion
            txt_SellsSelect.SetTitle  = "选择 销售员";
            txt_SellsSelect.SellsName = Utils.GetQueryStringValue(txt_SellsSelect.SellsNameClient);
            txt_SellsSelect.SellsID   = Utils.GetQueryStringValue(txt_SellsSelect.SellsIDClient);
            MWarningBase model = new MWarningBase();
            model.SellerId        = Utils.GetQueryStringValue(txt_SellsSelect.SellsIDClient);
            model.SellerName      = Utils.GetQueryStringValue(txt_SellsSelect.SellsNameClient);
            model.SignArrear      = (EqualSign?)Utils.GetEnumValueNull(typeof(EqualSign), Utils.GetQueryStringValue(CaiWuShaiXuan1.ClientUniqueIDOperator));
            model.Arrear          = Utils.GetDecimalNull(Utils.GetQueryStringValue(CaiWuShaiXuan1.ClientUniqueIDOperatorNumber));
            model.SignTransfinite = (EqualSign?)Utils.GetEnumValueNull(typeof(EqualSign), Utils.GetQueryStringValue(CaiWuShaiXuan2.ClientUniqueIDOperator));
            model.Transfinite     = Utils.GetDecimalNull(Utils.GetQueryStringValue(CaiWuShaiXuan2.ClientUniqueIDOperatorNumber));
            //部门
            int department = Utils.GetIntSign(Utils.GetQueryStringValue("sel_department"), -1);
            if (department >= 0)
            {
                model.DeptId = department;
            }
            IList <MComDepartment> lst = new EyouSoft.BLL.ComStructure.BComDepartment().GetList(CurrentUserCompanyID);
            StringBuilder          sb  = new StringBuilder();
            foreach (MComDepartment item in lst)
            {
                sb.Append("<option " + ((item.DepartId == model.DeptId) ? "selected=selected" : "") + " value=" + item.DepartId + ">-" + item.DepartName + "-</option>");
            }
            DepartmentOptionStr = sb.ToString();
            IList <MSalesmanWarning> ls = new BFinance().GetSalesmanWarningLst(
                pageSize,
                pageIndex,
                ref recordCount,
                CurrentUserCompanyID,
                model);

            if (ls != null && ls.Count > 0)
            {
                pan_Msg.Visible     = false;
                rpt_list.DataSource = ls;
                rpt_list.DataBind();
                //绑定分页
                BindPage(pageSize, pageIndex, recordCount);
            }
        }
示例#2
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void DataInit()
        {
            #region 分页参数
            int pageSize    = 20;
            int pageIndex   = Utils.GetInt(Utils.GetQueryStringValue("page"), 1);
            int recordCount = 0;
            #endregion
            txt_SellsSelect.SetTitle  = "选择 销售员";
            txt_SellsSelect.SellsName = Utils.GetQueryStringValue(txt_SellsSelect.SellsNameClient);
            txt_SellsSelect.SellsID   = Utils.GetQueryStringValue(txt_SellsSelect.SellsIDClient);
            MWarningBase model = new MWarningBase();
            model.CrmId           = Utils.GetQueryStringValue(CustomerUnitSelect1.ClientNameKHBH);
            model.Customer        = Utils.GetQueryStringValue(CustomerUnitSelect1.ClientNameKHMC);
            model.DeptId          = SiteUserInfo.DeptId;
            model.SellerId        = Utils.GetQueryStringValue(txt_SellsSelect.SellsIDClient);
            model.SellerName      = Utils.GetQueryStringValue(txt_SellsSelect.SellsNameClient);
            model.SignArrear      = (EqualSign?)Utils.GetEnumValueNull(typeof(EqualSign), Utils.GetQueryStringValue(CaiWuShaiXuan1.ClientUniqueIDOperator));
            model.Arrear          = Utils.GetDecimalNull(Utils.GetQueryStringValue(CaiWuShaiXuan1.ClientUniqueIDOperatorNumber));
            model.SignTransfinite = (EqualSign?)Utils.GetEnumValueNull(typeof(EqualSign), Utils.GetQueryStringValue(CaiWuShaiXuan2.ClientUniqueIDOperator));
            model.Transfinite     = Utils.GetDecimalNull(Utils.GetQueryStringValue(CaiWuShaiXuan2.ClientUniqueIDOperatorNumber));

            IList <MCustomerWarning> ls = new BFinance().GetCustomerWarningLst(
                pageSize,
                pageIndex,
                ref recordCount,
                CurrentUserCompanyID,
                model);
            if (ls != null && ls.Count > 0)
            {
                rpt_list.DataSource = ls;
                rpt_list.DataBind();
                //绑定分页
                BindPage(pageSize, pageIndex, recordCount);
                pan_Msg.Visible = false;
            }

            ExporPageInfoSelect1.Visible = ls != null && ls.Count > 0 && recordCount > pageSize;
        }