示例#1
0
    /// <summary>
    /// 确定按钮
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void BtnPermissionNormal_Click(object sender, EventArgs e)
    {
        string          Operatenum = CommonDataBLL.OperateBh;
        string          Operateip  = CommonDataBLL.OperateIP;
        List <ListItem> list       = new List <ListItem>();

        for (int i = 0; i < cb_list.Items.Count; i++)
        {
            ListItem item = new ListItem();
            item.Value    = cb_list.Items[i].Value;
            item.Selected = cb_list.Items[i].Selected;
            list.Add(item);
        }

        if (BlackListBLL.SetLoginSystem(list, Operatenum, Operateip))
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('" + GetTran("001401", "操作成功!") + "')</script>");
            return;
        }
        else
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('" + GetTran("001541", "操作失败!") + "')</script>");
            return;
        }
        getStatus();
    }
示例#2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Cache.SetExpires(DateTime.Now);
        Permissions.CheckManagePermission(EnumCompanyPermission.FinanceXitongjiesuan, false);

        if (!IsPostBack && Request.QueryString["action"] + "" != "ajax")
        {
            string isP = IsExistsPid();

            if (isP != "-1")
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script type='text/javascript'>pgLoad('div2')</script>");
            }
        }

        if (Request.QueryString["action"] + "" == "ajax")
        {
            string err        = "-1";
            string Operatenum = CommonDataBLL.OperateBh;
            string Operateip  = CommonDataBLL.OperateIP;
            BlackListBLL.GetSystemClose(Operateip, Operatenum);
            try
            {
                //如果正在结算,就先停止结算再结算
                string isP = IsExistsPid();
                if (isP != "-1")
                {
                    DBHelper.ExecuteNonQuery("kill " + isP);
                }
                string id = CommonDataBLL.InsJsInfo(Convert.ToInt32(Request.QueryString["qs"]), CommonDataBLL.OperateIP, Session["Company"].ToString());

                SqlParameter[] param = new SqlParameter[]
                {
                    new SqlParameter("@qs", Request.QueryString["qs"]),
                    new SqlParameter("@id", id),
                    new SqlParameter("@err", SqlDbType.Int)
                };

                param[2].Direction = ParameterDirection.Output;

                DBHelper.ExecuteNonQuery("[jsjj_yj]", param, CommandType.StoredProcedure);

                err = param[2].Value.ToString();

                if (err == "0")
                {
                    ReleaseBLL.UPConfigflag(int.Parse(Request.QueryString["qs"]));
                }
            }
            catch
            { }
            finally
            {
                BlackListBLL.GetSystemOpen(Operateip, Operatenum);
            }

            Response.Write(err);
            Response.End();
        }
    }
示例#3
0
    protected void Add_blackList_Click(object sender, EventArgs e)
    {
        //验证用户填写黑名单IP
        if (txtNumber.Text == "")
        {
            //提示用户填写
            ScriptHelper.SetAlert(out msg, GetTran("001237", "必须提供会员编号!"));
            this.txtNumber.Focus();
            return;
        }
        //判断当前编号是否存在
        if (ChangeTeamBLL.CheckNum(this.txtNumber.Text.Trim()))
        {
            ScriptHelper.SetAlert(out msg, GetTran("001238", "提供会员编号在该系统中不存在!"));
            return;
        }
        //判断是否已经存在该黑名单IP 3代表IP类型
        if (BlackListBLL.HasBlackList(txtNumber.Text, 0, 0))
        {
            //提示已经存在,无需填写
            ScriptHelper.SetAlert(out msg, GetTran("001242", "指定的会员编号已经存在,无法增加!"));
            this.txtNumber.Text = "";
            return;
        }
        BlacklistModel blackListModel = new BlacklistModel();

        //ip类型
        blackListModel.UserType  = 0;
        blackListModel.UserID    = txtNumber.Text;
        blackListModel.OperateBH = Session["Company"].ToString();

        blackListModel.OperateIP = HttpContext.Current.Request.UserHostAddress.ToString();
        blackListModel.GroupID   = 0;
        blackListModel.BlackDate = DateTime.Now;
        switch (BlackListBLL.AddBlackList(blackListModel))
        {
        case 1:
            ScriptHelper.SetAlert(out msg, GetTran("000891", "添加成功!"));
            break;

        case -1:
            ScriptHelper.SetAlert(out msg, GetTran("001087", "执行发生错误!"));
            break;

        default:
            ScriptHelper.SetAlert(out msg, GetTran("001089", "数据异常"));
            break;
        }
        this.txtNumber.Text = "";
        PageSet();
        Translations();
    }
