예제 #1
0
 protected void GridView5_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "UpdateUserComment")
     {
         string      uid        = e.CommandArgument.ToString();
         GridViewRow row        = ((Control)e.CommandSource).BindingContainer as GridViewRow;
         TextBox     txtComment = (TextBox)row.FindControl("txtComment");
         DataSet     ds         = BusinessFacadeDLT.UpdateUserComment(txtComment.Text, uid);
         if (ds.Tables[0].Rows[0][0].ToString() == "1")
         {
             string titleMessage = "用户备注信息更改成功,更改操作员ID:" + Common.Get_UserID.ToString();
             EventMessage.EventWriteDB(1, titleMessage);
             ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('修改备注成功!');</script>");
         }
     }
     else if (e.CommandName == "UpdateUserRoleComment")
     {
         string      code       = e.CommandArgument.ToString();
         GridViewRow row        = ((Control)e.CommandSource).BindingContainer as GridViewRow;
         TextBox     txtComment = (TextBox)row.FindControl("txtComment");
         HiddenField actor      = (HiddenField)row.FindControl("hfActor");
         DataSet     ds         = BusinessFacadeDLT.UpdateRoleComment(txtComment.Text, actor.Value, code);
         if (ds.Tables[0].Rows[0][0].ToString() == "1")
         {
             string titleMessage = "角色备注信息更改成功,更改操作员ID:" + Common.Get_UserID.ToString();
             EventMessage.EventWriteDB(1, titleMessage);
             ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('修改备注成功!');</script>");
         }
     }
 }
예제 #2
0
        protected void btnAccountProved_Click(object sender, EventArgs e)
        {
            int isDeal = 0;

            if (cbDeal.Checked)
            {
                isDeal = 1;
            }

            BusinessFacadeDLT.AddUserAccountProved(Request["ID"].ToString(), txtAccountProved.Text, isDeal, Common.Get_UserID);
            string titleMessage = "手密修改-证明资料-" + tsUser_UID_Input.Text;

            EventMessage.EventWriteDB(1, titleMessage);

            DisplayInfo();

            if (isDeal == 1)
            {
                txtAccountProved.Text = "";
                cbDeal.Checked        = false;
            }



            Response.Write("<script language='javascript'>alert('账户材料及备注保存成功!');</script>");
        }
예제 #3
0
 /// <summary>
 /// 确认提现
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Button1_Click(object sender, EventArgs e)
 {
     if (Button1.Text == "确认提现")
     {
         string DispTxt = "";
         if (Common.Get_UserID != 0)
         {
             if (U_BankSerialNo_Txt.Text != "")
             {
                 string U_SerialNo_Txt_Value     = U_SerialNo_Txt.Text;
                 string RealPay_Value            = (string)Common.sink(tbRealPay.UniqueID, MethodType.Post, 20, 0, DataType.Str);
                 string U_Fee_Txt_Value          = U_Fee_Txt.Text;
                 string U_BankSerialNo_Txt_Value = (string)Common.sink(U_BankSerialNo_Txt.UniqueID, MethodType.Post, 40, 0, DataType.Str);
                 string U_Comment_Txt_Value      = (string)Common.sink(U_Comment_Txt.UniqueID, MethodType.Post, 50, 0, DataType.Str);
                 string RT = BusinessFacadeDLT.WithdrawSuccess(U_SerialNo_Txt_Value, U_BankSerialNo_Txt_Value, U_Comment_Txt_Value, Common.Get_UserID);
                 if (RT == "1")
                 {
                     string titleMessage = "确认提现操作-流水号:" + U_SerialNo_Txt_Value + ",实际金额:" + RealPay_Value.ToString();
                     EventMessage.EventWriteDB(1, titleMessage);
                     ClientScriptManager cs = Page.ClientScript;
                     cs.RegisterStartupScript(typeof(string), "TabJs", "<script language='javascript'>window.returnVal='确认提现成功!';window.parent.hidePopWin(true);</script>");
                 }
             }
             else
             {
                 DispTxt = "银行流水号不能为空!";
                 Common.MessBox(DispTxt);
             }
         }
     }
     ClosePop();
 }
예제 #4
0
        /// <summary>
        /// 导出文件为txt
        /// </summary>
        /// <param name="isdelete">是否删除数据</param>
        protected void ExportTxt(bool isdelete)
        {
            Page.Response.Clear();
            Page.Response.Buffer  = true;
            Page.Response.Charset = "GB2312";
            Page.Response.AppendHeader("Content-Disposition", string.Format("attachment;filename=sys_EventLog{0}.csv", DateTime.Now.ToShortDateString()));
            Page.Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312"); //设置输出流为简体中文
            Response.ContentType          = "text/plain";                               //设置输出文件类型为txt文件。
            this.EnableViewState          = false;
            System.Globalization.CultureInfo myCItrad      = new System.Globalization.CultureInfo("ZH-CN", true);
            System.IO.StringWriter           oStringWriter = new System.IO.StringWriter(myCItrad);
            System.Text.StringBuilder        sb            = new System.Text.StringBuilder();
            sb.Append("EventID,E_U_LoginName,E_UserID,E_DateTime,E_ApplicationID,E_A_AppName,E_M_Name,E_M_PageCode,E_From,E_Type,E_IP,E_Record");
            sb.Append("\n");
            int       rCount = 0;
            ArrayList lst    = BusinessFacade.sys_EventList(new QueryParam(1, int.MaxValue), out rCount);

            foreach (sys_EventTable var in lst)
            {
                sb.AppendFormat("{0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},\"{11}\"\n", var.EventID,
                                var.E_U_LoginName, var.E_UserID, var.E_DateTime, var.E_ApplicationID,
                                var.E_A_AppName, var.E_M_Name, var.E_M_PageCode, var.E_From,
                                var.E_Type, var.E_IP, var.E_Record
                                );
            }

            Page.Response.Write(sb.ToString());
            if (isdelete)
            {
                ClearData();
            }
            EventMessage.EventWriteDB(2, "导出操作日志!");
            Page.Response.End();
        }
