示例#1
0
        protected void btn_Click1(object sender, EventArgs e)
        {
            //根据用户名和密码验证管理员身份,并取得管理员信息
            string AdminName = "";
            string loginName = badmin.GetAdminLogin().AdminName;

            if (!string.IsNullOrEmpty(loginName))
            {
                AdminName = loginName;
            }
            string      AdminPass = this.TxtPassword.Text.Trim();
            M_AdminInfo info      = B_Admin.AuthenticateAdmin(AdminName, AdminPass);

            //如果管理员Model是空对象则表明登录失败
            if (info == null)
            {
                tips.InnerHtml = "密码错误!";
            }
            else
            {
                if (info.IsLock)
                {
                    tips.InnerHtml = "你的帐户被锁定,请与超级管理员联系";
                }
                function.Script(this, " setCookie('0');parent.document.getElementById('infoDiv').style.display='none';parent.document.getElementById('tranDiv').style.display='none'; ");
            }
        }
示例#2
0
文件: B_Admin.cs 项目: baixue001/IPS
 /// <summary>
 /// 如非超管,则跳转
 /// </summary>
 public static void IsSuperManage(M_AdminInfo model)
 {
     if (model == null || model.AdminId < 1 || !model.IsSuperAdmin())
     {
         throw new Exception("非超级管理员,无权访问该页面");
     }
 }
        protected void Save_Btn_Click(object sender, EventArgs e)
        {
            M_AdminInfo adminMod = B_Admin.GetLogin();

            if (Mid > 0)
            {
                regularMod = regularBll.SelReturnModel(Mid);
            }
            regularMod.Min = DataConvert.CDouble(Min_T.Text);
            if (regularMod.Min <= 0)
            {
                function.WriteErrMsg("充值金额不能为0");
            }
            regularMod.Purse       = DataConvert.CDouble(Purse_T.Text);
            regularMod.Sicon       = DataConvert.CDouble(SIcon_T.Text);
            regularMod.Point       = DataConvert.CDouble(Point_T.Text);
            regularMod.UserRemind  = UserRemind_T.Text.Trim();
            regularMod.AdminRemind = AdminRemind_T.Text.Trim();
            regularMod.AdminID     = regularMod.AdminID;
            if (Mid > 0)
            {
                regularMod.EditDate = DateTime.Now; regularBll.UpdateByID(regularMod);
            }
            else
            {
                if (regularBll.IsExist(regularMod.Min))
                {
                    function.WriteErrMsg("充值金额[" + regularMod.Min.ToString("f2") + "]的规则已存在,不可重复添加");
                }
                regularBll.Insert(regularMod);
            }
            function.WriteSuccessMsg("保存成功", "RegularList.aspx");
        }
        private M_Exam_Sys_Questions FillMod()
        {
            M_Exam_Sys_Questions questMod = null;
            M_AdminInfo          adminMod = B_Admin.GetLogin();

            if (Mid > 0)
            {
                questMod = questBll.GetSelect(Mid);
            }
            else
            {
                questMod = new M_Exam_Sys_Questions();
                //questMod.UserID = mu.UserID;
                //questMod.p_Inputer = mu.UserName;
            }
            questMod.p_title = txtP_title.Text;
            //questMod.p_Difficulty = DataConverter.CLng(rblDiff.SelectedValue);
            questMod.p_Difficulty = DataConverter.CDouble(Diffcult_T.Text);
            questMod.p_Class      = DataConverter.CLng(NodeID_Hid.Value);
            //questMod.p_Shipin = QuestType_Hid.Value;
            questMod.p_Views     = DataConverter.CLng(Grade_Radio.SelectedValue);
            questMod.p_Knowledge = DataConverter.CLng(Request.Form["knowname"]);
            string tagkey = Request.Form["Tabinput"];

            if (string.IsNullOrEmpty(tagkey))
            {
                questMod.Tagkey = "";
            }
            else
            {
                int firstid = nodeBll.SelFirstNodeID(questMod.p_Class);
                questMod.Tagkey = knowBll.AddKnows(firstid, tagkey);
            }
            if (string.IsNullOrEmpty(AnswerHtml_T.Text))
            {
                AnswerHtml_T.Text = Answer_T.Text;
            }
            questMod.p_Type    = DataConverter.CLng(Request.Form["qtype_rad"]);
            questMod.p_shuming = AnswerHtml_T.Text;
            if (questMod.p_Type == 10)
            {
                questMod.p_Content = Qids_Hid.Value; questMod.LargeContent = txtP_Content.Text;
            }
            else
            {
                questMod.p_Content = txtP_Content.Text;
            }
            questMod.Qinfo      = Qinfo_Hid.Value;
            questMod.p_ChoseNum = DataConverter.CLng(ddlNumber1.SelectedValue);
            questMod.IsBig      = 0;
            questMod.p_Inputer  = adminMod.AdminName;
            //后台试题强制分享
            questMod.IsShare         = 1;// IsShare_Chk.Checked ? 1 : 0;
            questMod.p_defaultScores = DataConverter.CFloat(txtDefaSocre.Text);
            questMod.p_Answer        = Answer_T.Text.Trim();
            //questMod.p_Optioninfo = Optioninfo_Hid.Value;
            questMod.Jiexi   = txtJiexi.Value;
            questMod.Version = DataConverter.CLng(Version_Rad.SelectedValue);
            return(questMod);
        }