示例#4
0
    protected void Add_blackList_Click(object sender, EventArgs e)
    {
        //验证用户填写黑名单店铺
        if (txtStoreID.Text == "")
        {
            //提示用户填写
            ScriptHelper.SetAlert(out msg, GetTran("001393", "必须提供店铺编号!"));
            this.txtStoreID.Focus();
            return;
        }
        //判断当前编号是否存在
        if (BlackListBLL.CheckStoreID(txtStoreID.Text))
        {
            ScriptHelper.SetAlert(out msg, GetTran("001391", "提供店铺编号在该系统中不存在!"));
            return;
        }
        //判断是否已经存在该黑名单IP 3代表IP类型
        if (BlackListBLL.HasBlackList(txtStoreID.Text.Trim(), 4, 0))
        {
            //提示已经存在,无需填写
            ScriptHelper.SetAlert(out msg, GetTran("001390", "指定的店铺编号已经存在,无法增加!"));
            this.txtStoreID.Text = "";
            return;
        }
        BlacklistModel blackListModel = new BlacklistModel();

        //店铺类型类型
        blackListModel.UserType  = 4;
        blackListModel.UserID    = txtStoreID.Text;
        blackListModel.OperateBH = Session["Company"].ToString();

        blackListModel.OperateIP = Request.UserHostAddress.ToString();
        blackListModel.GroupID   = 0;
        blackListModel.BlackDate = DateTime.Now;
        switch (BlackListBLL.AddBlackList(blackListModel))
        {
        case 1:
            ScriptHelper.SetAlert(out msg, GetTran("000891", "添加成功!"));
            break;

        case -1:
            ScriptHelper.SetAlert(out msg, GetTran("001087", "执行发生错误!"));
            break;

        default:
            ScriptHelper.SetAlert(out msg, GetTran("001089", "数据异常"));
            break;
        }
        this.txtStoreID.Text = "";
        PageSet();
        Translations();
    }
    /// <summary>
    /// 加入黑名单
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Add_blackList_Click(object sender, EventArgs e)
    {
        string storeId = txtStoreID.Text.Trim();

        //验证用户填写黑名单店铺管辖
        if (storeId == "")
        {
            //提示用户填写
            ScriptHelper.SetAlert(out msg, GetTran("001417", "必须提供管辖店铺编号!"));
            this.txtStoreID.Focus();
            return;
        }
        //验证黑名单店铺管辖合法性
        if (BlackListBLL.CheckStoreID(storeId))
        {
            //提示无效
            ScriptHelper.SetAlert(out msg, GetTran("001415", "必须提供有效的管辖店铺编号!"));
            this.txtStoreID.Text = "";
            this.txtStoreID.Focus();
            return;
        }
        //判断是否已经存在该黑名单店铺管辖 3代表店铺管辖类型
        if (BlackGroupBLL.HasBlackGroup(storeId, 4))
        {
            //提示已经存在,无需填写
            ScriptHelper.SetAlert(out msg, GetTran("001412", "指定的管辖店铺已经存在,无法增加!"));
            this.txtStoreID.Text = "";
            return;
        }
        BlackGroupModel blackGroup = new BlackGroupModel();

        //店铺管辖类型
        blackGroup.IntGroupType  = 4;
        blackGroup.IntGroupValue = storeId;
        string operateIP  = Request.UserHostAddress.ToString();
        string operateNum = Session["Company"].ToString();

        switch (BlackGroupBLL.AddBlackGroup(blackGroup, operateIP, operateNum))
        {
        case 1:
            ScriptHelper.SetAlert(out msg, GetTran("000891", "添加成功!"));
            break;

        default:
            ScriptHelper.SetAlert(out msg, GetTran("001087", "执行发生错误"));
            break;
        }
        this.txtStoreID.Text = "";
        PageSet();
        Translations();
    }