예제 #5
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            string DispTxt = "";

            if (Common.Get_UserID != 0)
            {
                sys_UserTable ut = BusinessFacade.sys_UserDisp(Common.Get_UserID);
                string        Old_U_Password_Value   = (string)Common.sink(Old_U_Password.UniqueID, MethodType.Post, 20, 0, DataType.Str);
                string        New_U_Password_Value   = (string)Common.sink(New_U_Password.UniqueID, MethodType.Post, 20, 0, DataType.Str);
                string        ReNew_U_Password_Value = (string)Common.sink(ReNew_U_Password.UniqueID, MethodType.Post, 20, 0, DataType.Str);
                int           MenuSink_Value         = (int)Common.sink(MenuSink.UniqueID, MethodType.Post, 255, 1, DataType.Int);
                int           PageSize_Value         = (int)Common.sink(PageSize.UniqueID, MethodType.Post, 255, 1, DataType.Int);
                string        TableSink_Value        = (string)Common.sink(TableSink.UniqueID, MethodType.Post, 255, 1, DataType.Str);
                bool          ChangPwdBool           = false;

                if (Old_U_Password_Value != "" && New_U_Password_Value != "" && ReNew_U_Password_Value != "")
                {
                    if (New_U_Password_Value != ReNew_U_Password_Value)
                    {
                        DispTxt = "二次输入的密码不相同,请重新输入!";
                    }
                    else if (Common.md5(Old_U_Password_Value, 32) != ut.U_Password)
                    {
                        DispTxt = "原密码输入错误,请重新输入!";
                    }
                    else
                    {
                        ut.U_Password = Common.md5(New_U_Password_Value, 32);
                        ChangPwdBool  = true;
                    }
                }
                ut.U_ExtendField = MenuSink_Value + "," + PageSize_Value + "," + TableSink_Value;

                if (DispTxt != "")
                {
                    Common.MessBox(DispTxt);
                }
                else
                {
                    string titleMessage = string.Format("({0})个人资料设定成功!", ut.U_LoginName);
                    ut.DB_Option_Action_ = "Update";
                    BusinessFacade.sys_UserInsertUpdate(ut);
                    UserData.MoveUserCache(Common.Get_UserID);
                    if (ChangPwdBool)
                    {
                        titleMessage = "密码修改成功," + titleMessage;
                        FrameWorkLogin.UserOut();
                    }

                    Common.MenuStyle = MenuSink_Value;
                    Common.PageSize  = PageSize_Value;
                    Common.TableSink = TableSink_Value;

                    EventMessage.EventWriteDB(1, titleMessage);
                    ClientScriptManager cs = Page.ClientScript;
                    cs.RegisterStartupScript(typeof(string), "TabJs", "<script language='javascript'>window.returnVal='" + titleMessage + "';window.parent.hidePopWin(true);</script>");
                }
            }
        }
예제 #6
0
 /// <summary>
 /// 清空数据
 /// </summary>
 protected void ClearData()
 {
     if (Common.AllowClearData)
     {
         BusinessFacade.sys_EventClearData();
         EventMessage.EventWriteDB(2, "清空操作日志!");
     }
 }
예제 #7
0
 protected void Button2_Click(object sender, EventArgs e)
 {
     FrameWorkPermission.CheckPermissionVoid(PopedomType.A);
     FrameWorkLogin.UserOut();
     Response.Clear();
     Response.Write("Web应用程序已经重启, 请点击此处<a href=\"" + Page.ResolveClientUrl("~/") + "Manager/Default.aspx\">重新登入</a>.");
     Response.Flush();
     Response.Close();
     EventMessage.EventWriteDB(1, "重启Web应用程序成功!");
     HttpRuntime.UnloadAppDomain();
 }
예제 #8
0
        /// <summary>
        /// 强制完单
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Button2_Click(object sender, EventArgs e)
        {
            try
            {
                if (U_SerialNo_Txt.Text != "")
                {
                    if ((float.Parse(tbPayout.Text.Trim()) > (float.Parse(U_Ensure1_Txt.Text.Trim()) + float.Parse(U_Ensure2_Txt.Text.Trim()))) || float.Parse(tbInCome.Text.Trim()) > float.Parse(U_Bal_Txt.Text.Trim()))
                    {
                        EventMessage.MessageBox(1, "操作失败", "订单:" + U_SerialNo_Txt.Text + "强制完单失败!请设置正确的金额,看清楚括号内的限制提示!", Icon_Type.Error, Common.GetHomeBaseUrl("Default.aspx"));
                        return;
                    }

                    if ((float.Parse(tbPayout.Text.Trim()) < 0 || float.Parse(tbInCome.Text.Trim()) < 0))
                    {
                        EventMessage.MessageBox(1, "操作失败", "订单:" + U_SerialNo_Txt.Text + "强制完单失败!请输入正数金额,看清楚括号内的限制提示!", Icon_Type.Error, Common.GetHomeBaseUrl("Default.aspx"));
                        return;
                    }

                    DataSet ds = BusinessFacadeDLT.OrderForceOver(U_SerialNo_Txt.Text, float.Parse(tbInCome.Text.Trim()), float.Parse(tbPayout.Text.Trim()));
                    if (ds != null)
                    {
                        if (ds.Tables[0].Rows[0][0].ToString() == "1")
                        {
                            string titleMessage = "订单:" + U_SerialNo_Txt.Text + "强制完单成功-" + hfCancelStatus.Value + "!";
                            EventMessage.EventWriteDB(1, titleMessage);
                            Response.Write("<script language='javascript'>alert('强制完单成功!');</script>");
                            BindDataList();
                            TabOptionWebControls1.SelectIndex = 0;
                        }
                        else if (ds.Tables[0].Rows[0][0].ToString() == "-2")
                        {
                            string titleMessage = "订单:" + U_SerialNo_Txt.Text + "强制完单失败-" + hfCancelStatus.Value + "!";
                            EventMessage.EventWriteDB(1, titleMessage);
                            Response.Write("<script language='javascript'>alert('订单不符合完单条件:订单状态已变化,无法修改!');</script>");
                            BindDataList();
                            TabOptionWebControls1.SelectIndex = 0;
                        }
                        else
                        {
                            string titleMessage = "订单:" + U_SerialNo_Txt.Text + "强制完单失败-" + hfCancelStatus.Value + "!";
                            EventMessage.EventWriteDB(1, titleMessage);
                            Response.Write("<script language='javascript'>alert('订单不符合完单条件:订单异常,不能操作!');</script>");
                            BindDataList();
                            TabOptionWebControls1.SelectIndex = 0;
                        }
                    }
                }
            }
            catch {
                Response.Write("<script language='javascript'>alert('保证金或代练费只能为数字!');</script>");
            }
        }