示例#5
0
文件: login.aspx.cs 项目: zwt-zf/cms
        protected void IbtnEnter_Click(object sender, ImageClickEventArgs e)
        {
            string vCode = this.Session["ValidateCode"].ToString();

            if (string.IsNullOrEmpty(vCode))
            {
                function.WriteErrMsg("<li>验证码无效,请刷新验证码重新登录</li>", "../Login.aspx");
            }
            if (string.Compare(this.TxtValidateCode.Text.Trim(), vCode, true) != 0)
            {
                function.WriteErrMsg("<li>验证码不正确</li>", "../Login.aspx");
            }
            if (SiteConfig.SiteOption.EnableSiteManageCode && (this.TxtAdminValidateCode.Text.Trim() != SiteConfig.SiteOption.SiteManageCode))
            {
                function.WriteErrMsg("<li>管理验证码不正确</li>", "../Login.aspx");
            }
            //根据用户名和密码验证管理员身份,并取得管理员信息
            string      AdminName = this.TxtUserName.Text.Trim();
            string      AdminPass = this.TxtPassword.Text.Trim();
            M_AdminInfo info      = B_Admin.AuthenticateAdmin(AdminName, AdminPass);

            //如果管理员Model是空对象则表明登录失败
            if (info.IsNull)
            {
                function.WriteErrMsg("<li>用户名或密码错误!</li>", "../login.aspx");
            }
            else
            {
                if (info.IsLock)
                {
                    function.WriteErrMsg("<li>你的帐户被锁定,请与超级管理员联系</li>", "../Login.aspx");
                }
                B_Admin.SetLoginState(info);
            }
        }