示例#6
0
    //读取当前系统状态
    private void getStatus()
    {
        Translations();
        List <ListItem> list = BlackListBLL.GetLoginSystem();

        foreach (ListItem item in list)
        {
            switch (item.Text)
            {
            case "H": cb_list.Items[0].Selected = item.Selected; break;

            case "D": cb_list.Items[1].Selected = item.Selected; break;

            case "G": cb_list.Items[2].Selected = item.Selected; break;

            case "B": cb_list.Items[3].Selected = item.Selected; break;
            }
        }
    }
示例#7
0
    /// <summary>
    /// 删除当前系统IP黑名单
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btAddToBlackList_Click(object sender, EventArgs e)
    {
        int m = 0;
        int n = 0;

        foreach (GridViewRow row in gvBlackIP.Rows)
        {
            if (row.RowType == DataControlRowType.DataRow)
            {
                CheckBox chk = (CheckBox)row.FindControl("chkSelectRow");
                if (chk.Checked)
                {
                    HiddenField hid = (HiddenField)row.FindControl("hidID");
                    if (BlackListBLL.DelBlackList(int.Parse(hid.Value), 0) < 0)
                    {
                        n++;
                    }
                    m++;
                }
            }
        }

        if (m == 0)
        {
            ScriptHelper.SetAlert(out msg, GetTran("001249", "请用户选择要删除的会员黑名单."));
        }
        else if (n == 0)
        {
            ScriptHelper.SetAlert(out msg, GetTran("001251", "删除指定会员黑名单成功."));
            PageSet();
        }
        else
        {
            ScriptHelper.SetAlert(out msg, GetTran("001253", "删除部分会员黑名单成功."));
            PageSet();
        }
        Translations();
    }
示例#8
0
 public T_HR_BLACKLIST GetBlackListByID(string blackListID)
 {
     using (BlackListBLL bll = new BlackListBLL())
     {
         return bll.GetBlackListByID(blackListID);
     }
 }
示例#9
0
 public bool BlackListDelete(string[] blackLists)
 {
     using (BlackListBLL bll = new BlackListBLL())
     {
         int rslt = bll.BlackListDelete(blackLists);
         return (rslt > 0);
     }
 }
示例#10
0
 public void BlackListUpdate(T_HR_BLACKLIST entity, ref string strMsg)
 {
     using (BlackListBLL bll = new BlackListBLL())
     {
         bll.BlackListUpdate(entity, ref strMsg);
     }
 }
示例#11
0
 public bool CheckBlackListByName(string name)
 {
     using (BlackListBLL bll = new BlackListBLL())
     {
         return bll.CheckBlackListByName(name);
     }
 }
示例#12
0
 public string BlackListAdd(T_HR_BLACKLIST entity)
 {
     using (BlackListBLL bll = new BlackListBLL())
     {
         return bll.BlackListAdd(entity);
     }
 }
示例#13
0
 public List<T_HR_BLACKLIST> GetBlackListPaging(int pageIndex, int pageSize, string sort, string filterString, string[] paras, ref int pageCount, string userID)
 {
     using (BlackListBLL bll = new BlackListBLL())
     {
         IQueryable<T_HR_BLACKLIST> q = bll.GetBlackListPaging(pageIndex, pageSize, sort, filterString, paras, ref  pageCount, userID);
         return q.Count() > 0 ? q.ToList() : null;
     }
 }
