Example #1
0
        /// <summary>
        /// to xls
        /// </summary>
        private void ToXls()
        {
            int _pageSize    = Utils.GetInt(Utils.GetQueryStringValue("recordcount"));
            int _recordCount = 0;
            var searchInfo   = new EyouSoft.Model.PersonalCenterStructure.FuKuanTiXingChaXun();

            searchInfo.ShouKuanDanWei    = Utils.GetQueryStringValue("scname");
            searchInfo.LSDate            = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("lsdate"));
            searchInfo.LEDate            = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("ledate"));
            searchInfo.OperatorDepartIds = Utils.GetIntArray(Utils.GetQueryStringValue("departids"), ",");
            searchInfo.OperatorIds       = Utils.GetIntArray(Utils.GetQueryStringValue("operatorids"), ",");

            var items = new EyouSoft.BLL.PersonalCenterStructure.TranRemind(SiteUserInfo).GetPayRemind(_pageSize, 1, ref _recordCount, CurrentUserCompanyID, searchInfo);

            StringBuilder s = new StringBuilder();

            s.Append("收款单位\t联系人\t电话\t欠款金额\t责任计调\n");

            if (items != null && items.Count > 0)
            {
                foreach (var item in items)
                {
                    s.AppendFormat("{0}\t{1}\t{2}\t{3}\t{4}\n", item.SupplierName, item.ContactName, item.ContactTel, item.PayCash, item.JobName);
                }
            }

            Response.Clear();
            Response.ContentEncoding = System.Text.Encoding.Default;
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".xls");
            Response.ContentType = "application/ms-excel";
            Response.Write(s.ToString());
            Response.End();
        }
Example #2
0
        /// <summary>
        /// to xls
        /// </summary>
        private void ToXls()
        {
            if (!CheckGrant(global::Common.Enum.TravelPermission.个人中心_事务提醒_收款提醒栏目))
            {
                ResponseToXls(string.Empty);
            }


            EyouSoft.Model.PersonalCenterStructure.ReceiptRemindSearchInfo searchInfo = new EyouSoft.Model.PersonalCenterStructure.ReceiptRemindSearchInfo();

            searchInfo.QianKuanDanWei    = Utils.GetQueryStringValue("sn");
            searchInfo.LSDate            = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("lsdate"));
            searchInfo.LEDate            = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("ledate"));
            searchInfo.OperatorDepartIds = Utils.GetIntArray(Utils.GetQueryStringValue("departids"), ",");
            searchInfo.OperatorIds       = Utils.GetIntArray(Utils.GetQueryStringValue("operatorids"), ",");

            EyouSoft.Model.EnumType.CompanyStructure.ReceiptRemindType rrt = new EyouSoft.BLL.CompanyStructure.CompanySetting().GetReceiptRemindType(CurrentUserCompanyID);
            int?sellerId = null;

            if (rrt == EyouSoft.Model.EnumType.CompanyStructure.ReceiptRemindType.OnlySeller)
            {
                sellerId = SiteUserInfo.ID;
            }

            int _pageSize    = Utils.GetInt(Utils.GetQueryStringValue("recordcount"));
            int _recordCount = 0;

            if (_pageSize < 1)
            {
                ResponseToXls(string.Empty);
            }

            var items = new EyouSoft.BLL.PersonalCenterStructure.TranRemind().GetReceiptRemind(_pageSize, 1, ref _recordCount, CurrentUserCompanyID, rrt, sellerId, searchInfo);

            StringBuilder s = new StringBuilder();

            s.Append("客源单位\t联系人\t电话\t待收金额\t责任销售\n");

            if (items != null && items.Count > 0)
            {
                foreach (var item in items)
                {
                    s.AppendFormat("{0}\t", item.CustomerName);
                    s.AppendFormat("{0}\t", item.ContactName);
                    s.AppendFormat("{0}\t", item.ContactTel);
                    s.AppendFormat("{0}\t", item.ArrearCash.ToString("C2"));
                    s.AppendFormat("{0}\n", item.SalerName);
                }
            }

            ResponseToXls(s.ToString());
        }
Example #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Utils.GetQueryStringValue("istoxls") == "1")
            {
                ToXls();
            }

            trBll = new EyouSoft.BLL.PersonalCenterStructure.TranRemind(SiteUserInfo);
            if (!IsPostBack)
            {
                DataInit();
            }
        }
Example #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            setday = CheckGrant(global::Common.Enum.TravelPermission.系统设置_系统配置_系统设置栏目);
            trBll  = new EyouSoft.BLL.PersonalCenterStructure.TranRemind(SiteUserInfo);
            csBll  = new EyouSoft.BLL.CompanyStructure.CompanySetting();
            if (!IsPostBack)
            {
                string type = Utils.GetQueryStringValue("type");
                switch (type)
                {
                case "duedayset":
                    SetDay();
                    break;

                default:
                    DataInit();
                    break;
                }
            }
        }