예제 #9
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            int ValueID            = (int)Common.sink("ValueID", MethodType.Get, 255, 1, DataType.Int);
            sys_FieldValueTable ft = new sys_FieldValueTable();

            ft.DB_Option_Action_ = "Delete";
            ft.ValueID           = ValueID;
            BusinessFacade.sys_FieldValueInsertUpdate(ft);
            EventMessage.EventWriteDB(1, string.Format("删除应用字段值({0})成功!", ft.V_Text));
            ClientScriptManager cs = Page.ClientScript;

            cs.RegisterStartupScript(typeof(string), "TabJs", "<script language='javascript'>window.returnVal='删除成功!';window.parent.hidePopWin(true);</script>");
        }
예제 #10
0
 /// <summary>
 /// 撤销提现
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Button2_Click(object sender, EventArgs e)
 {
     if (Common.Get_UserID != 0)
     {
         string U_WalletID_Txt_Value = U_SerialNo_Txt.Text;
         string U_Comment_Txt_Value  = (string)Common.sink(U_Comment_Txt.UniqueID, MethodType.Post, 20, 0, DataType.Str);
         string RT = BusinessFacadeDLT.WithdrawCancel(U_SerialNo_Txt.Text, U_Comment_Txt_Value, Common.Get_UserID);
         if (RT == "1")
         {
             string titleMessage = "撤销提现操作-流水号:" + U_WalletID_Txt_Value;
             EventMessage.EventWriteDB(1, titleMessage);
             ClientScriptManager cs = Page.ClientScript;
             cs.RegisterStartupScript(typeof(string), "TabJs", "<script language='javascript'>window.returnVal='撤销提现成功!';window.parent.hidePopWin(true);</script>");
         }
     }
     ClosePop();
 }
예제 #11
0
 protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "UpdateEvaluateComment")
     {
         string      oid        = e.CommandArgument.ToString();
         GridViewRow row        = ((Control)e.CommandSource).BindingContainer as GridViewRow;
         TextBox     txtComment = (TextBox)row.FindControl("txtComment");
         Label       lblDirect  = (Label)row.FindControl("lblDirect");
         DataSet     ds         = BusinessFacadeDLT.UpdateOrderEvaluate(oid, txtComment.Text, "1", lblDirect.Text);
         if (ds.Tables[0].Rows[0][0].ToString() == "1")
         {
             string titleMessage = "用户备注信息更改成功,更改操作员ID:" + Common.Get_UserID.ToString();
             EventMessage.EventWriteDB(1, titleMessage);
             ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('修改评价成功!');</script>");
         }
     }
 }
예제 #12
0
        protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            int result = 0;

            if (e.CommandName == "Cancel")
            {
                int    ID  = Convert.ToInt32(e.CommandArgument);
                object obj = SqlHelper.ExecuteScalar(ConfigurationManager.AppSettings["MSSql"], "BM_SendMailCancel", ID);
                result = int.Parse(obj.ToString());
                if (result == 1)
                {
                    EventMessage.EventWriteDB(1, "操作站内信撤回");
                    Response.Write("<script language='javascript'>alert('操作成功!');</script>");
                    BindData1();
                }
            }
        }
예제 #13
0
        protected void Button3_Click(object sender, EventArgs e)
        {
            string ItemsList = (string)Common.sink(OrderByListItems.UniqueID, MethodType.Post, 100000, 1, DataType.Str);

            if (ItemsList.Length > 0)
            {
                string[] ItemsLists = ItemsList.Split(',');
                for (int i = 0; i < ItemsLists.Length; i++)
                {
                    BusinessFacade.Update_Table_Fileds("sys_FieldValue", string.Format("V_ShowOrder={0}", i + 1), string.Format("ValueID={0}", ItemsLists[i]));
                }
            }

            EventMessage.EventWriteDB(1, "排序应用字段值成功!");
            ClientScriptManager cs = Page.ClientScript;

            cs.RegisterStartupScript(typeof(string), "TabJs", "<script language='javascript'>window.returnVal='排序成功!';window.parent.hidePopWin(true);</script>");
        }