示例#14
0
    /// <summary>
    /// 加入黑名单
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Add_blackList_Click(object sender, EventArgs e)
    {
        //验证用户填写黑名单IP
        if (IPBianhao.Text == "")
        {
            //提示用户填写
            ScriptHelper.SetAlert(out msg, GetTran("001075", "必须提供IP地址!"));
            this.IPBianhao.Focus();
            return;
        }
        //验证黑名单IP合法性
        if (!IsValidIP(IPBianhao.Text))
        {
            //提示无效
            ScriptHelper.SetAlert(out msg, GetTran("001078", "必须提供有效的IP地址!"));
            this.IPBianhao.Text = "";
            this.IPBianhao.Focus();
            return;
        }
        //判断是否已经存在该黑名单IP 3代表IP类型
        string ip = IPBianhao.Text.Replace(" ", "");

        string[] ips = ip.Split('.');
        ip = "";
        foreach (string _ip in ips)
        {
            if (ip.Trim() != "*")
            {
                try
                {
                    ip += int.Parse(_ip) + ".";
                }
                catch (FormatException)
                {
                    ScriptHelper.SetAlert(out msg, GetTran("001078", "必须提供有效的IP地址!"));
                    return;
                }
            }
            else
            {
                ip += _ip + ".";
            }
        }
        ip = ip.Substring(0, ip.Length - 1);
        if (BlackListBLL.HasBlackList(ip, 3, 0))
        {
            //提示已经存在,无需填写
            ScriptHelper.SetAlert(out msg, GetTran("001083", "指定的IP已经存在,无法增加!"));
            this.IPBianhao.Text = "";
            return;
        }
        BlacklistModel blackListModel = new BlacklistModel();

        //ip类型
        blackListModel.UserType  = 3;
        blackListModel.UserID    = ip;
        blackListModel.OperateBH = Session["Company"].ToString();

        blackListModel.OperateIP = HttpContext.Current.Request.UserHostAddress.ToString();
        blackListModel.GroupID   = 0;
        blackListModel.BlackDate = DateTime.Now;
        switch (BlackListBLL.AddBlackList(blackListModel))
        {
        case 1:
            ScriptHelper.SetAlert(out msg, GetTran("000891", "添加成功!"));
            break;

        case -1:
            ScriptHelper.SetAlert(out msg, GetTran("001087", "执行发生错误!"));
            break;

        default:
            ScriptHelper.SetAlert(out msg, GetTran("001089", "数据异常"));
            break;
        }
        this.IPBianhao.Text = "";
        PageSet();
    }
示例#15
0
        public string IsChaoShi(string str)
        {
            string type = "0";

            if (Convert.ToDateTime(Session["ReFurbish_Timeout"]) < DateTime.Now)
            {
                type = "1";
                return(type);
            }

            if (Session["Company"] == null && Session["Store"] == null && Session["Member"] == null && Session["Branch"] == null)
            {
                type = "1";
                return(type);
            }
            string manageID = "";

            if (Application["jinzhi"] != null)
            {
                if (Session["Branch"] != null && (!BlackListBLL.GetSystem("B")))
                {
                    type = "2";
                    return(type); //登陆设置 分公司登陆 退出
                }

                if (Session["Member"] != null && (!BlackListBLL.GetSystem("H")))
                {
                    type = "2";
                    return(type);  //登陆设置 会员登陆 退出
                }
                if (Session["Membermobile"] != null && (!BlackListBLL.GetSystem("H")))
                {
                    type = "3";
                    return(type);
                }

                if (Session["Store"] != null && (!BlackListBLL.GetSystem("D")))
                {
                    type = "2";
                    return(type);  //登陆设置 店铺登陆 退出
                }

                manageID = BLL.CommonClass.CommonDataBLL.getManageID(1);

                if (Session["Company"] != null && Session["Company"].ToString() != manageID && (!BlackListBLL.GetSystem("G")))
                {
                    type = "2";
                    return(type);  //登陆设置 管理员退出  除了''
                }

                if (Session["Company"] != null && Session["permission"] != null && Application["jinzhi"].ToString().IndexOf("J") >= 0) // 'J'是结算时的状态
                {
                    Hashtable table = (Hashtable)HttpContext.Current.Session["permission"];
                    if (!table.Contains(EnumCompanyPermission.FinanceJiesuan))
                    {
                        type = "1";
                        return(type);  //结算时 没有结算权限的管理员退出
                    }
                }
            }

            ////会员被注销时,自动退出系统
            //if (Session["Member"] != null)
            //{
            //    if (DAL.CommonDataDAL.GetIsActive(Session["Member"].ToString()))
            //    {
            //        type = "1";
            //        return type;
            //    }
            //}

            string bianhao  = "";
            int    UserType = -1;

            int loginType = 0;

            if (Session["Member"] != null)
            {
                bianhao   = Session["Member"].ToString();
                loginType = 3;
                UserType  = 0;
            }
            else if (Session["Store"] != null)
            {
                bianhao   = Session["Store"].ToString();
                loginType = 2;
                UserType  = 4;
            }
            else if (Session["Company"] != null)
            {
                bianhao   = Session["Company"].ToString();
                loginType = 1;
                UserType  = 2;
            }
            else if (Session["Branch"] != null)
            {
                bianhao  = Session["Branch"].ToString();
                UserType = 3;
            }


            manageID = BLL.CommonClass.CommonDataBLL.getManageID(loginType);

            // 黑名单处理 开始

            string[] SecPostion = Request.ServerVariables["REMOTE_ADDR"].ToString().Split('.');//客户IP地址

            //string ipAddress = SecPostion[0] + "." + SecPostion[1];
            string ipAddress = Request.ServerVariables["REMOTE_ADDR"].ToString();//客户IP地址

            try
            {
                if (bianhao != manageID && 0 < BlackListBLL.GetLikeIPCount(ipAddress))
                {
                    type = "2";
                    return(type);
                }
            }
            catch
            {
                return("");
            }
            //限制区域登陆
            try
            {
                if (bianhao != manageID && BlackListBLL.GetLikeAddress(bianhao))
                {
                    type = "2";
                    return(type);
                }
            }
            catch
            {
                return("");
            }

            if (bianhao == "" || UserType == -1)
            {
                return("");
            }
            try
            {
                if (0 < BlackListBLL.GetLikeIPCount(UserType, bianhao))
                {
                    type = "2";
                    return(type);
                }
            }
            catch
            {
                return("");
            }
            // 黑名单处理 结束
            if (BLL.CommonClass.Login.isDenyLogin())
            //限时登陆
            {
                type = "2";
                return(type);
            }

            return("");
        }
