Ejemplo n.º 1
0
 public void GetOnlineCount()
 {
     DbHelperSQL.ExecuteSQL("update ERPUser set ActiveTime=getdate() where UserName='******'");
     string count = DbHelperSQL.GetSHSL("select count(*) from ERPUser where datediff(minute,ActiveTime,getdate())<20");
     int NewMailCount = int.Parse(ZWL.DBUtility.DbHelperSQL.GetSHSLInt("select count(*) from ERPLanEmail where ToUser='******' and EmailState='�'"));
     //������ѵļ��ʱ�䣬�Ƿ�����
     ZWL.BLL.ERPTiXing MyModel = new ZWL.BLL.ERPTiXing();
     MyModel.GetModel(int.Parse(ZWL.Common.PublicMethod.GetSessionValue("UserID")));
     int TXSJ = int.Parse(MyModel.TiXingTime)*1000;
     Response.Write(count + ',' + NewMailCount.ToString() + ',' + TXSJ + ',' + MyModel.IfTiXing);
     Response.End();
 }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.Common.PublicMethod.CheckSession();
            ZWL.BLL.ERPTiXing MyModel = new ZWL.BLL.ERPTiXing();
            MyModel.GetModel(int.Parse(ZWL.Common.PublicMethod.GetSessionValue("UserID")));
            this.DropDownList1.SelectedValue = MyModel.TiXingTime;
            this.DropDownList2.SelectedValue = MyModel.IfTiXing;

            //设定按钮权限
            ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("|011M|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
        }
    }
Ejemplo n.º 3
0
    public void GetOnlineCount()
    {
        DbHelperSQL.ExecuteSQL("update ERPUser set ActiveTime=getdate() where UserName='******'");
        string count        = DbHelperSQL.GetSHSL("select count(*) from ERPUser where datediff(minute,ActiveTime,getdate())<20");
        int    NewMailCount = int.Parse(ZWL.DBUtility.DbHelperSQL.GetSHSLInt("select count(*) from ERPLanEmail where ToUser='******' and EmailState='未读'"));

        //获得提醒的间隔时间,是否提醒
        ZWL.BLL.ERPTiXing MyModel = new ZWL.BLL.ERPTiXing();
        MyModel.GetModel(int.Parse(ZWL.Common.PublicMethod.GetSessionValue("UserID")));
        int TXSJ = int.Parse(MyModel.TiXingTime) * 1000;

        Response.Write(count + ',' + NewMailCount.ToString() + ',' + TXSJ + ',' + MyModel.IfTiXing);
        Response.End();
    }
Ejemplo n.º 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            //检测需要发送信息提醒的项,如日程安排
            CheckRiCheng();

            //检测采购订单中的提醒
            CheckCaiGou();

            //检测联系记录和送样记录中的提醒
            CheckLinkLog();
            CheckSongYang();

            //检测“CRM中的预计订单时间”,到日期则提醒,只提醒一次
            CheckCRMDingDan();

            //检测项目管理模块中的“项目提醒”和“收款提醒”
            CheckXiangMu();
            CheckShouKuan();

            ZWL.Common.PublicMethod.CheckSession();
            //刷新当前用户的激活时间
            DbHelperSQL.ExecuteSQL("update ERPUser set ActiveTime=getdate() where UserName='******'");
            this.HyperLink1.Text = DbHelperSQL.GetSHSL("select count(*) from ERPUser where datediff(minute,ActiveTime,getdate())<10");

            //获得提醒的间隔时间,是否提醒
            ZWL.BLL.ERPTiXing MyModel = new ZWL.BLL.ERPTiXing();
            MyModel.GetModel(int.Parse(ZWL.Common.PublicMethod.GetSessionValue("UserID")));
            TiXingJianGe = MyModel.TiXingTime;

            //是否需要提醒
            string IFTanChu = MyModel.IfTiXing;
            //获取新邮件个数
            int NewMailCount = int.Parse(ZWL.DBUtility.DbHelperSQL.GetSHSLInt("select count(*) from ERPLanEmail where ToUser='******' and EmailState='未读'"));
            this.HyperLink2.Text = NewMailCount.ToString();

            //需要提醒,弹出提醒窗口
            if (IFTanChu.Trim() == "是")
            {
                if (NewMailCount > 0)
                {
                    //TanChuStr = "<script language=\"javascript\">var num=Math.random();var abc=screen.height-250;focusid=setTimeout(\"focus();window.showModelessDialog('SmsShow.aspx?rad=\" + num + \"','','scroll:1;status:0;help:0;resizable:0;dialogLeft:3px;dialogTop:\"+abc+\"px;dialogWidth:350px;dialogHeight:200px')\",0000)</script>";
                }
            }
        }
        catch
        { }
    }