예제 #14
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            int                 FieldID      = (int)Common.sink("FieldID", MethodType.Get, 255, 1, DataType.Int);
            sys_FieldTable      ft           = BusinessFacade.sys_FieldDisp(FieldID);
            string              V_Text_Value = (string)Common.sink(V_Text_Input.UniqueID, MethodType.Post, 100, 1, DataType.Str);
            string              V_Code_Value = (string)Common.sink(V_Code_Input.UniqueID, MethodType.Post, 100, 0, DataType.Str);
            int                 ValueID      = (int)Common.sink("ValueID", MethodType.Get, 255, 0, DataType.Int);
            sys_FieldValueTable fvt          = BusinessFacade.sys_FieldValueDisp(ValueID);

            fvt.V_Text  = V_Text_Value;
            fvt.V_Code  = V_Code_Value;
            fvt.V_F_Key = ft.F_Key;
            string Messages = "";

            if (CMD == "Edit")
            {
                fvt.DB_Option_Action_ = "Update";
                Messages = string.Format("修改应用字段值(ID:{0})成功!", fvt.ValueID);
            }
            else if (CMD == "New")
            {
                QueryParam qp = new QueryParam();
                qp.Where = string.Format("where V_F_Key = '{0}'", Common.inSQL(ft.F_Key));
                //qp.PageSize = 1;
                int       RecordCount = 0;
                ArrayList lst         = BusinessFacade.sys_FieldValueList(qp, out RecordCount);
                if (RecordCount == 0)
                {
                    fvt.V_ShowOrder = 0;
                }
                else
                {
                    fvt.V_ShowOrder = ((sys_FieldValueTable)lst[RecordCount - 1]).V_ShowOrder + 1;
                }
                fvt.DB_Option_Action_ = "Insert";
                Messages = string.Format("增加应用字段值({0})成功!", fvt.V_Text);
            }

            BusinessFacade.sys_FieldValueInsertUpdate(fvt);
            EventMessage.EventWriteDB(1, Messages);
            ClientScriptManager cs = Page.ClientScript;

            cs.RegisterStartupScript(typeof(string), "TabJs", "<script language='javascript'>window.returnVal=\"" + Messages + "\";window.parent.hidePopWin(true);</script>");
        }
예제 #15
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            tsUserEntity ut = BusinessFacadeDLT.tsUserDisp(int.Parse(Request["ID"].ToString()));
            string       tsUser_Question_Value = (string)Common.sink(tsUser_Question_Input.UniqueID, MethodType.Post, 256, 1, DataType.Str);
            string       tsUser_Answer_Value   = (string)Common.sink(tsUser_Answer_Input.UniqueID, MethodType.Post, 256, 1, DataType.Str);

            ut.Question          = tsUser_Question_Value;
            ut.Answer            = tsUser_Answer_Value;
            ut.DataTable_Action_ = DataTable_Action.Update;
            Int32 rInt = BusinessFacadeDLT.tsUserInsertUpdateDelete(ut);

            if (rInt > 0)
            {
                BusinessFacadeDLT.UserLog(int.Parse(Request["ID"].ToString()), 14, "修改密码保护.老密码保护(问题:" + hdQuestion.Value + " 答案:" + hdAnswer.Value + ")", "");
                string titleMessage = "手密修改-修改密保-" + tsUser_UID_Input.Text;
                EventMessage.EventWriteDB(1, titleMessage);
                Response.Write("<script language='javascript'>alert('密码保护修改成功!');</script>");
            }
        }
예제 #16
0
        protected void Button3_Click(object sender, EventArgs e)
        {
            //解锁
            DataSet ds = BusinessFacadeDLT.LockWithDraw(Request.QueryString["SerialNo"].ToString(), 0, UserData.Get_sys_UserTable(Common.Get_UserID).U_LoginName);

            if (ds.Tables[0].Rows[0][0].ToString() == "1")
            {
                string titleMessage = ds.Tables[0].Rows[0][1].ToString() + ":解锁人:" + UserData.Get_sys_UserTable(Common.Get_UserID).U_LoginName;
                EventMessage.EventWriteDB(1, titleMessage);
                ClientScriptManager cs = Page.ClientScript;
                cs.RegisterStartupScript(typeof(string), "TabJs", "<script language='javascript'>window.returnVal='解锁成功!';window.parent.hidePopWin(true);</script>");
            }
            else
            {
                string titleMessage = ds.Tables[0].Rows[0][1].ToString() + ":解锁人:" + UserData.Get_sys_UserTable(Common.Get_UserID).U_LoginName;
                EventMessage.EventWriteDB(1, titleMessage);
                ClientScriptManager cs = Page.ClientScript;
                cs.RegisterStartupScript(typeof(string), "TabJs", "<script language='javascript'>window.returnVal='解锁失败!';window.parent.hidePopWin(true);</script>");
            }
            ClosePop();
        }
예제 #17
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            string Checkbox_Value = (string)Common.sink("Checkbox", MethodType.Post, 2000, 1, DataType.Str);

            if (Checkbox_Value != "")
            {
                string[] Checkbox_Value_Array = Checkbox_Value.Split(',');
                for (int i = 0; i < Checkbox_Value_Array.Length; i++)
                {
                    BusinessFacadeDLT.DeleteUserTrack(Checkbox_Value_Array[i].ToString());
                }

                string titleMessage = "用户:" + trackAcceptID.ToString() + "-删除跟踪信息!";
                EventMessage.EventWriteDB(1, titleMessage);
                Response.Write("<script language='javascript'>alert('删除成功!');</script>");
                BindDataList4();
            }
            else
            {
                Response.Write("<script language='javascript'>alert('请选择一条记录!');</script>");
            }
        }