示例#16
0
    //private void BindLanguage()
    //{
    //    SqlDataReader reader =DAL.DBHelper.ExecuteReader("SELECT ID,name,languageCode,languageRemark FROM language ORDER BY NAME DESC");
    //    string languageId = "";
    //    string languageName = "";
    //    this.ddlLanguage.Items.Clear();
    //    while (reader.Read())
    //    {
    //        languageId = reader["id"].ToString();
    //        languageName = reader["NAME"].ToString();
    //        this.ddlLanguage.Items.Add(new ListItem(languageName, languageId));
    //    }
    //    reader.Close();
    //    string LanguageID = Session["LanguageID"].ToString().Trim().ToLower();
    //    foreach (ListItem li in this.ddlLanguage.Items)
    //    {
    //        if (li.Value.ToLower() == LanguageID)
    //        {
    //            li.Selected = true;
    //        }
    //    }
    //    ddlLanguage_SelectedIndexChanged(null, null);

    //}
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        //if (Application["jinzhi"] != null && this.txtName.Text.Trim() != DAL.DBHelper.ExecuteScalar("select top 1 number from manage where defaultmanager = 1").ToString() && Application["jinzhi"].ToString().IndexOf("G") != -1)
        //{
        //    //Response.Write("<div align=center style='font-size=12px;' >" + System.Configuration.ConfigurationSettings.AppSettings["jsError"].ToString());
        //    //Response.End();
        //    ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('" + GetTran("003151", "当前系统禁止登陆") + "')</script>");
        //    return;
        //}
        string manageId = BLL.CommonClass.CommonDataBLL.getManageID(1);

        if (!BlackListBLL.GetSystem("G") && this.txtName.Text.Trim() != manageId)
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('" + GetTran("003151", "当前系统禁止登陆") + "')</script>");
            return;
        }
        //检验
        if (this.txtName.Text.Trim() == "")
        {
            msg = "<script language='javascript'>alert('" + GetTran("005596", "请输入用户名!") + "');</script>";
            return;
        }
        if (this.txtPwd.Text.Trim() == "")
        {
            msg = "<script language='javascript'>alert('" + GetTran("001854", "请输入密码!") + "');</script>";
            return;
        }
        if (this.txtName.Text.Length < 2 || this.txtName.Text.Length > 10)
        {
            msg = "<script language='javascript'>alert('" + GetTran("005598", "用户名必须在3-10位之间!") + "');</script>";
            return;
        }
        if (this.txtPwd.Text.Length < 4 || this.txtPwd.Text.Length > 10)
        {
            msg = "<script language='javascript'>alert(' " + GetTran("005600", "密码必须在6-10位之间!") + "');</script>";
            return;
        }
        if (this.txtValidate.Text.Trim() == "")
        {
            msg = "<script language='javascript'>alert('" + GetTran("005602", "请输入验证码!") + "');</script>";
            return;
        }

        if (Session["ValidateCode"] != null)
        {
            if (Session["ValidateCode"].ToString() == "")
            {
                msg = "<script language='javascript'>top.location.href='index.aspx';</script>";
                return;
            }
        }
        else
        {
            msg = "<script language='javascript'>top.location.href='index.aspx';</script>";
            return;
        }

        if (this.txtValidate.Text.Trim().ToLower() != Session["ValidateCode"].ToString().Trim().ToLower())
        {
            msg = "<script language='javascript'>alert('" + GetTran("005604", "验证码不正确!") + "');</script>";
            return;
        }

        if (BLL.other.Company.BlackListBLL.CheckBlacklistLogin(this.txtName.Text.Trim(), 2, Request.UserHostAddress) && this.txtName.Text.Trim() != manageId)
        {
            msg = "<script>alert('" + GetTran("005606", "对不起,您的登陆权限失效,请与公司联系!") + "');</script>";
            return;
        }

        //if (BlackListBLL.GetLikeAddress(this.txtName.Text.Trim()) && this.txtName.Text.Trim() != manageId)
        //{
        //    msg = "<script>alert('" + GetTran("005606", "对不起,您的登陆权限失效,请与公司联系!") + "');</script>";
        //    return;
        //}

        string ipAddress = Request.ServerVariables["REMOTE_ADDR"].ToString();//客户IP地址

        try
        {
            if (this.txtName.Text.Trim() != manageId && 0 < BlackListBLL.GetLikeIPCount(ipAddress))
            {
                msg = "<script>alert('" + GetTran("005606", "对不起,您的登陆权限失效,请与公司联系!") + "');</script>";
                return;
            }
        }
        catch
        {
            return;
        }
        if (IndexBLL.CheckLogin("Company", txtName.Text.ToLower(), Encryption.Encryption.GetEncryptionPwd(txtPwd.Text, txtName.Text)))
        {
            Session.Remove("Company");
            Session.Remove("Store");
            Session.Remove("Member");
            Session.Remove("Branch");

            if (Session["Default_Currency"] != null)
            {
                Session.Remove("Default_Currency");
            }

            //购物车的session
            Session.Remove("proList");
            Session["page"]          = "first.aspx";
            Session["UserType"]      = "1";
            Session["LoginUserType"] = "manage";
            Session["Company"]       = this.txtName.Text.Trim();
            Session["TopManageID"]   = this.txtName.Text.Trim();
            Session["WTH"]           = BLL.other.Company.WordlTimeBLL.ConvertAddHours();
            //  Session["language"] = "chinese";
            HttpContext.Current.Session["LanguegeSelect"] = "Chinese";

            Session["permission"] = BLL.other.Company.DeptRoleBLL.GetAllPermission(Session["Company"].ToString());
            HttpContext.Current.Session["OperateBh"] = txtName.Text;

            if (Session["DHNumbers"] != null)
            {
                Session["DHNumbers"] = "";
                Session.Remove("DHNumbers");
            }
            int a = IndexBLL.insertLoginLog(this.txtName.Text, Encryption.Encryption.GetEncryptionPwd(txtPwd.Text, txtName.Text), "Company", DateTime.Now.ToUniversalTime(), CommonDataBLL.OperateIP, 1);

            Session["UserLastLoginDate"] = Convert.ToDateTime(IndexBLL.UplostLogin(this.txtName.Text, "1")).AddHours(BLL.other.Company.WordlTimeBLL.ConvertAddHours());

            Session.Timeout = 30;

            Response.Redirect("../Cmain.htm");
        }
        else
        {
            int a = IndexBLL.insertLoginLog(this.txtName.Text, this.txtPwd.Text, "Company", DateTime.Now.ToUniversalTime(), CommonDataBLL.OperateIP, 2);


            msg = "<script language='javascript'>alert('" + GetTran("005607", "用户名或密码不正确!") + "');</script>";
            return;
        }
    }