Ejemplo n.º 5
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        ZWL.BLL.ERPTiXing MyModel = new ZWL.BLL.ERPTiXing();
        MyModel.ID         = int.Parse(ZWL.Common.PublicMethod.GetSessionValue("UserID"));
        MyModel.TiXingTime = this.DropDownList1.SelectedItem.Value.ToString();
        MyModel.IfTiXing   = this.DropDownList2.SelectedItem.Value.ToString();
        MyModel.Update();
        ZWL.Common.MessageBox.Show(this, "修改系统提醒参数成功!");

        //写系统日志
        ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
        MyRiZhi.UserName    = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        MyRiZhi.DoSomething = "用户设置系统提醒参数";
        MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        MyRiZhi.Add();
    }
Ejemplo n.º 6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            ZWL.Common.PublicMethod.CheckSession();
            ZWL.BLL.ERPTiXing MyModel = new ZWL.BLL.ERPTiXing();
            MyModel.GetModel(int.Parse(ZWL.Common.PublicMethod.GetSessionValue("UserID")));
            if (MyModel!=null)
            {
                this.DropDownList1.SelectedValue = MyModel.TiXingTime;
                this.DropDownList2.SelectedValue = MyModel.IfTiXing;
            }

            //设定按钮权限
            ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("|011M|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian"));
        }
    }
Ejemplo n.º 7
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        ZWL.BLL.ERPTiXing MyModel = new ZWL.BLL.ERPTiXing();
        MyModel.ID = int.Parse(ZWL.Common.PublicMethod.GetSessionValue("UserID"));
        MyModel.TiXingTime = this.DropDownList1.SelectedItem.Value.ToString();
        MyModel.IfTiXing = this.DropDownList2.SelectedItem.Value.ToString();
        MyModel.Update();
        ZWL.Common.MessageBox.Show(this, "修改系统提醒参数成功!");

        //写系统日志
        ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
        MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        MyRiZhi.DoSomething = "用户设置系统提醒参数";
        MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        MyRiZhi.Add();

        //Server.Transfer("~/Main/MyDesk.aspx?time=1000");
        //Response.Redirect("~/Main/Main.aspx?time=1000");
        ClientScript.RegisterStartupScript(ClientScript.GetType(), "12", "<script>parent.sendRequest();</script>");
           // ClientScript.RegisterStartupScript(ClientScript.GetType(), "12", "<script>parent. window.location.reload();</script>");
    }
Ejemplo n.º 8
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        ZWL.BLL.ERPTiXing MyModel = new ZWL.BLL.ERPTiXing();
        MyModel.ID         = int.Parse(ZWL.Common.PublicMethod.GetSessionValue("UserID"));
        MyModel.TiXingTime = this.DropDownList1.SelectedItem.Value.ToString();
        MyModel.IfTiXing   = this.DropDownList2.SelectedItem.Value.ToString();
        MyModel.Update();
        ZWL.Common.MessageBox.Show(this, "修改系统提醒参数成功!");

        //写系统日志
        ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
        MyRiZhi.UserName    = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        MyRiZhi.DoSomething = "用户设置系统提醒参数";
        MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        MyRiZhi.Add();

        //Server.Transfer("~/Main/MyDesk.aspx?time=1000");
        //Response.Redirect("~/Main/Main.aspx?time=1000");
        ClientScript.RegisterStartupScript(ClientScript.GetType(), "12", "<script>parent.sendRequest();</script>");
        // ClientScript.RegisterStartupScript(ClientScript.GetType(), "12", "<script>parent. window.location.reload();</script>");
    }