Example #5
0
 protected void InitBindOrderlist()
 {
     EyouSoft.BLL.PersonalCenterStructure.TranRemind trBll = new EyouSoft.BLL.PersonalCenterStructure.TranRemind(SiteUserInfo);
     remindnum = trBll.GetTotalOrderCountByBuyCompanyId(CurrentUserCompanyID);
 }
Example #6
0
        private void GetAjaxHtml()
        {
            Response.Clear();
            EyouSoft.BLL.PersonalCenterStructure.TranRemind trBll = new EyouSoft.BLL.PersonalCenterStructure.TranRemind(SiteUserInfo);
            EyouSoft.BLL.CompanyStructure.CompanySetting    csBll = new EyouSoft.BLL.CompanyStructure.CompanySetting();
            StringBuilder sb = new StringBuilder();

            if (SiteUserInfo != null)
            {
                if (CheckGrant(global::Common.Enum.TravelPermission.个人中心_事务提醒_收款提醒栏目))
                {
                    EyouSoft.Model.EnumType.CompanyStructure.ReceiptRemindType rrt = csBll.GetReceiptRemindType(CurrentUserCompanyID);
                    int?sellerId = null;
                    if (rrt == EyouSoft.Model.EnumType.CompanyStructure.ReceiptRemindType.OnlySeller)
                    {
                        sellerId = SiteUserInfo.ID;
                    }
                    int awakenum = 0;
                    trBll.GetReceiptRemind(1, 0, ref awakenum, CurrentUserCompanyID, rrt, sellerId, null);

                    if (awakenum > 0)
                    {
                        sb.AppendFormat("<p><a href=\"javascript:window.opener.location.href='http/UserCenter/WorkAwake/AppectAwake.aspx';window.opener.focus();\";  >您有{0}条收款未处理!</a></p>", awakenum);
                    }
                }

                if (CheckGrant(global::Common.Enum.TravelPermission.个人中心_事务提醒_付款提醒栏目))
                {
                    int awakenum = trBll.GetPayRemind(this.CurrentUserCompanyID);
                    if (awakenum > 0)
                    {
                        sb.AppendFormat("<p><a href=\"javascript:window.opener.location.href='http/UserCenter/WorkAwake/PayAwake.aspx';window.opener.focus();\";  >您有{0}条付款未处理!</a></p>", awakenum);
                    }
                }

                if (CheckGrant(global::Common.Enum.TravelPermission.个人中心_事务提醒_出团提醒栏目))
                {
                    int day      = csBll.GetLeaveTourReminderDays(CurrentUserCompanyID);
                    int awakenum = trBll.GetLeaveTourRemind(this.CurrentUserCompanyID, day);
                    if (awakenum > 0)
                    {
                        sb.AppendFormat("<p><a href=\"javascript:window.opener.location.href='http/UserCenter/WorkAwake/OutAwake.aspx';window.opener.focus();\";  >{0}天内有{1}个团出团!</a></p>", day, awakenum);
                    }
                }
                if (CheckGrant(global::Common.Enum.TravelPermission.个人中心_事务提醒_回团提醒栏目))
                {
                    int day      = csBll.GetBackTourReminderDays(this.CurrentUserCompanyID);
                    int awakenum = trBll.GetBackTourRemind(this.CurrentUserCompanyID, day);
                    if (awakenum > 0)
                    {
                        sb.AppendFormat("<p><a href=\"javascript:window.opener.location.href='http/UserCenter/WorkAwake/BackAwake.aspx';window.opener.focus();\";  >{0}天内有{1}个团回团!</a></p>", day, awakenum);
                    }
                }
                if (SiteUserInfo.PermissionList.Contains(5))
                {
                    int day      = csBll.GetContractReminderDays(this.CurrentUserCompanyID);
                    int awakenum = trBll.GetTotalContractRemind(day, CurrentUserCompanyID);
                    if (awakenum > 0)
                    {
                        sb.AppendFormat("<p><a href=\"javascript:window.opener.location.href='http/UserCenter/WorkAwake/DueAwake.aspx';window.opener.focus();\";  >{0}天内有{1}个员工劳动合同到期!</a></p>", day, awakenum);
                    }
                }

                if (SiteUserInfo.PermissionList.Contains((int)global::Common.Enum.TravelPermission.个人中心_事务提醒_订单提醒栏目))
                {
                    var searchInfo  = new EyouSoft.Model.TourStructure.MDingDanTiXingInfo();
                    int recordCount = 0;

                    var items = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo).GetDingDanTiXing(CurrentUserCompanyID, 1, 1, ref recordCount, searchInfo);

                    if (recordCount > 0)
                    {
                        sb.AppendFormat("<p><a href=\"javascript:window.opener.location.href='http/UserCenter/WorkAwake/DingDanTiXing.aspx';window.opener.focus();\";  >您有<b>{0}</b>个未处理订单!</a></p>", recordCount);
                    }
                }
            }
            Utils.SetCookie(CookieKeyManage.LAST_LOGIN_TIME_COOKIE_KEY, DateTime.Now.ToString("yyyy-M-d-H-m-s"));
            Response.Write(sb.ToString());
            Response.End();
        }