예제 #18
0
        /// <summary>
        /// 进行登陆操作
        /// </summary>
        /// <param name="sLoginName">用户名</param>
        /// <param name="sLoginPass">密码</param>
        /// <param name="sCode_op">验证码</param>
        /// <param name="UserKey">用户key</param>
        private void LoginUser(string sLoginName, string sLoginPass, string sCode_op, string UserKey)
        {
            MessageBox MBx = new MessageBox();

            MBx.M_Type     = 2;
            MBx.M_Title    = "登陆出错!";
            MBx.M_IconType = Icon_Type.Error;
            MBx.M_Body     = "验证码无效,请确认您输入的验证码有效!";

            if (DispCode && (Session["CheckCode"] == null || sCode_op != Session["CheckCode"].ToString()))
            {
                MBx.M_WriteToDB = false;
                MBx.M_ButtonList.Add(new sys_NavigationUrl("返回", "login.aspx", "点击按钮重新输入验证码!", UrlType.Href, true));
            }
            else if (!FrameWorkLogin.CheckDisableLoginUser(UserKey))
            {
                MBx.M_Body = string.Format("当前IP:{0}登陆出错次数({1})超过系统允许,已经禁止登陆.请联系管理员!", Common.GetIPAddress(), FrameSystemInfo.GetSystemInfoTable.S_SystemConfigData.C_LoginErrorMaxNum);
                MBx.M_ButtonList.Add(new sys_NavigationUrl("返回", "login.aspx", "点击按钮返回!", UrlType.Href, true));
            }
            else if (new FrameWorkLogin().CheckLogin(sLoginName, sLoginPass, UserKey))
            {
                MBx.M_IconType  = Icon_Type.OK;
                MBx.M_Title     = "登陆成功!";
                MBx.M_Body      = string.Format("欢迎您{0},成功登入。您的IP为:{1}!", sLoginName, Common.GetIPAddress());
                MBx.M_WriteToDB = false;
                MBx.M_ButtonList.Add(new sys_NavigationUrl("确定", "default.aspx", "点击按钮登陆!", UrlType.Href, true));
                FrameWorkLogin.MoveErrorLoginUser(UserKey);
                //写登入日志
                EventMessage.EventWriteDB(2, MBx.M_Body, UserData.Get_sys_UserTable(sLoginName).UserID);
            }
            else
            {
                MBx.M_Body = string.Format("用户名/密码({0}/{1})错误!", sLoginName, sLoginPass);
                MBx.M_ButtonList.Add(new sys_NavigationUrl("返回", "login.aspx", "点击按钮重新输入!", UrlType.Href, true));
            }
            Session["CheckCode"] = Common.RndNum(4);
            EventMessage.MessageBox(MBx);
        }
예제 #19
0
        protected void Button3_Click(object sender, EventArgs e)
        {
            if (tsUser_Pass_Input.Text == "")
            {
                Response.Write("<script language='javascript'>alert('用户密码不能为空!');</script>");
                return;
            }
            tsUserEntity ut = BusinessFacadeDLT.tsUserDisp(int.Parse(Request["ID"].ToString()));
            string       tsUser_Pass_Value = (string)Common.sink(tsUser_Pass_Input.UniqueID, MethodType.Post, 256, 1, DataType.Str);

            //ut.Pass = MD5(tsUser_Pass_Value);
            ut.Pass = Marshal.PtrToStringAnsi(DMD5Str(tsUser_Pass_Value, tsUser_LoginID_Input.Text));
            ut.DataTable_Action_ = DataTable_Action.Update;
            Int32 rInt = BusinessFacadeDLT.tsUserInsertUpdateDelete(ut);

            if (rInt > 0)
            {
                BusinessFacadeDLT.UserLog(int.Parse(Request["ID"].ToString()), 13, "后台修改密码", "");
                string titleMessage = "手密修改-登录密码-" + tsUser_UID_Input.Text;
                EventMessage.EventWriteDB(1, titleMessage);
                Response.Write("<script language='javascript'>alert('密码修改成功!');</script>");
            }
        }
예제 #20
0
        /// <summary>
        /// 增加/修改事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Button1_Click(object sender, EventArgs e)
        {
            string       tsUser_BindMobile_Value = (string)Common.sink(tsUser_BindMobile_Input.UniqueID, MethodType.Post, 128, 0, DataType.Str);
            tsUserEntity ut = BusinessFacadeDLT.tsUserDisp(int.Parse(Request["ID"].ToString()));

            ut.BindMobile = tsUser_BindMobile_Value;
            if (tsUser_BindMobile_Value == "")
            {
                if (ut.LoginMode == 12)
                {
                    ut.LoginMode = 10;
                }
            }
            ut.DataTable_Action_ = DataTable_Action.Update;
            Int32 rInt = BusinessFacadeDLT.tsUserInsertUpdateDelete(ut);

            if (rInt > 0)
            {
                BusinessFacadeDLT.UserLog(int.Parse(Request["ID"].ToString()), 22, "后台置空手机号码,原手机号码:" + hdBindMobile.Value, "");
                string titleMessage = "手密修改-置空手机-" + tsUser_UID_Input.Text;
                EventMessage.EventWriteDB(1, titleMessage);
                Response.Write("<script language='javascript'>alert('手机号码修改成功!');</script>");
            }
        }