Ejemplo n.º 9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            //ͳһģ�鷢������
            SendTXMail("ERPCustomInfo", "YuJiTiXing", "CustomName", "��", "���趨�Ŀͻ���Ϣ����ʱ���ѵ���");
            SendTXMail("ERPLinkMan", "BirthDay", "NameStr", "��", "���Ŀͻ���ϵ�����������ѵ���");
            SendTXMail("ERPHuiYuan", "ChuShengDate", "NameStr", "��", "���Ļ�Ա���������ѵ���");
            SendTXMail("ERPLinkLog", "CusBakE", "LinkTitle", "��", "���趨�Ŀͻ���ϵ��¼����ʱ���ѵ���");
            SendTXMail("ERPSongYang", "CusBakE", "SongYangLiaoHao", "��", "���趨�Ŀͻ�������¼����ʱ���ѵ���");
            SendTXMail("ERPContract", "TiXingDate", "HeTongName", "��", "���趨�����ۺ�ͬ����ʱ���ѵ���");
            SendTXMail("ERPBuyOrder", "TiXingDate", "OrderName", "��", "���趨�IJɹ���������ʱ���ѵ���");
            SendTXMail("ERPSupplyLink", "ShengRi", "LinkManName", "��", "���Ĺ�Ӧ����ϵ�����������ѵ���");
            SendTXMail("ERPProject", "TiXingDate", "ProjectName", "��", "���趨����Ŀ��Ϣ����ʱ���ѵ���");

            //����Ʒ����������
            CheckKuCun();

            //�����Ҫ������Ϣ���ѵ���---�ճ̰���
            CheckRiCheng();
            //�����Ҫ������Ϣ���ѵ���---�����豸
            CheckYiQi();
            //�����Ҫ������Ϣ���ѵ���---���շ���
            CheckBX();

            //�����Ҫ������Ϣ���ѵ���---��ʱ���ʹ߰�����
            CheckChaoShi();

            //CheckRW();

            ZWL.Common.PublicMethod.CheckSession();
            //ˢ�µ�ǰ�û��ļ���ʱ��
            DbHelperSQL.ExecuteSQL("update ERPUser set ActiveTime=getdate() where UserName='******'");
            this.HyperLink1.Text = DbHelperSQL.GetSHSL("select count(*) from ERPUser where datediff(minute,ActiveTime,getdate())<20");

            //������ѵļ��ʱ�䣬�Ƿ�����
            ZWL.BLL.ERPTiXing MyModel = new ZWL.BLL.ERPTiXing();
            MyModel.GetModel(int.Parse(ZWL.Common.PublicMethod.GetSessionValue("UserID")));
            TiXingJianGe = MyModel.TiXingTime;

            //�Ƿ���Ҫ����
            string IFTanChu = MyModel.IfTiXing;
            //��ȡ���ʼ�����
            int NewMailCount = int.Parse(ZWL.DBUtility.DbHelperSQL.GetSHSLInt("select count(*) from ERPLanEmail where ToUser='******' and EmailState='�'"));
            this.HyperLink2.Text = NewMailCount.ToString();

            //��Ҫ���ѣ��������Ѵ���
            if (IFTanChu.Trim() == "��")
            {
                if (NewMailCount > 0)
                {
                    TanChuStr = "<script language=\"javascript\">var num=Math.random();var abc=screen.height-250;focusid=setTimeout(\"focus();window.showModelessDialog('SmsShow.aspx?rad=\" + num + \"','','scroll:1;status:0;help:0;resizable:0;dialogLeft:3px;dialogTop:\"+abc+\"px;dialogWidth:350px;dialogHeight:200px')\",0000)</script>";
                }
            }
        }
        catch
        { }

        if (Request.Params["Online"] != null)
        {
            GetOnlineCount();
        }
    }