示例#6
0
        /// <summary>
        /// 查询指定管理员是否拥有节点的某类操作权限
        /// look|modify|addto|comments|columns|state
        /// </summary>
        /// <returns>true:有权限</returns>
        public static bool CheckNodeAuth(M_AdminInfo adminMod, int nid, string auth)
        {
            if (adminMod.IsSuperAdmin())
            {
                return(true);
            }
            if (nid < 1 || string.IsNullOrEmpty(auth))
            {
                return(false);
            }
            string roles = StrHelper.PureIDSForDB(adminMod.RoleList);

            if (string.IsNullOrEmpty(roles))
            {
                return(false);
            }
            //检测权限是否在许可范围之内
            string[] allowAuth = "look|modify|addto|comments|columns|state".Split("|".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
            auth = allowAuth.FirstOrDefault(p => p.Equals(auth));
            if (string.IsNullOrEmpty(auth))
            {
                return(false);
            }
            //------------
            string where = "Nid=" + nid + " AND RID IN (" + roles + ") ";
            where       += " AND " + auth + "=1";
            return(DBCenter.SelTop(1, "RN_ID", "*", "ZL_NodeRole", where, "").Rows.Count > 0);
        }
示例#7
0
        /// <summary>
        /// 重写管理员信息
        /// </summary>
        public static bool Add(M_AdminInfo madmin)
        {
            string strHostIP = HttpContext.Current.Request.UserHostAddress;

            madmin.AdminPassword        = StringHelper.MD5(madmin.AdminPassword);
            madmin.RoleList             = "1";
            madmin.UserName             = madmin.AdminName;
            madmin.LastLoginIP          = strHostIP;
            madmin.EnableModifyPassword = true;
            madmin.EnableMultiLogin     = true;
            madmin.RandNumber           = "123456";
            madmin.RandNumber           = "123456";
            madmin.AdminType            = 1;
            madmin.PubRole      = 1;
            madmin.DefaultStart = 99;
            if (B_Admin.IsExist(madmin.AdminName))
            {
                madmin.ManageNode = "";
                madmin.AdminId    = B_Admin.GetAdminByAdminName(madmin.AdminName).AdminId;
                return(B_Admin.Update(madmin));
            }
            else
            {
                madmin.Theme                  = "";
                madmin.LastLoginTime          = DateTime.Now;
                madmin.LastLogoutTime         = DateTime.Now;
                madmin.LastModifyPasswordTime = DateTime.Now;
                madmin.ManageNode             = "";
                madmin.AdminTrueName          = madmin.AdminName;
                return(B_Admin.Add(madmin));
            }
        }
示例#8
0
 public static void Insert(M_UserExpHis model)
 {
     if (model.UserID == 0)
     {
         M_UserInfo mu = new B_User().GetLogin();
         if (mu != null)
         {
             model.UserID = mu.UserID;
         }
     }
     if (model.Operator == 0)
     {
         M_AdminInfo adminMod = B_Admin.GetLogin();
         if (adminMod != null)
         {
             model.Operator = adminMod.AdminId;
         }
     }
     if (string.IsNullOrEmpty(model.OperatorIP))
     {
         model.OperatorIP = IPScaner.GetUserIP();
     }
     if (string.IsNullOrEmpty(model.Remark) && HttpContext.Current != null)
     {
         model.Remark = HttpContext.Current.Request.RawUrl;
     }
     if (model.HisTime <= DateTime.MinValue)
     {
         model.HisTime = DateTime.Now;
     }
     model.TbName = GetTbName((SType)model.ScoreType);
     DBCenter.Insert(model);
 }
        public void AddAdmin()
        {
            if (B_Admin.IsExist(UserName_T.Text.Trim()))
            {
                function.WriteErrMsg("该账号已存在!");
            }
            if (buser.IsExist("ume", UserEmail_T.Text))
            {
                function.WriteErrMsg("该Email已存在");
            }
            M_AdminInfo admin = new M_AdminInfo();

            admin.UserName               = UserName_T.Text.Trim();
            admin.AdminName              = UserName_T.Text.Trim();
            admin.AdminTrueName          = UserName_T.Text.Trim();
            admin.AdminPassword          = function.GetRandomString(8);
            admin.EnableModifyPassword   = true;
            admin.LastLoginTime          = DateTime.Now;
            admin.LastLogoutTime         = DateTime.Now;
            admin.LastModifyPasswordTime = DateTime.Now;
            admin.CDate    = DateTime.Now;
            admin.IsLock   = true;
            admin.RoleList = ",2,4,6,7,8,";
            B_Admin.Add(admin);
            AddUser(admin.AdminPassword);
            Tip_Div.Visible  = true;
            Form_Div.Visible = false;
        }
        public void MyBind()
        {
            M_AdminInfo info = B_Admin.GetAdminByID(badmin.GetAdminLogin().AdminId);//info中有role信息
            DataTable   dt   = new DataTable();

            //switch (UserType)
            //{
            //    case 1:
            //        dt = bll.SelByType(0, "");
            //        break;
            //    case 2:
            //        dt = bll.SelByType(1, "");
            //        break;
            //    default:
            //        dt = bll.SelByType(-1, "");
            //        dt.DefaultView.Sort = "Flow desc";
            //        break;
            //}
            dt = bll.Sel();
            if (!crmBll.IsHasAuth(authDT, "AllCustomer", info))//如果ID不是自己的ID或ID为空则跳转到自己的ID上
            {
                dt.DefaultView.RowFilter = "FPManID =" + info.AdminId;
                dt = dt.DefaultView.ToTable();
                dt.DefaultView.RowFilter = "";
            }
            RPT.DataSource = dt;
            RPT.DataBind();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (function.isAjax())
            {
                string flag = "";
                Response.Write(flag);
                Response.End();
            }
            if (Request.QueryString["menu"] != null && Request.QueryString["menu"] == "delete")
            {
                string code = Request.QueryString["code"];
                bll.GetDeleteByCode(code);//以code为标准删除多表数据
            }
            divImp.Visible = DataConvert.CLng(Request.QueryString["import"]) == 1;
            if (!IsPostBack)
            {
                //---------权限限制(Excel导入权与可查看所有用户权)分页中限制显示哪些
                M_AdminInfo info = B_Admin.GetAdminByID(badmin.GetAdminLogin().AdminId);//info中有role信息
                authDT = crmBll.GetAuthTable(info.RoleList.Split(','));

                if (!crmBll.IsHasAuth(authDT, "AllowExcel", info))//如果ID不是自己的ID或ID为空则跳转到自己的ID上
                {
                    ExcelData.Enabled = false;
                    fileImp.Enabled   = false;
                }
                MyBind();
                ViewState["adminList"] = badmin.Sel();
                Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='AffairManage.aspx'>" + UC_BI() + "</a></li><li>  <a href='CustomerList.aspx?usertype=0'>" + lang.LF("客户管理") + "</a></span>&nbsp;&nbsp;<a href='CustomerManage.aspx?FieldName=Person_Add&modelid=" + ModelID + "'>[" + lang.LF("添加客户") + "]</a> <a href='CustomerList.aspx?import=1'>[导入客户]</a></li>" + Call.GetHelp(47));
            }
        }
示例#12
0
文件: B_Admin.cs 项目: baixue001/IPS
        public static M_AdminInfo AuthenticateAdmin(string AdminName, string Password)
        {
            if (string.IsNullOrEmpty(AdminName) || string.IsNullOrEmpty(Password))
            {
                return(null);
            }
            M_AdminInfo adminMod = null;

            SqlParameter[] sp = new SqlParameter[] { new SqlParameter("AdminName", AdminName), new SqlParameter("AdminPassword", StringHelper.MD5(Password)) };
            using (DbDataReader reader = DBCenter.SelReturnReader(tbName, "AdminName=@AdminName AND AdminPassword=@AdminPassword", sp))
            {
                if (reader.Read())
                {
                    adminMod = new M_AdminInfo().GetModelFromReader(reader);
                }
                else
                {
                    return(null);
                }
            }
            //adminMod.LastLoginIP = IPScaner.GetUserIP();
            adminMod.LastLoginTime = DateTime.Now;
            adminMod.LoginTimes++;
            Update(adminMod);
            return(adminMod);
        }
示例#13
0
        public ActionResult Default()
        {
            B_Admin badmin = new B_Admin();

            if (badmin.CheckLogin() && !buser.CheckLogin())
            {
                M_AdminInfo adminMod = B_Admin.GetLogin();
                M_UserInfo  mu       = new M_UserInfo();
                if (adminMod.AddUserID > 0)
                {
                    mu = buser.SelReturnModel(adminMod.AddUserID);
                }
                if (mu.UserID < 1)
                {
                    mu = buser.AuthenticateUser(adminMod.AdminName, adminMod.AdminPassword, true);
                }
                if (mu.UserID > 0)
                {
                    buser.SetLoginState(mu);
                }
            }
            B_User.CheckIsLogged(Request.RawUrl);
            ViewBag.url     = "www.z01.com";
            ViewBag.showmsg = !DomainCheck();
            ViewBag.authsp  = SafeSC.ReadFileStr("/APP/Other/auth.html");
            int APKMode = DataConverter.CLng(Request["APKMode"]);

            ViewBag.apkmode = APKMode;
            return(View());
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            M_School sinfo = new M_School();

            sinfo.SchoolName = txtSchoolName.Text.Trim();
            sinfo.SchoolType = DataConverter.CLng(txtSchoolType.Text);
            // sinfo.Country = txtCountry.SelectedValue.Trim();
            sinfo.Addtime  = DateTime.Now;
            sinfo.Province = Request.Form["province_dp"];
            sinfo.City     = Request.Form["city_dp"];
            sinfo.County   = Request.Form["county_dp"];
            sinfo.Visage   = DataConverter.CLng(txtVisage.SelectedValue);
            M_AdminInfo admininfo = badmin.GetAdminLogin();
            string      saveurl   = SiteConfig.SiteOption.UploadDir + "Exam/" + admininfo.AdminName + admininfo.AdminId + "/";

            sinfo.Country    = SchoolIcon_T.Text;
            sinfo.SchoolInfo = txtSchoolInfo.Text.Trim();
            if (SchID > 0)
            {
                sinfo.ID = SchID;
                sll.GetUpdate(sinfo);
            }
            int schid = sll.GetInsert(sinfo);

            function.WriteSuccessMsg("操作成功!", "SchoolShow.aspx?id=" + schid);
        }
示例#15
0
文件: SD_Admin.cs 项目: zwt-zf/cms
 /// <summary>
 /// 将管理员信息的各属性值传递到参数中
 /// </summary>
 /// <param name="administratorInfo"></param>
 /// <returns></returns>
 private static SqlParameter[] GetParameters(M_AdminInfo adminInfo)
 {
     SqlParameter[] parameter = new SqlParameter[14];
     parameter[0]        = new SqlParameter("@AdminId", SqlDbType.Int, 4);
     parameter[0].Value  = adminInfo.AdminId;
     parameter[1]        = new SqlParameter("@AdminName", SqlDbType.NVarChar, 50);
     parameter[1].Value  = adminInfo.AdminName;
     parameter[2]        = new SqlParameter("@AdminPassword", SqlDbType.NVarChar, 100);
     parameter[2].Value  = adminInfo.AdminPassword;
     parameter[3]        = new SqlParameter("@UserName", SqlDbType.NVarChar, 50);
     parameter[3].Value  = adminInfo.UserName;
     parameter[4]        = new SqlParameter("@EnableMultiLogin", SqlDbType.Bit, 1);
     parameter[4].Value  = adminInfo.EnableMultiLogin;
     parameter[5]        = new SqlParameter("@LoginTimes", SqlDbType.Int, 4);
     parameter[5].Value  = adminInfo.LoginTimes;
     parameter[6]        = new SqlParameter("@LastLoginIp", SqlDbType.NVarChar, 50);
     parameter[6].Value  = adminInfo.LastLoginIP;
     parameter[7]        = new SqlParameter("@LastLoginTime", SqlDbType.DateTime);
     parameter[7].Value  = adminInfo.LastLoginTime;
     parameter[8]        = new SqlParameter("@LastLogoutTime", SqlDbType.DateTime);
     parameter[8].Value  = adminInfo.LastLogoutTime;
     parameter[9]        = new SqlParameter("@LastModifyPasswordTime", SqlDbType.DateTime);
     parameter[9].Value  = adminInfo.LastModifyPasswordTime;
     parameter[10]       = new SqlParameter("@IsLock", SqlDbType.Bit, 1);
     parameter[10].Value = adminInfo.IsLock;
     parameter[11]       = new SqlParameter("@EnableModifyPassword", SqlDbType.Bit, 1);
     parameter[11].Value = adminInfo.EnableModifyPassword;
     parameter[12]       = new SqlParameter("@RoleList", SqlDbType.NText);
     parameter[12].Value = adminInfo.RoleList;
     parameter[13]       = new SqlParameter("@Theme", SqlDbType.NVarChar, 50);
     parameter[13].Value = adminInfo.Theme;
     return(parameter);
 }
示例#16
0
文件: SD_Admin.cs 项目: zwt-zf/cms
        /// <summary>
        /// 增加新的管理员到数据库中
        /// </summary>
        /// <param name="administratorInfo">管理员数据模型</param>
        /// <returns>增加结果状态 成功为true 反之 false</returns>
        public bool Add(M_AdminInfo adminInfo)
        {
            string strSql = "PR_Manage_Add";

            SqlParameter[] parameter = new SqlParameter[10];
            parameter[0]       = new SqlParameter("@AdminName", SqlDbType.NVarChar, 20);
            parameter[0].Value = adminInfo.AdminName;
            parameter[1]       = new SqlParameter("@AdminPassword", SqlDbType.NVarChar, 255);
            parameter[1].Value = adminInfo.AdminPassword;
            parameter[2]       = new SqlParameter("@UserName", SqlDbType.NVarChar, 20);
            parameter[2].Value = adminInfo.UserName;
            parameter[3]       = new SqlParameter("@EnableMultiLogin", SqlDbType.Bit, 1);
            parameter[3].Value = adminInfo.EnableMultiLogin;
            parameter[4]       = new SqlParameter("@LastLoginIp", SqlDbType.NVarChar, 50);
            parameter[4].Value = adminInfo.LastLoginIP;
            parameter[5]       = new SqlParameter("@IsLock", SqlDbType.Bit, 1);
            parameter[5].Value = adminInfo.IsLock;
            parameter[6]       = new SqlParameter("@EnableModifyPassword", SqlDbType.Bit, 1);
            parameter[6].Value = adminInfo.EnableModifyPassword;
            parameter[7]       = new SqlParameter("@AdminRole", SqlDbType.NVarChar, 255);
            parameter[7].Value = adminInfo.RoleList;
            parameter[8]       = new SqlParameter("@Theme", SqlDbType.NVarChar, 50);
            parameter[8].Value = adminInfo.Theme;
            parameter[9]       = new SqlParameter("@RndPassword", SqlDbType.NVarChar, 10);
            parameter[9].Value = adminInfo.RandNumber;
            return(SqlHelper.ExecuteProc(strSql, parameter));
        }
示例#17
0
文件: SD_Admin.cs 项目: zwt-zf/cms
        /// <summary>
        /// 将管理员信息更新到数据库中
        /// </summary>
        /// <param name="administratorInfo">M_AdminInfo 管理员信息</param>
        /// <returns></returns>
        public bool Update(M_AdminInfo administratorInfo)
        {
            string strSql = "PR_Manage_Update";

            SqlParameter[] cmdParams = GetParameters(administratorInfo);
            return(SqlHelper.ExecuteProc(strSql, cmdParams));
        }
示例#18
0
        private void MyBind()
        {
            M_AdminInfo adminMod = B_Admin.GetLogin();

            Grade_Radio.DataSource = B_GradeOption.GetGradeList(6, 0);
            Grade_Radio.DataBind();
            if (Grade_Radio.Items.Count > 0)
            {
                Grade_Radio.SelectedIndex = 0;
            }
            NodeTree.DataSource = nodeBll.Select_All();
            NodeTree.MyBind();
            if (Mid > 0)
            {
                verMod                    = verBll.SelReturnModel(Mid);
                VName_T.Text              = verMod.VersionName;
                Inputer_T.Text            = verMod.Inputer;
                VTime_T.Text              = verMod.VersionTime;
                Grade_Radio.SelectedValue = verMod.Grade.ToString();
                Node_Hid.Value            = verMod.NodeID.ToString();
                Volume_T.Text             = verMod.Volume;
                SectionName_T.Text        = verMod.SectionName;
                CourseName_T.Text         = verMod.CourseName;
                Price_T.Text              = verMod.Price.ToString("f2");
                if (!string.IsNullOrEmpty(verMod.Knows))
                {
                    TagKey_T.Value = knowBll.GetNamesByIDS(verMod.Knows);
                }
            }
            else
            {
                Inputer_T.Text = adminMod.AdminName;
            }
        }
示例#19
0
    //用于后台确认支付
    public static void FinalStep(M_OrderList mod)
    {
        if (mod.id < 1)
        {
            throw new Exception("未指定订单ID");
        }
        if (mod.Ordertype < 1)
        {
            throw new Exception("未指定订单类型");
        }
        if (string.IsNullOrEmpty(mod.OrderNo))
        {
            throw new Exception("未指定订单号");
        }
        M_AdminInfo adminMod = B_Admin.GetLogin();
        B_Payment   payBll   = new B_Payment();
        M_Payment   pinfo    = new M_Payment();

        pinfo.PaymentNum   = mod.OrderNo;
        pinfo.UserID       = mod.Userid;
        pinfo.PayNo        = payBll.CreatePayNo();
        pinfo.MoneyPay     = (decimal)mod.Ordersamount;
        pinfo.MoneyTrue    = pinfo.MoneyPay;//看是否需要支持手输
        pinfo.Status       = (int)M_Payment.PayStatus.HasPayed;
        pinfo.CStatus      = true;
        pinfo.Remark       = "管理员确认支付,ID:" + adminMod.AdminId + ",登录名:" + adminMod.AdminName + ",真实姓名:" + adminMod.AdminTrueName;
        pinfo.PaymentID    = payBll.Add(pinfo);
        pinfo.SuccessTime  = DateTime.Now;
        pinfo.PayPlatID    = (int)M_PayPlat.Plat.CashOnDelivery;//默认为线下支付
        pinfo.PlatformInfo = "";
        M_Order_PayLog paylogMod = new M_Order_PayLog();

        FinalStep(pinfo, mod, paylogMod);
    }
示例#20
0
 public M_Cache(M_AdminInfo adminMod)
 {
     AddTime        = DateTime.Now;
     LastUpdateTime = DateTime.Now;
     UserID         = adminMod.AdminId;
     model          = adminMod;
 }
示例#21
0
        protected void EBtnSubmit_Click(object sender, EventArgs e)
        {
            M_AdminInfo adminMod = B_Admin.GetLogin();
            M_MailTemp  tlpMod   = new M_MailTemp();

            if (Mid > 0)
            {
                tlpMod = bll.SelReturnModel(Mid);
            }
            tlpMod.TempName = TxtTempName.Text;
            tlpMod.Type     = Convert.ToInt32(drType.SelectedValue);
            tlpMod.Content  = TxtContent.Value;
            tlpMod.AddUser  = adminMod.AdminName;
            if (string.IsNullOrEmpty(tlpMod.Pic))
            {
                tlpMod.Pic = "";
            }
            if (!tlpMod.Pic.Equals(SFileUp.FVPath))
            {
                tlpMod.Pic = SFileUp.SaveFile();
            }
            if (Mid > 0)
            {
                bll.UpdateByID(tlpMod);
            }
            else
            {
                bll.insert(tlpMod);
            }
            function.WriteSuccessMsg("操作成功", "MailTemplist.aspx");
        }
示例#22
0
        public static bool IsSuperManage(int adminId)
        {
            M_AdminInfo info = dal.GetAdminByID(adminId);

            string[] AdminRole = info.RoleList.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
            return(IsInRole("0", AdminRole));
        }
示例#23
0
        protected void Save_Btn_Click(object sender, EventArgs e)
        {
            if (Mid > 0)
            {
                desMod = desBll.SelReturnModel(Mid);
            }
            else
            {
                desMod = new M_Logo_Design();
            }
            desMod.Alias       = Alias_T.Text;
            desMod.LogoContent = StrHelper.CompressString(Save_Hid.Value);
            ImgHelper imghelp = new ImgHelper();

            System.Drawing.Bitmap bmp = imghelp.Base64ToImg(Base64_Hid.Value);
            //用于减小尺寸
            desMod.PreviewImg = "data:image/png;base64," + imghelp.ImgToBase64ByImage(bmp);

            if (desMod.ID > 0)
            {
                desMod.ZType = 1; desBll.UpdateByID(desMod);
            }
            else
            {
                M_AdminInfo adminMod = B_Admin.GetLogin();
                desMod.ZType   = 1;
                desMod.ZStatus = 99;
                desMod.AdminID = adminMod.AdminId;
                desMod.ID      = desBll.Insert(desMod);
            }
            SnsHelper.UpdateModel(desMod.ID
                                  , new string[] { "BackGround" }
                                  , new string[] { BKUrl_T.Text.Trim() });
            function.WriteSuccessMsg("操作成功", "DesTlpList.aspx");
        }
示例#24
0
        protected void EBtnSubmit_Click(object sender, EventArgs e)
        {
            M_AdminInfo admininfo = badmin.GetAdminLogin();
            M_Spec      info      = new M_Spec();

            if (Mid > 0)
            {
                info = bll.SelReturnModel(Mid);
            }
            info.SpecName        = TxtSpecName.Text;
            info.SpecDir         = TxtSpecDir.Text;
            info.SpecPicUrl      = Image_T.Text;
            info.SpecDesc        = TxtSpecDesc.Text;
            info.OpenNew         = DataConverter.CBool(RBLOpenType.SelectedValue);
            info.ListFileExt     = DataConverter.CLng(RBLFileExt.SelectedValue);
            info.ListFileRule    = DataConverter.CLng(RBLListFileRule.SelectedValue);
            info.ListTemplate    = TxtListTemplate_hid.Value;
            info.SpecKeyword     = TxtSpeacKeyword.Text;
            info.SpecTips        = TxtSpeacTips.Text;
            info.SpecDescriptive = TxtSpeacDescriptive.Text;
            info.CDate           = DataConverter.CDate(CDate_T.Text);
            info.CUser           = CUser_T.Text;
            info.EditDate        = DateTime.Now;
            if (Mid < 1)
            {
                info.Pid     = Pid;
                info.OrderID = bll.GetNextOrderID(info.Pid);
                bll.insert(info);
            }
            else
            {
                bll.UpdateByID(info);
            }
            function.WriteSuccessMsg("操作成功", "SpecialManage.aspx");
        }
示例#25
0
        //传入ID才可修改最新的词条
        public IActionResult BKEditor()
        {
            switch (Mode)
            {
            case "admin":
                //if (!B_Admin.CheckIsLogged(Request.RawUrl)) { return null; }
                M_AdminInfo adminMod = B_Admin.GetLogin(HttpContext);
                if (adminMod == null)
                {
                    return(WriteOK("无权访问"));
                }
                break;

            case "user":
            default:    //是否限定创建权限,用户所在组是否拥有创建权限
                //B_User.CheckIsLogged(Request.RawUrl);
                if (!bkBll.AuthCheck(GuestConfig.GuestOption.BKOption.CreateBKGroup, mu.GroupID))
                {
                    return(WriteErr("你没有创建或编辑词条的权限"));
                }
                break;
            }
            M_Baike bkMod = GetModel_Editor(ref err);

            if (!string.IsNullOrEmpty(err))
            {
                return(WriteErr(err)); return(null);
            }
            if (bkMod == null)
            {
                bkMod = new M_Baike();
            }
            return(View(bkMod));
        }
示例#26
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         M_AdminInfo adminMod = B_Admin.GetLogin();
         ScenceFunc(adminMod.Theme);
         nameL.InnerHtml = "<span style='cursor:pointer;'>" + adminMod.AdminName + "</span>";
         AsyncInvokeFunc preFunc = InvokeFunc;
         preFunc.BeginInvoke(this, null, null);
         //---Logo后期改为拼接
         if (!string.IsNullOrEmpty(SiteConfig.SiteInfo.LogoAdmin))
         {
             zlogo3.Visible        = true;
             zlogo4.Visible        = true;
             newbody_logo2.Visible = true;
             zlogo3.InnerHtml      = ComRE.Img_NoPic(SiteConfig.SiteInfo.LogoAdmin, "");
             zlogo4.InnerHtml      = SiteConfig.SiteInfo.LogoPlatName;
         }
         else
         {
             zlogo1.Visible        = true;
             zlogo2.Visible        = true;
             newbody_logo1.Visible = true;
         }
         if (Call.AppSettValue("ShowedAD").ToLower().Equals("false"))
         {
             function.Script(this, "ShowStartScreen();");
         }
         if (Application["Page_Init"] == null)
         {
             Application["Page_Init"] = true; function.Script(this, "PrePageInit()");
         }
     }
 }