예제 #21
0
        /// <summary>
        /// 进行登陆操作
        /// </summary>
        /// <param name="sLoginName">用户名</param>
        /// <param name="sLoginPass">密码</param>
        /// <param name="sCode_op">验证码</param>
        /// <param name="UserKey">用户key</param>
        private void LoginUser(string sLoginName, string sLoginPass, string sCode_op, string UserKey)
        {
            MessageBox MBx = new MessageBox();

            MBx.M_Type     = 2;
            MBx.M_Title    = "登陆出错!";
            MBx.M_IconType = Icon_Type.Error;
            MBx.M_Body     = "验证码无效,请确认您输入的验证码有效!";



            //判断当前MAC是否允许登录
            string flag = ConfigurationManager.AppSettings["LoginValidate"].ToString();

            if (flag == "true")
            {
                //判断是否是超级用户

                if (SuperUser(sLoginName) == "1")
                {
                    if (DispCode && (Session["CheckCode"] == null || sCode_op != Session["CheckCode"].ToString()))
                    {
                        MBx.M_WriteToDB = false;
                        MBx.M_ButtonList.Add(new sys_NavigationUrl("返回", "login.aspx", "点击按钮重新输入验证码!", UrlType.Href, true));
                    }
                    else if (!FrameWorkLogin.CheckDisableLoginUser(UserKey))
                    {
                        MBx.M_Body = string.Format("当前IP:{0}登陆出错次数({1})超过系统允许,已经禁止登陆.请联系管理员!", Common.GetIPAddress(), FrameSystemInfo.GetSystemInfoTable.S_SystemConfigData.C_LoginErrorMaxNum);
                        MBx.M_ButtonList.Add(new sys_NavigationUrl("返回", "login.aspx", "点击按钮返回!", UrlType.Href, true));
                    }
                    else if (new FrameWorkLogin().CheckLogin(sLoginName, sLoginPass, UserKey))
                    {
                        MBx.M_IconType  = Icon_Type.OK;
                        MBx.M_Title     = "登陆成功!";
                        MBx.M_Body      = string.Format("欢迎您{0},成功登入。您的IP为:{1}!", sLoginName, Common.GetIPAddress());
                        MBx.M_WriteToDB = false;
                        MBx.M_ButtonList.Add(new sys_NavigationUrl("确定", "default.aspx", "点击按钮登陆!", UrlType.Href, true));
                        FrameWorkLogin.MoveErrorLoginUser(UserKey);
                        //写登入日志
                        EventMessage.EventWriteDB(2, MBx.M_Body, UserData.Get_sys_UserTable(sLoginName).UserID);
                    }
                    else
                    {
                        MBx.M_Body = string.Format("用户名/密码({0}/{1})错误!", sLoginName, sLoginPass);
                        MBx.M_ButtonList.Add(new sys_NavigationUrl("返回", "login.aspx", "点击按钮重新输入!", UrlType.Href, true));
                    }
                }
                else
                {
                    //获取当前登录人的IP地址
                    string ip = System.Web.HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];

                    QueryParam qp = new QueryParam();
                    qp.Where     = " where 1=1 and L_Status=1 and L_MAC='" + ip.Trim() + "' and getdate()>L_StartDate and getdate()<L_EndDate";
                    qp.PageIndex = 1;
                    qp.PageSize  = 1;
                    int RecordCount = 0;
                    List <sys_LoginAuthorizeEntity> lst = BusinessFacadeDLT.sys_LoginAuthorizeList(qp, out RecordCount);
                    if (RecordCount > 0)
                    {
                        if (DispCode && (Session["CheckCode"] == null || sCode_op != Session["CheckCode"].ToString()))
                        {
                            MBx.M_WriteToDB = false;
                            MBx.M_ButtonList.Add(new sys_NavigationUrl("返回", "login.aspx", "点击按钮重新输入验证码!", UrlType.Href, true));
                        }
                        else if (!FrameWorkLogin.CheckDisableLoginUser(UserKey))
                        {
                            MBx.M_Body = string.Format("当前IP:{0}登陆出错次数({1})超过系统允许,已经禁止登陆.请联系管理员!", Common.GetIPAddress(), FrameSystemInfo.GetSystemInfoTable.S_SystemConfigData.C_LoginErrorMaxNum);
                            MBx.M_ButtonList.Add(new sys_NavigationUrl("返回", "login.aspx", "点击按钮返回!", UrlType.Href, true));
                        }
                        else if (new FrameWorkLogin().CheckLogin(sLoginName, sLoginPass, UserKey))
                        {
                            MBx.M_IconType  = Icon_Type.OK;
                            MBx.M_Title     = "登陆成功!";
                            MBx.M_Body      = string.Format("欢迎您{0},成功登入。您的IP为:{1}!", sLoginName, Common.GetIPAddress());
                            MBx.M_WriteToDB = false;
                            MBx.M_ButtonList.Add(new sys_NavigationUrl("确定", "default.aspx", "点击按钮登陆!", UrlType.Href, true));
                            FrameWorkLogin.MoveErrorLoginUser(UserKey);
                            //写登入日志
                            EventMessage.EventWriteDB(2, MBx.M_Body, UserData.Get_sys_UserTable(sLoginName).UserID);
                        }
                        else
                        {
                            MBx.M_Body = string.Format("用户名/密码({0}/{1})错误!", sLoginName, sLoginPass);
                            MBx.M_ButtonList.Add(new sys_NavigationUrl("返回", "login.aspx", "点击按钮重新输入!", UrlType.Href, true));
                        }
                    }
                    else
                    {
                        MBx.M_WriteToDB = false;
                        MBx.M_Body      = string.Format("对不起{0},您的IP为:{1},此IP无授权或授权过期,请申请授权此IP后重新登录!", sLoginName, Common.GetIPAddress());
                        MBx.M_ButtonList.Add(new sys_NavigationUrl("返回", "login.aspx", "此IP无授权或授权过期,请申请授权此IP后重新登录!", UrlType.Href, true));
                    }
                }
            }
            else
            {
                if (DispCode && (Session["CheckCode"] == null || sCode_op != Session["CheckCode"].ToString()))
                {
                    MBx.M_WriteToDB = false;
                    MBx.M_ButtonList.Add(new sys_NavigationUrl("返回", "login.aspx", "点击按钮重新输入验证码!", UrlType.Href, true));
                }
                else if (!FrameWorkLogin.CheckDisableLoginUser(UserKey))
                {
                    MBx.M_Body = string.Format("当前IP:{0}登陆出错次数({1})超过系统允许,已经禁止登陆.请联系管理员!", Common.GetIPAddress(), FrameSystemInfo.GetSystemInfoTable.S_SystemConfigData.C_LoginErrorMaxNum);
                    MBx.M_ButtonList.Add(new sys_NavigationUrl("返回", "login.aspx", "点击按钮返回!", UrlType.Href, true));
                }
                else if (new FrameWorkLogin().CheckLogin(sLoginName, sLoginPass, UserKey))
                {
                    MBx.M_IconType  = Icon_Type.OK;
                    MBx.M_Title     = "登陆成功!";
                    MBx.M_Body      = string.Format("欢迎您{0},成功登入。您的IP为:{1}!", sLoginName, Common.GetIPAddress());
                    MBx.M_WriteToDB = false;
                    MBx.M_ButtonList.Add(new sys_NavigationUrl("确定", "default.aspx", "点击按钮登陆!", UrlType.Href, true));
                    FrameWorkLogin.MoveErrorLoginUser(UserKey);
                    //写登入日志
                    EventMessage.EventWriteDB(2, MBx.M_Body, UserData.Get_sys_UserTable(sLoginName).UserID);
                }
                else
                {
                    MBx.M_Body = string.Format("用户名/密码({0}/{1})错误!", sLoginName, sLoginPass);
                    MBx.M_ButtonList.Add(new sys_NavigationUrl("返回", "login.aspx", "点击按钮重新输入!", UrlType.Href, true));
                }
            }
            Session["CheckCode"] = Common.RndNum(4);
            EventMessage.MessageBox(MBx);
        }
