Ejemplo n.º 1
0
    protected void Save_Btn_Click(object sender, EventArgs e)
    {
        DataRow dr = stBll.SelReturnModel(mu.PageID);

        if (dr == null)
        {
            dr = stBll.NewModel();
        }
        dr["StoresName"] = StoreName_T.Text.Trim();
        dr["djid"]       = mu.UserID;
        if (DataConvert.CLng(dr["ID"]) > 0)
        {
            stBll.UpdateById(dr);
        }
        else
        {
            mu.PageID = stBll.Insert(dr);
            buser.UpdateByID(mu);
        }
        string url = "";

        if (ExHelper.IsUser(mu.GroupID))
        {
            url = "/Class_38/Default.aspx";
        }
        else if (ExHelper.IsTeacher(mu.GroupID))
        {
            url = "/Extend/Teacher/Default.aspx";
        }
        function.WriteSuccessMsg("已提交申请,请等待管理员审核", "");
    }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        M_AdminInfo adminMod = B_Admin.GetLogin();

        if (adminMod == null || adminMod.AdminId != 1)
        {
            throw new Exception("no access");
        }

        //---------------------181120
        if (false)
        {
            #region  初始化填充店铺数据
            B_Ex_Store stBll  = new B_Ex_Store();
            DataTable  userDT = DBCenter.Sel("ZL_User", "PageID>0");
            DBCenter.UpdateSQL(stBll.TbName, "cdate='" + DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss") + "',dpzt=99", "");
            foreach (DataRow user in userDT.Rows)
            {
                DataRow stDR = stBll.SelReturnModel(DataConvert.CLng(user["PageID"]));
                stDR["djid"] = Convert.ToInt32(user["UserID"]);
                stBll.UpdateById(stDR);
            }
            #endregion
        }
        if (true)
        {
            #region 内容迁移为移动编辑器
            B_CodeModel codeBll = new B_CodeModel("ZL_C_LSSQ");
            DataTable   dt      = codeBll.Sel();
            //jxtd  jxjl  cgal
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                DataRow dr = dt.Rows[i];
                dr["jxtd"] = UeditorToMB(DataConvert.CStr(dr["jxtd"]));
                dr["jxjl"] = UeditorToMB(DataConvert.CStr(dr["jxjl"]));
                dr["cgal"] = UeditorToMB(DataConvert.CStr(dr["cgal"]));
                codeBll.UpdateByID(dr);
            }
            #endregion
        }
        throw new Exception("操作完成");
    }