示例#27
0
        public void Client_Add(M_CRMS_Client model)
        {
            if (!B_ARoleAuth.AuthCheckEx(ZLEnum.Auth.office, "crm"))
            {
                return;
            }

            M_AdminInfo adminMod = B_Admin.GetLogin();

            model.ClientType = StrHelper.IdsFormat(Request.Form["ClientType"]);
            model.ID         = Mid;
            M_ModelInfo modMod  = modBll.SelReturnModel(48);
            DataTable   fieldDT = fieldBll.SelByModelID(modMod.ModelID, false);
            DataTable   table   = new Call().GetDTFromMVC(fieldDT, Request);

            model.ModelID    = modMod.ModelID;
            model.ModelTable = modMod.TableName;
            model.CAdminID   = adminMod.AdminId;
            model.LinkIds    = Request.Form["LinkIds"];
            if (model.ID < 1)
            {
                model.ID = clientBll.Insert(model, table);
            }
            else
            {
                M_CRMS_Client clientMod = clientBll.SelReturnModel(Mid);
                model.ItemID  = clientMod.ItemID;
                model.CDate   = clientMod.CDate;
                model.CUserID = clientMod.CUserID;
                model.Flow    = clientMod.Flow;
                clientBll.UpdateByID(model, table);
            }
            function.WriteSuccessMsg("操作成功", "ClientList");
        }