예제 #22
0
        /// <summary>
        /// 增加/修改事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Button1_Click(object sender, EventArgs e)
        {
            /*
             *  1005	用户权限锁定类别	10	禁止登录
             *  1005	用户权限锁定类别	11	禁止下注
             *  1005	用户权限锁定类别	12	限定次数
             *  1005	用户权限锁定类别	13	限定报名金额
             *  1005	用户权限锁定类别	14	禁止兑换
             *  1005	用户权限锁定类别	15	禁止赠送
             *  1005	用户权限锁定类别	16	禁止获赠
             */
            DateTime curDate = DateTime.Now;
            //禁止登录
            DateTime sDisRemitDate = S_DisRemit_dtDate_Input.Text.Trim() == "" ? curDate : DateTime.Parse(S_DisRemit_dtDate_Input.Text.Trim());
            DateTime eDisRemitDate = E_DisRemit_dtDate_Input.Text.Trim() == "" ? curDate : DateTime.Parse(E_DisRemit_dtDate_Input.Text.Trim());

            BusinessFacadeDLT.SetUserLock(id, 10, sDisRemitDate, eDisRemitDate, tbDisRemitReason.Text.Trim(), 0, "", Convert.ToInt32(ddlDisRemit.SelectedValue));
            //禁止下注
            DateTime sPubDisDate = S_PubDis_dtDate_Input.Text.Trim() == "" ? curDate : DateTime.Parse(S_PubDis_dtDate_Input.Text.Trim());
            DateTime ePubDisDate = E_PubDis_dtDate_Input.Text.Trim() == "" ? curDate : DateTime.Parse(E_PubDis_dtDate_Input.Text.Trim());

            BusinessFacadeDLT.SetUserLock(id, 11, sPubDisDate, ePubDisDate, txtPubDisReason.Text.Trim(), 0, "", Convert.ToInt32(ddlPubDis.SelectedValue));

            QueryParam qp = new QueryParam();

            qp.OrderType = 0;
            qp.Orderfld  = "Sort";
            int RecordCount = 0;

            qp.Where = " Where 1=1";
            List <tsActivityEntity> lst = BusinessFacadeDLT.tsActivityList(qp, out RecordCount);

            foreach (tsActivityEntity var in lst)
            {
                //限定次数
                string   num       = this.Request.Form["ctl00$PageBody$txtNum" + var.ID].ToString();
                string   startDate = this.Request.Form["ctl00$PageBody$S_Num_dtDate_Input" + var.ID].ToString();
                DateTime sDate     = startDate == "" ? curDate : DateTime.Parse(startDate);
                string   endDate   = this.Request.Form["ctl00$PageBody$E_Num_dtDate_Input" + var.ID].ToString();
                DateTime eDate     = endDate == "" ? curDate : DateTime.Parse(endDate);
                string   remark    = this.Request.Form["ctl00$PageBody$NumRemark" + var.ID].ToString();
                BusinessFacadeDLT.SetUserLock(id, 12, sDate, eDate, remark, var.ID, num, 1);

                //限定报名金额
                string   sMoney     = this.Request.Form["ctl00$PageBody$txtsMoney" + var.ID].ToString();
                string   eMoney     = this.Request.Form["ctl00$PageBody$txteMoney" + var.ID].ToString();
                string   startDate1 = this.Request.Form["ctl00$PageBody$S_Money_dtDate_Input" + var.ID].ToString();
                DateTime sDate1     = startDate1 == "" ? curDate : DateTime.Parse(startDate1);
                string   endDate1   = this.Request.Form["ctl00$PageBody$E_Money_dtDate_Input" + var.ID].ToString();
                DateTime eDate1     = endDate1 == "" ? curDate : DateTime.Parse(endDate1);
                string   remark1    = this.Request.Form["ctl00$PageBody$MoneyRemark" + var.ID].ToString();
                BusinessFacadeDLT.SetUserLock(id, 13, sDate1, eDate1, remark1, var.ID, sMoney + "|" + eMoney, 1);
            }


            //禁止兑换
            DateTime sExchangeDate = S_Exchange_dtDate_Input.Text.Trim() == "" ? curDate : DateTime.Parse(S_Exchange_dtDate_Input.Text.Trim());
            DateTime eExchangeDate = E_Exchange_dtDate_Input.Text.Trim() == "" ? curDate : DateTime.Parse(E_Exchange_dtDate_Input.Text.Trim());

            BusinessFacadeDLT.SetUserLock(id, 14, sExchangeDate, eExchangeDate, txtExchange.Text.Trim(), 0, "", Convert.ToInt32(ddlExchange.SelectedValue));

            //禁止赠送
            DateTime sGiveDate = S_Give_dtDate_Input.Text.Trim() == "" ? curDate : DateTime.Parse(S_Give_dtDate_Input.Text.Trim());
            DateTime eGiveDate = E_Give_dtDate_Input.Text.Trim() == "" ? curDate : DateTime.Parse(E_Give_dtDate_Input.Text.Trim());

            BusinessFacadeDLT.SetUserLock(id, 15, sGiveDate, eGiveDate, txtGive.Text.Trim(), 0, "", Convert.ToInt32(ddlGive.SelectedValue));

            //禁止获赠
            DateTime sAcceptDate = S_Accept_dtDate_Input.Text.Trim() == "" ? curDate : DateTime.Parse(S_Accept_dtDate_Input.Text.Trim());
            DateTime eAcceptDate = E_Accept_dtDate_Input.Text.Trim() == "" ? curDate : DateTime.Parse(E_Accept_dtDate_Input.Text.Trim());

            BusinessFacadeDLT.SetUserLock(id, 16, sAcceptDate, eAcceptDate, txtAccept.Text.Trim(), 0, "", Convert.ToInt32(ddlAccept.SelectedValue));

            //保存用户备注
            string  UID          = UserUID(id.ToString());
            DataSet ds           = BusinessFacadeDLT.UpdateUserComment(txtUserComment.Text, UID);
            string  titleMessage = "用户" + UID + "权限信息更改成功,更改操作员ID:" + UserData.Get_sys_UserTable(Common.Get_UserID).U_LoginName;

            EventMessage.EventWriteDB(1, titleMessage);
            Response.Write("<script language='javascript'>alert('保存成功!');window.location.href='../../Activity/User/Default.aspx';</script>");
        }