Ejemplo n.º 10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            //统一模块发送提醒
            SendTXMail("ERPCustomInfo", "YuJiTiXing", "CustomName", "否", "您设定的客户信息提醒时间已到!");
            SendTXMail("ERPLinkMan", "BirthDay", "NameStr", "是", "您的客户联系人生日日期已到!");
            SendTXMail("ERPHuiYuan", "ChuShengDate", "NameStr", "是", "您的会员生日日期已到!");
            SendTXMail("ERPLinkLog", "CusBakE", "LinkTitle", "否", "您设定的客户联系记录提醒时间已到!");
            SendTXMail("ERPSongYang", "CusBakE", "SongYangLiaoHao", "否", "您设定的客户送样记录提醒时间已到!");
            SendTXMail("ERPContract", "TiXingDate", "HeTongName", "否", "您设定的销售合同提醒时间已到!");
            SendTXMail("ERPBuyOrder", "TiXingDate", "OrderName", "否", "您设定的采购订单提醒时间已到!");
            SendTXMail("ERPSupplyLink", "ShengRi", "LinkManName", "是", "您的供应商联系人生日日期已到!");
            SendTXMail("ERPProject", "TiXingDate", "ProjectName", "否", "您设定的项目信息提醒时间已到!");

            //检测产品库存情况报警
            CheckKuCun();



            //检测需要发送信息提醒的项---日程安排
            CheckRiCheng();
            //检测需要发送信息提醒的项---仪器设备
            CheckYiQi();
            //检测需要发送信息提醒的项---保险费用
            CheckBX();

            //检测需要发送信息提醒的项---超时发送催办提醒
            CheckChaoShi();

            //CheckRW();


            ZWL.Common.PublicMethod.CheckSession();
            //刷新当前用户的激活时间
            DbHelperSQL.ExecuteSQL("update ERPUser set ActiveTime=getdate() where UserName='******'");
            this.HyperLink1.Text = DbHelperSQL.GetSHSL("select count(*) from ERPUser where datediff(minute,ActiveTime,getdate())<20");

            //获得提醒的间隔时间,是否提醒
            ZWL.BLL.ERPTiXing MyModel = new ZWL.BLL.ERPTiXing();
            MyModel.GetModel(int.Parse(ZWL.Common.PublicMethod.GetSessionValue("UserID")));
            TiXingJianGe = MyModel.TiXingTime;

            //是否需要提醒
            string IFTanChu = MyModel.IfTiXing;
            //获取新邮件个数
            int NewMailCount = int.Parse(ZWL.DBUtility.DbHelperSQL.GetSHSLInt("select count(*) from ERPLanEmailSHou where ShouUser='******' and EmailState='未读'"));
            this.HyperLink2.Text = NewMailCount.ToString();

            //需要提醒,弹出提醒窗口
            if (IFTanChu.Trim() == "是")
            {
                if (NewMailCount > 0)
                {
                    TanChuStr = "<script language=\"javascript\">var num=Math.random();var abc=screen.height-250;focusid=setTimeout(\"focus();window.showModelessDialog('SmsShow.aspx?rad=\" + num + \"','','scroll:1;status:0;help:0;resizable:0;dialogLeft:3px;dialogTop:\"+abc+\"px;dialogWidth:350px;dialogHeight:200px')\",0000)</script>";
                }
            }
        }
        catch
        { }

        if (Request.Params["Online"] != null)
        {
            GetOnlineCount();
        }
    }