示例#17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Cache.SetExpires(DateTime.Now);
        Permissions.CheckManagePermission(EnumCompanyPermission.FinanceXitongjiesuan, false);
        string Operatenum = CommonDataBLL.OperateBh;
        string Operateip  = CommonDataBLL.OperateIP;
        int    qishu      = 0;

        if (Request.QueryString["qs"] != null)
        {
            qishu = Convert.ToInt32(Request.QueryString["qs"]);
        }
        if (qishu == BLL.CommonClass.CommonDataBLL.GetMaxqishu())
        {
            BlackListBLL.GetSystemClose(Operateip, Operatenum);
        }
        RunExe myRun = new RunExe();

        //if ( myRun.IsRun(  CommonDataBLL.JiesuanProgramFilename  ) )
        if (Request.QueryString["id"] != null)
        {
            ViewState["id"] = Request.QueryString["id"].ToString();
        }
        string jstype = CommonDataBLL.GetJstypeID(ViewState["id"].ToString());

        if (jstype == "0")
        {
            Response.Write("<body bgcolor=#616378><div id='mydiv'>");
            Response.Write("_");
            Response.Write("</div></body>");
            Response.Write("<script>mydiv.innerText = '';</script>");
            Response.Write("<script language=javascript>;");
            Response.Write("var dots = 0;var dotmax = 10;function ShowWait()");
            Response.Write("{var output; output = '" + GetTran("001234", "程序正在运行") + "';dots++;if(dots>=dotmax)dots=1;");
            Response.Write("for(var x = 0;x < dots;x++){output += '·';}mydiv.innerText =  output;}");
            Response.Write("function StartShowWait(){mydiv.style.visibility = 'visible'; ");
            Response.Write("window.setInterval('ShowWait()',1000);}");
//				Response.Write("function HideWait(){mydiv.style.visibility = 'hidden';");
//				Response.Write("window.clearInterval();}");
            Response.Write("StartShowWait();</script>");
            Response.Write("<script>window.setTimeout('location=location',5000)</script>");
            Response.Flush();
            Thread.Sleep(10000);
        }
        else
        {
            string cuowu = "";
            //是否有错误单子
            //int err = ReleaseBLL.IsErrorOrder(Convert.ToInt32(Session["nowqishu"].ToString()));
            Application["jinzhi"] = "F";
            bool re = ReleaseBLL.CheckSetsys();
            if (!re)
            {
                bool res = ReleaseBLL.UpdateSystemID();
                if (res)
                {
                    bool r = ReleaseBLL.DelSetsys();
                }
            }
            //if ( err>0 )
            //{
            //    cuowu = GetTran("001235", "但是本期中有错误单子。");
            //}
            if (jstype == "1")
            {
                cuowu = "正常结束。";
            }
            else if (jstype == "2")
            {
                cuowu = "错误报单结束。";
            }
            else if (jstype == "3")
            {
                cuowu = "异常结束。";
            }
            else
            {
                cuowu = "未启动。";
            }

            //if (cuowu == "")
            if (jstype == "1")
            {
                ReleaseBLL.UPConfigflag(int.Parse(Request.QueryString["qs"]));
            }
            ReleaseBLL.UPConfigNum(int.Parse(Request.QueryString["qs"]));
            Response.Write("<script language='javascript'> alert('" + GetTran("001236", "程序运行完毕!") + cuowu + "');window.close()</script>");
        }
        if (qishu == BLL.CommonClass.CommonDataBLL.GetMaxqishu())
        {
            BlackListBLL.GetSystemOpen(Operateip, Operatenum);
        }
    }