示例#28
0
文件: SD_Admin.cs 项目: zwt-zf/cms
        public bool Update2(M_AdminInfo adminInfo)
        {
            string strSql = "UPDATE ZL_Manager SET AdminName=@AdminName,AdminPassword=@AdminPassword,UserName=@UserName,EnableMultilogin=@EnableMultilogin,";

            strSql += "RoleList=@RoleList,IsLock=@IsLock,EnableModifyPassword=@EnableModifyPassword WHERE AdminId=@AdminId";
            SqlParameter[] cmdParams = GetParameters(adminInfo);
            return(SqlHelper.ExecuteSql(strSql, cmdParams));
        }
示例#29
0
文件: B_Admin.cs 项目: baixue001/IPS
 public bool CheckSPwd(M_AdminInfo admin, string pwd)
 {
     if (string.IsNullOrEmpty(pwd))
     {
         return(false);
     }
     return(admin.RandNumber.Equals(pwd));
 }
示例#30
0
文件: B_Admin.cs 项目: baixue001/IPS
 public static int Add(M_AdminInfo model)
 {
     model.AdminName = model.AdminName.Replace(" ", "");
     if (!SafeSC.CheckUName(model.AdminName))
     {
         throw new Exception("用户名含有非法字符!!");
     }
     return(DBCenter.Insert(model));
 }