예제 #23
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                //清除在线用户
                FrameWorkOnline.Instance().ClearOnlineUserTimeOut();
            }

            if (HttpContext.Current.User.Identity.IsAuthenticated)
            {
                Response.Redirect("default.aspx");
            }
            FrameName    = FrameSystemInfo.GetSystemInfoTable.S_Name;
            FrameNameVer = FrameSystemInfo.GetSystemInfoTable.S_Version;

            //Button1.Attributes.Add("Onclick", "javascript:return checkForm(ctl00);");
            string CMD = (string)Common.sink("CMD", MethodType.Get, 255, 0, DataType.Str);

            if (CMD == "OutOnline")
            {
                string U_LoginName = (string)Common.sink("U_LoginName", MethodType.Get, 20, 1, DataType.Str);
                string U_Password  = (string)Common.sink("U_Password", MethodType.Get, 50, 1, DataType.Str);
                string OPCode      = (string)Common.sink("OPCode", MethodType.Get, 4, 4, DataType.Str);

                MessageBox MBx = new MessageBox();
                MBx.M_Type     = 2;
                MBx.M_Title    = "强制下线!";
                MBx.M_IconType = Icon_Type.Error;
                MBx.M_Body     = "强制下线失败.验证码无效,请确认您输入的验证码有效!";


                if (Session["CheckCode"] == null || OPCode.ToLower() != Session["CheckCode"].ToString())
                {
                    MBx.M_ButtonList.Add(new sys_NavigationUrl("返回", "login.aspx", "点击按钮重新输入验证码!", UrlType.Href, true));
                }
                else
                {
                    QueryParam qp = new QueryParam();
                    qp.Where = string.Format(" Where U_StatUs=0 and  U_LoginName='{0}' and U_Password='******'", Common.inSQL(U_LoginName), Common.inSQL(Common.md5(U_Password, 32)));
                    int       iInt = 0;
                    ArrayList lst  = BusinessFacade.sys_UserList(qp, out iInt);
                    if (iInt > 0)
                    {
                        //FrameWorkPermission.UserOnlineList.RemoveUserName(U_LoginName.ToLower());
                        string sessionid = (string)Common.sink("SessionID", MethodType.Get, 24, 0, DataType.Str);
                        FrameWorkOnline.Instance().OnlineRemove(sessionid);
                        MBx.M_IconType = Icon_Type.OK;
                        MBx.M_Body     = string.Format("强制帐号{0}下线成功!", U_LoginName);
                        //写入强制帐号下线日志
                        EventMessage.EventWriteDB(2, MBx.M_Body, ((sys_UserTable)lst[0]).UserID);
                        LoginUser(U_LoginName, U_Password, OPCode, UserKey);
                        //MBx.M_ButtonList.Add(new sys_NavigationUrl("返回", "login.aspx", "", UrlType.Href, true));
                        //设置用户为登陆状态
                    }
                    else
                    {
                        MBx.M_Body = "强制下线失败.用户名/密码无效!";
                        MBx.M_ButtonList.Add(new sys_NavigationUrl("返回", "login.aspx", "", UrlType.Href, true));
                    }
                }
                Session["CheckCode"] = Common.RndNum(4);
                EventMessage.MessageBox(MBx);
            }

            if (!DispCode)
            {
                Logincode_op.Src     = "images/Logon/Logon_7no.gif";
                inputcode_op.Visible = false;
            }
        }