Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         M_Group Ginfo = Gll.GetByID(Mid);
         this.GroupName.Text = Ginfo.GroupName;
         this.GroupInfo.Text = Ginfo.Description.ToString();
         DataTable umodelDT = Mll.GetListUser();
         GroupModel.DataSource     = umodelDT;
         GroupModel.DataTextField  = "ModelName";
         GroupModel.DataValueField = "ModelID";
         GroupModel.DataBind();
         GroupModel.Items.Insert(0, new ListItem("不绑定模型", "0"));
         if (GroupModel.Items.Count > 0)
         {
             for (int i = 0; i < GroupModel.Items.Count; i++)
             {
                 if (Gll.IsExistModel(Ginfo.GroupID, DataConverter.CLng(GroupModel.Items[i].Value)))
                 {
                     GroupModel.Items[i].Selected = true;
                 }
                 else
                 {
                     GroupModel.Items[i].Selected = false;
                 }
             }
         }
     }
     Call.SetBreadCrumb(Master, "<li>后台管理</li><li><a href='GroupManage.aspx'>会员组管理</a></li><li>会员组设置</li>");
 }
        //申请加入班级
        public void Class_Apply()
        {
            M_Group   groupMod = groupBll.GetByID(mu.GroupID);
            int       roomid   = Convert.ToInt32(Request["roomid_hid"]);
            DataTable dt       = ClassBll.SelByUid(mu.UserID, -1, roomid);

            if (dt.Rows.Count > 0)
            {
                function.WriteErrMsg("你已经申请过班级了!"); return;
            }
            M_Student stuMod = new M_Student();

            stuMod.Addtime     = DateTime.Now;
            stuMod.UserID      = mu.UserID;
            stuMod.UserName    = mu.UserName;
            stuMod.StudentType = 1;
            if (groupMod.Enroll.Contains("isteach"))
            {
                stuMod.StudentType = 2;
            }
            if (groupMod.Enroll.Contains("isfamily"))
            {
                stuMod.StudentType = 3;
            }
            stuMod.AuditingContext = Request["remind_t"];
            stuMod.RoomID          = roomid;
            stuBll.insert(stuMod);
            function.WriteSuccessMsg("申请班级成功!", "/User/Exam/ClassManage"); return;
        }
Ejemplo n.º 3
0
        public string GetGroupName()
        {
            B_User  buser   = new B_User();
            string  GroupID = buser.GetLogin().GroupID.ToString();
            B_Group bgp     = new B_Group();

            return(bgp.GetByID(DataConverter.CLng(GroupID)).GroupName);
        }
Ejemplo n.º 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         this.UserInfo = buser.GetLogin();
         DataTable table = cll.SelectByUserName(ull.GetLogin().UserName, this.UserInfo.GroupID);
         if (!bg.CheckNum(UserInfo.UserID))
         {
             function.WriteErrMsg("您所在的用户组限制了您每天最多只能发布" + bg.GetByID(UserInfo.GroupID).CCountPerDay + "条信息!");
         }
         if (string.IsNullOrEmpty(base.Request.QueryString["ModelID"]))
         {
             function.WriteErrMsg("没有指定要添加内容的模型ID!");
         }
         else
         {
             this.ModelID = DataConverter.CLng(base.Request.QueryString["ModelID"]);
         }
         if (string.IsNullOrEmpty(base.Request.QueryString["NodeID"]))
         {
             function.WriteErrMsg("没有指定要添加内容的栏目节点ID!");
         }
         else
         {
             this.NodeID = DataConverter.CLng(base.Request.QueryString["NodeID"]);
         }
         if (bmode.GetModelById(this.ModelID).ModelType == 2)
         {
             Response.Redirect("addproduct.aspx?ModelID=" + this.ModelID + "&NodeID=" + this.NodeID);//跳转到商城
         }
         if (bmode.GetModelById(this.ModelID).ModelType == 5)
         {
             Response.Redirect("../UserShop/ProductAdd.aspx?ModelID=" + this.ModelID + "&NodeID=" + this.NodeID);//跳转到店铺
         }
         this.Label1.Text    = "向" + this.bnode.GetNodeXML(this.NodeID).NodeName + "节点添加" + this.bmode.GetModelById(this.ModelID).ItemName;
         this.Label2.Text    = this.bnode.GetNodeXML(this.NodeID).NodeName;
         this.HdnModel.Value = this.ModelID.ToString();
         string ModelName = this.bmode.GetModelById(this.ModelID).ModelName;
         this.EBtnSubmit.Text = "添加" + this.bmode.GetModelById(this.ModelID).ItemName;
         this.HdnNode.Value   = this.NodeID.ToString();
         this.ModelHtml.Text  = this.bfield.GetInputHtmlUser(this.ModelID, this.NodeID);
         DataSet ds = bfield.GetProModelFieldS(this.ModelID.ToString());
         this.Title_L.Text = GetAlias("Title", ds.Tables[0]);
     }
     #region 权限
     GetNodePreate(this.NodeID);
     #endregion
 }
Ejemplo n.º 5
0
    public string GetUserInfo(string str)
    {
        int id = DataConvert.CLng(Eval("CUser"));

        if (str.Equals("groupName"))
        {
            userinfo = buser.GetUserByUserID(id);
            return(bgp.GetByID(DataConverter.CLng(userinfo.GroupID)).GroupName);
        }
        else if (str.Equals("count"))
        {
            DataTable dt = new DataTable();
            dt = barBll.SelByCateID(id.ToString(), 2);
            return(dt.Rows.Count + "");
        }
        else if (str.Equals("userBirth"))
        {
            users = buser.GetUserBaseByuserid(id);
            return(users.BirthDay);
        }
        else if (str.Equals("userExp"))
        {
            userinfo = buser.GetUserByUserID(id);
            return(userinfo.UserExp + "");
        }
        else if (str.Equals("userSex"))
        {
            users = buser.GetUserBaseByuserid(id);
            if ((users.UserSex + "") == "False")
            {
                return("女");
            }
            else
            {
                return("男");
            }
        }
        else if (str.Equals("regTime"))
        {
            DateTime datetime = tpuserBll.GetLogin().RegTime;
            return(datetime.Year + "-" + datetime.Month + "-" + datetime.Day);
        }
        else
        {
            return("");
        }
    }
Ejemplo n.º 6
0
    /// <summary>
    ///  签章(创建事务模板时使用,发送公文时处理)
    /// </summary>
    public string GetHolder(M_Mis_Model oaTemp, string value)
    {
        string r = "";

        for (int i = 0; i < TempHolder.Length; i++)
        {
            string action = TempHolder[i];
            switch (action)    //替换占位符
            {
            case "{$SignImg}": //调用部门签章信息
                //string img="<img src='{0}'></img>";
                groupMod = groupBll.GetByID(Convert.ToInt32(value));
                r        = oaTemp.ModelContent.Replace(TempHolder[0], groupMod.SignImg);
                break;
            }
        }
        return(r);
    }
Ejemplo n.º 7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         M_UserInfo mu = buser.GetLogin(false);
         this.LblUser.Text       = mu.UserName;
         this.LblEmail.Text      = mu.Email;
         this.LblGroup.Text      = bgp.GetByID(mu.GroupID).GroupName;
         this.LblJoinTime.Text   = mu.JoinTime.ToString();
         this.LblRegTime.Text    = mu.RegTime.ToString();
         this.LblLoginTimes.Text = mu.LoginTimes.ToString();
         this.LblLastLogin.Text  = mu.LastLoginTimes.ToString();
         this.LblLastIP.Text     = IPScaner.IPLocation(mu.LastLoginIP);
         this.LblLastModify.Text = (mu.LastPwdChangeTime == mu.RegTime) ? "" : mu.LastPwdChangeTime.ToString();
         this.LblLastLock.Text   = (mu.LastLockTime == mu.RegTime) ? "" : mu.LastLockTime.ToString();
         this.Purse_L.Text       = mu.Purse.ToString();
         this.Point_L.Text       = mu.UserExp.ToString();
         Sicon_L.Text            = mu.SilverCoin.ToString();
         UserPoint_L.Text        = mu.UserPoint.ToString();
         this.LblboffExp.Text    = mu.boffExp.ToString();
         this.LblConsumeExp.Text = mu.ConsumeExp.ToString();
         this.DummyPurse_L.Text  = mu.DummyPurse.ToString();
         M_PointGrounp pointmod = pointBll.SelectPintGroup(mu.UserExp);
         gradeTxt.Text = "";
         if (pointmod != null)
         {
             gradeTxt.Text = pointmod.GroupName;
             LvIcon_Span.Attributes["class"] = pointmod.ImgUrl;
         }
         if (DataConvert.CLng(mu.ParentUserID) > 0)
         {
             M_UserInfo usinfo = buser.GetSelect(Convert.ToInt32(mu.ParentUserID));
             LblParentUserID.Text = string.IsNullOrEmpty(usinfo.UserName) ? "" : usinfo.UserName;
         }
         int UserModelID = DataConverter.CLng(bgp.GetGroupModel(mu.GroupID));
         if (UserModelID > 0)
         {
             GroupModelField_Li.Text = Fll.InputallHtml(UserModelID, 0, new ModelConfig()
             {
                 ValueDT = bmodel.SelUserModelField(UserModelID, mu.UserID)
             });
         }
     }
 }
Ejemplo n.º 8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         M_UserInfo uinfo = buser.GetLogin(false);
         this.LblUser.Text       = uinfo.UserName;
         this.LblEmail.Text      = uinfo.Email;
         this.LblGroup.Text      = bgp.GetByID(uinfo.GroupID).GroupName;
         this.LblJoinTime.Text   = uinfo.JoinTime.ToString();
         this.LblRegTime.Text    = uinfo.RegTime.ToString();
         this.LblLoginTimes.Text = uinfo.LoginTimes.ToString();
         this.LblLastLogin.Text  = uinfo.LastLoginTimes.ToString();
         this.LblLastIP.Text     = uinfo.LastLoginIP;
         this.LblLastModify.Text = (uinfo.LastPwdChangeTime == uinfo.RegTime) ? "" : uinfo.LastPwdChangeTime.ToString();
         this.LblLastLock.Text   = (uinfo.LastLockTime == uinfo.RegTime) ? "" : uinfo.LastLockTime.ToString();
         this.Purse_L.Text       = uinfo.Purse.ToString();
         this.Point_L.Text       = uinfo.UserExp.ToString();
         Sicon_L.Text            = uinfo.SilverCoin.ToString();
         UserPoint_L.Text        = uinfo.UserPoint.ToString();
         this.LblboffExp.Text    = uinfo.boffExp.ToString();
         this.LblConsumeExp.Text = uinfo.ConsumeExp.ToString();
         this.DummyPurse_L.Text  = uinfo.DummyPurse.ToString();
         M_PointGrounp pointmod = pointBll.SelectPintGroup(uinfo.UserExp);
         gradeTxt.Text = "";
         if (pointmod != null)
         {
             gradeTxt.Text = pointmod.GroupName;
             LvIcon_Span.Attributes["class"] = pointmod.ImgUrl;
         }
         if (DataConvert.CLng(uinfo.ParentUserID) > 0)
         {
             M_UserInfo usinfo = buser.GetSelect(Convert.ToInt32(uinfo.ParentUserID));
             LblParentUserID.Text = string.IsNullOrEmpty(uinfo.UserName) ? "" : uinfo.UserName;
         }
         int UserModelID = DataConverter.CLng(bgp.GetGroupModel(uinfo.GroupID));
         if (UserModelID > 0)
         {
             GroupModelField_Li.Text = Fll.GetUpdateHtmlUser(UserModelID, 0, bmodel.SelUserModelField(UserModelID, uinfo.UserID));
         }
     }
 }
Ejemplo n.º 9
0
        public ActionResult Statistics()
        {
            M_UserInfo mu = buser.GetLogin();
            int        Articles = 0, BEcount = 0;
            string     GroupName = gpBll.GetByID(mu.GroupID).GroupName;
            int        gid       = DataConverter.CLng(Request["GID"]);

            if (gid > 0)
            {
                int nid = DataConverter.CLng(Request.QueryString["NodeID"]);
                //节点配置文件信息
                M_Node      node = nodeBll.GetNodeXML(DataConverter.CLng(DataConverter.CLng(Request.QueryString["NodeID"])));
                XmlDocument Xml  = new XmlDocument();
                try
                {
                    Xml.Load(Server.MapPath("/Config/Payment.xml"));
                }
                catch (Exception)
                {
                    function.WriteErrMsg("出现错误"); return(Content(""));
                }
                //读取用户组的可浏览篇数
                string  GroupN = function.GetChineseFirstChar(GroupName);
                XmlNode Xn     = Xml.SelectSingleNode("UserGroups/" + GroupN + "/Manner");
                //该会员组可查看篇数
                Articles = DataConverter.CLng(Xn.Attributes["Articles"].Value);
                if (BEcount <= Articles)
                {
                }
                else
                {
                    Response.Write("2");
                    Response.End(); return(null);
                }
            }
            return(View());
        }
        public string GetGroupName(string GroupID)
        {
            B_Group bgp = new B_Group();

            return(bgp.GetByID(DataConverter.CLng(GroupID)).GroupName);
        }
Ejemplo n.º 11
0
        public ContentResult UserCheck()
        {
            M_AJAXUser ajaxUser = new M_AJAXUser();
            string     action   = GetParam("action");

            retMod.retcode = M_APIResult.Success;
            switch (action)
            {
            case "HasLogged":
                mu = buser.GetLogin();
                if (mu != null && !mu.IsNull)
                {
                    ajaxUser.Copy(mu);
                    return(Content(ajaxUser.ToJson()));
                }
                else
                {
                    return(Content("-1"));
                }

            case "GetBarUInfo":
            {
                int uid = Convert.ToInt32(GetParam("uid"));
                mu = buser.GetUserByUserID(uid);
                M_Uinfo ubMod  = buser.GetUserBaseByuserid(uid);
                string  result = "{\"UserFace\":\"" + ubMod.UserFace + "\",\"UserExp\":\"" + mu.UserExp + "\",\"UserSex\":\"" + (ubMod.UserSex ? "男" : "女") + "\",\"GroupName\":\"" + gpBll.GetByID(DataConverter.CLng(mu.GroupID)).GroupName + "\",\"UserBirth\":\"" + ubMod.BirthDay + "\",\"RegTime\":\"" + mu.RegTime + "\",\"UserID\":\"" + mu.UserID + "\",\"UserName\":\"" + mu.UserName + "\"}";
                return(Content(result));
            }

            case "CheckKey":
                string     chkUname = GetParam("uname");
                M_UserInfo usermod  = buser.GetUserByName(chkUname);
                if (usermod != null && !string.IsNullOrEmpty(usermod.ZnPassword))
                {
                    return(Content("1"));
                }
                else
                {
                    return(Content("-1"));
                }

            case "UserLogin":
            {
                string key   = GetParam("key");
                string uname = GetParam("uname");
                string upwd  = GetParam("upwd");
                mu = buser.AuthenticateUser(uname, upwd);
                if (mu.IsNull)
                {
                    retMod.retcode = M_APIResult.Failed; retMod.retmsg = "登录失败,用户名或密码错误";
                }
                else
                {
                    ajaxUser.Copy(mu);
                    retMod.result = ajaxUser.ToJson();
                }
                return(Content(retMod.ToString()));
            }
            break;

            case "GetUser":    //用于远程登录等,返回基本用户信息
            {
                string uname = RequestEx["uname"];
                string upwd  = RequestEx["upwd"];       //未加密的
                mu = buser.AuthenticateUser(uname, upwd);
                if (mu.IsNull)
                {
                    retMod.retcode = M_APIResult.Failed; retMod.retmsg = "用户不存在";
                }
                else
                {
                    ajaxUser.Copy(mu);
                    retMod.retmsg = ajaxUser.ToJson();
                }
                return(Content(retMod.ToString()));
            }
            break;

            case "ExistEmail":
            {
                string email = RequestEx["email"];
                if (buser.IsExistMail(email))
                {
                    retMod.retcode = M_APIResult.Failed; retMod.retmsg = "邮箱已存在!";
                }
                return(Content(retMod.ToString()));
            }
            break;

            case "ExistUName":
            {
                string uname = RequestEx["uname"];
                if (buser.IsExistUName(uname))
                {
                    retMod.retcode = M_APIResult.Failed; retMod.retmsg = "用户名已存在";
                }
                return(Content(retMod.ToString()));
            }
            break;

            case "ExistMobile":
            {
                string mobile = RequestEx["mobile"];
                if (buser.IsExist("mobile", mobile))
                {
                    retMod.retcode = M_APIResult.Failed; retMod.retmsg = "手机号已存在";
                }
                return(Content(retMod.ToString()));
            }
            break;

            case "exist_ue":    //检测用户名与邮箱(选填)
            {
                string email = RequestEx["email"];
                string uname = RequestEx["uname"];
                if (buser.IsExistUName(uname))
                {
                    retMod.retcode = M_APIResult.Failed; retMod.retmsg = "用户名已存在";
                }
                if (!string.IsNullOrEmpty(email))
                {
                    if (buser.IsExistMail(email))
                    {
                        retMod.retcode = M_APIResult.Failed; retMod.retmsg = "邮箱已存在!";
                    }
                }
                return(Content(retMod.ToString()));
            }

            case "exist_um":    //用户名与手机号(选填)
            {
                string uname  = RequestEx["uname"];
                string mobile = RequestEx["mobile"];
                if (buser.IsExistUName(uname))
                {
                    retMod.retcode = M_APIResult.Failed; retMod.retmsg = "用户名已存在";
                }
                if (!string.IsNullOrEmpty(mobile))
                {
                    if (buser.IsExist("mobile", mobile))
                    {
                        retMod.retcode = M_APIResult.Failed; retMod.retmsg = "手机号已存在";
                    }
                }
                return(Content(retMod.ToString()));
            }

            case "exist_ume":
            {
                string uname = RequestEx["uname"];
                if (buser.IsExist("ume", uname))
                {
                    retMod.retcode = M_APIResult.Failed; retMod.retmsg = "用户名已存在";
                }
                return(Content(retMod.ToString()));
            }

            case "spwd":
            {
                retMod.retcode = M_APIResult.Failed;
                mu             = buser.GetLogin(false);
                string spwd = RequestEx["spwd"];
                if (string.IsNullOrEmpty(mu.PayPassWord))
                {
                    retMod.retmsg = "用户未设置支付密码,验证失败";
                }
                else if (!mu.PayPassWord.Equals(StringHelper.MD5(spwd)))
                {
                    retMod.retmsg = "支付密码错误";
                }
                else if (mu.PayPassWord.Equals(StringHelper.MD5(spwd)))
                {
                    retMod.retcode = M_APIResult.Success;
                }
                else
                {
                    retMod.retmsg = "支付密码错误";
                }
                return(Content(retMod.ToString()));
            }

            case "Login":
            default:    //Login
                #region -1登录失败,-2验证码失败,-10启用验证码
            {
                string value = RequestEx["value"];
                string uname = value.Split(':')[0], upwd = value.Split(':')[1];
                //兼容以前旧版未加密请求
                if (upwd.Length > 10)
                {
                    upwd = ZoomlaSecurityCenter.SiteDecrypt(upwd);
                }
                if (LoginCount >= 3)        //验证码
                {
                    var key = value.Split(':')[2]; var code = value.Split(':')[3];
                    if (key.StartsWith("{"))        //新验证码
                    {
                        int    start = value.IndexOf("{");
                        int    end   = value.LastIndexOf("}");
                        string json  = value.Substring(start, end - start + 1);
                        if (!VerifyHelper.Check(json))
                        {
                            return(Content("-2"));
                        }
                    }
                    else if (!ZoomlaSecurityCenter.VCodeCheck(key, code))
                    {
                        return(Content("-2"));
                    }
                }
                mu = buser.AuthenticateUser(uname, upwd);
                if (mu == null || mu.IsNull)
                {
                    LoginCount++;
                    if (LoginCount >= 3)
                    {
                        return(Content("-10"));
                    }
                    else
                    {
                        return(Content("-1"));
                    }
                }
                else
                {
                    LoginCount = 0;
                    buser.SetLoginState(mu, "Day");
                    ajaxUser.Copy(mu);
                    return(Content(ajaxUser.ToJson()));
                }
            }
                #endregion
                break;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (function.isAjax())
            {
                string Action = Request.Form["Action"];
                string result = "";
                if (Action == "Print")
                {
                    string content = Request.Form["Content"];
                    string img     = Request.Form["Image"];
                    Session["PrintCon"] = content;
                    Session["PrintImg"] = img;
                    result = "1";
                }
                else
                {
                    string value = Request.Form["value"];
                    mmis   = bmis.SelReturnModel(Convert.ToInt32(value));
                    result = oaCom.GetHolder(mmis, buser.GetLogin().GroupID.ToString());
                }
                Response.Clear(); Response.Write(result); Response.Flush(); Response.End();
            }
            if (!IsPostBack)
            {
                //      if (!purBll.Auth("OADocumentWrite", buser.GetLogin().UserRole)) { function.WriteErrMsg("你当前没有起草公文的权限,请联系管理员!!!"); }
                TypeDataBind();
                DPDataBind();
                #region 签章初始化
                DataTable signDT = signBll.SelByUserID(buser.GetLogin().UserID);
                if (signDT != null && signDT.Rows.Count > 0)
                {
                    SignRadioBind(signDT);
                }
                else
                {
                    signTrRemind.Visible = true;
                }
                #endregion
                if (Request.QueryString["Edit"] == "1" && !string.IsNullOrEmpty(Request.QueryString["AppID"]))
                {
                    saveBtn.Text      = "修改";
                    AddNewBtn.Visible = true;
                    int           id      = DataConvert.CLng(Request.QueryString["AppID"]);
                    M_MisProLevel freeMod = freeBll.SelByDocID(id);
                    moa                      = boa.SelReturnModel(id);
                    minfo                    = buser.SeachByID(moa.UserID);
                    Title_T.Text             = moa.Title;
                    key                      = moa.Keywords;
                    Keywords.Text            = moa.Keywords;
                    Secret.SelectedValue     = moa.Secret.ToString();
                    Urgency.SelectedValue    = moa.Urgency.ToString();
                    Importance.SelectedValue = moa.Importance.ToString();
                    DocType_DP.SelectedValue = moa.Type.ToString();
                    proDP.SelectedValue      = moa.ProID.ToString();
                    Content.Text             = moa.Content;
                    CreateTime.Text          = moa.CreateTime.ToString("yyyy/MM/dd HH:mm:ss");
                    Label1.Text              = minfo.HoneyName;
                    Label2.Text              = groupBll.GetByID(minfo.GroupID).GroupName;
                    if (freeMod != null)
                    {
                        RUserID_Hid.Value  = freeMod.ReferUser;
                        RUserName_Lab.Text = buser.GetUserNameByIDS(freeMod.ReferUser);
                        CUserID_Hid.Value  = freeMod.CCUser;
                        CUserName_Lab.Text = buser.GetUserNameByIDS(freeMod.CCUser);
                    }
                    //附件相关,移除,不做检测
                    //proMod = proBll.SelReturnModel(moa.ProID);
                    //if (proMod.AllowAttach == 1)
                    //{
                    upFileTR.Visible = true;
                    //}

                    if (!string.IsNullOrEmpty(moa.PublicAttach))
                    {
                        hasFileData.Value = moa.PublicAttach;
                        string[] af = moa.PublicAttach.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                        string   h  = "";
                        for (int i = 0; i < af.Length; i++)
                        {
                            h += "<span class='disupFile'>";
                            h += GroupPic.GetShowExtension(GroupPic.GetExtName(af[i]));
                            h += "<a target='_blank' href=" + af[i] + ">" + af[i].Split('/')[(af[i].Split('/').Length - 1)] + "</a><a href='javascript:;' title='删除' onclick='delHasFile(\"" + af[i] + "\",this);' ><img src='/App_Themes/AdminDefaultTheme/images/del.png'/></a></span>";
                        }
                        hasFileTD.InnerHtml = h;
                    }
                    //签章,用于修改
                    if (!string.IsNullOrEmpty(moa.SignID) && signRadio.Items.Count > 0)
                    {
                        signRadio.SelectedValue = moa.SignID.Split(':')[0];
                        Page.ClientScript.RegisterStartupScript(this.GetType(), "signInit", "InitPos('" + moa.SignID + "');", true);
                    }
                    DraftBtn.Visible = false;
                    //-----检测是否已开始流程
                    if (boa.IsApproving(id))//已开始,不允许修改
                    {
                        saveBtn.Visible  = false;
                        DraftBtn.Visible = false;
                        clearBtn.Attributes.Add("disabled", "disabled");
                        clearBtn.Text = "流程已开始,禁止修改";
                    }
                }
                else
                {
                    AddNewBtn.Visible = false;
                    Label1.Text       = buser.GetLogin().HoneyName;
                    Label2.Text       = groupBll.GetByID(buser.GetLogin().GroupID).GroupName;
                    CreateTime.Text   = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss");
                }
            }
        }
Ejemplo n.º 13
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.Page.IsPostBack)
        {
            switchID.Value = HttpUtility.HtmlEncode(Request.QueryString["sel"]);
            if (!buser.CheckLogin())
            {
                function.WriteErrMsg("请先<a href=/User/Login.aspx>登录</a>!", "/User/Login.aspx");
            }
            else
            {
                M_UserInfo uinfo = buser.GetLogin();
                //CompanyGroup是否为企业用户组0-否 1-是
                if (bgp.GetByID(Convert.ToInt32(uinfo.GroupID)).CompanyGroup == 1)
                {
                    this.DivCompany.Visible      = true;
                    this.txtCompanyName.Text     = uinfo.CompanyName;
                    this.txtCompanyDescribe.Text = uinfo.CompanyDescribe;
                }
                string  modellist = bgp.GetGroupModel(uinfo.GroupID);
                M_Uinfo binfo     = buser.GetUserBaseByuserid(uinfo.UserID);
                if (!binfo.IsNull)
                {
                    tbTrueName.Text         = uinfo.TrueName;
                    txtHonName.Text         = uinfo.HoneyName;
                    tbUserSex.SelectedValue = binfo.UserSex ? "1" : "0";
                    address.Value           = binfo.Province + "," + binfo.City + "," + binfo.County;
                    tbAddress.Text          = binfo.Address;
                    tbBirthday.Text         = binfo.BirthDay;
                    tbFaceWidth.Text        = binfo.FaceWidth.ToString();
                    tbFaceHeight.Text       = binfo.FaceHeight.ToString();
                    tbFax.Text       = binfo.Fax;
                    tbHomepage.Text  = binfo.HomePage;
                    tbHomePhone.Text = binfo.HomePhone;
                    //tbICQ.Text = binfo.ICQ;
                    tbIDCard.Text      = binfo.IDCard;
                    tbMobile.Text      = binfo.Mobile;
                    tbMSN.Text         = binfo.MSN;
                    tbOfficePhone.Text = binfo.OfficePhone;
                    //tbPHS.Text = binfo.PHS;
                    tbPrivacy.SelectedValue = binfo.Privating.ToString();

                    tbQQ.Text          = binfo.QQ;
                    tbSign.Text        = binfo.Sign;
                    tbUC.Text          = binfo.UC;
                    UserFace_Hid.Value = Path.GetFileName(uinfo.UserFace);
                    tbUserFace.Text    = uinfo.UserFace;
                    face.ImageUrl      = uinfo.UserFace;
                    //tbYahoo.Text = binfo.Yahoo;
                    tbZipCode.Text = binfo.ZipCode;
                    //公司信息与职务
                    this.Position.Text    = binfo.Position;
                    this.CompanyName.Text = binfo.CompanyName;
                    this.face.ImageUrl    = string.IsNullOrEmpty(binfo.UserFace) ? "/Images/userface/noface.gif" : binfo.UserFace;
                }
                lblHtml.Text = ubfbll.GetUpdateHtml(uinfo.UserID);
                //lblHtml.Text = lblHtml.Text.Replace("tdbg", "");
            }
            //-----权限块
            if (SiteConfig.UserConfig.UserMobilAuth.Equals("0"))
            {
                tbMobile.Enabled = false;
            }
        }//IsPostBack
    }
Ejemplo n.º 14
0
 public string GetGroupName(string GroupID)
 {
     return(bgp.GetByID(DataConverter.CLng(GroupID)).GroupName);
 }
Ejemplo n.º 15
0
    public void AddContentToNode(M_OA_Document oaDoc, int NodeID, int ModelID)
    {
        DataTable table = new DataTable();

        table.Columns.Add(new DataColumn("FieldName", typeof(string)));
        table.Columns.Add(new DataColumn("FieldType", typeof(string)));
        table.Columns.Add(new DataColumn("FieldValue", typeof(string)));

        //手动完成赋值
        string[] fieldArr = { "Secret", "Urgency", "Importance", "Attach", "UserGroupT", "content" };
        for (int i = 0; i < fieldArr.Length; i++)
        {
            DataRow dr = table.NewRow();
            dr["FieldName"] = fieldArr[i];
            dr["FieldType"] = "TextType";
            table.Rows.Add(dr);
        }
        table.Rows[0]["FieldValue"] = OAConfig.StrToDic(OAConfig.Secret)[oaDoc.Secret.ToString()];
        table.Rows[1]["FieldValue"] = OAConfig.StrToDic(OAConfig.Urgency)[oaDoc.Urgency.ToString()];
        table.Rows[2]["FieldValue"] = OAConfig.StrToDic(OAConfig.Importance)[oaDoc.Importance.ToString()];
        table.Rows[3]["FieldValue"] = oaDoc.PublicAttach;
        table.Rows[4]["FieldValue"] = groupBll.GetByID(buser.GetLogin().GroupID).GroupName;
        table.Rows[5]["FieldType"]  = "MultipleHtmlType";
        table.Rows[5]["FieldValue"] = oaDoc.Content;

        //将无法获取的值,手动写入table中

        M_CommonData CData = new M_CommonData();

        CData.NodeID    = NodeID;
        CData.ModelID   = ModelID;
        CData.TableName = bmode.GetModelById(ModelID).TableName;
        CData.Title     = oaDoc.Title;
        //判断是否使用文件流程
        if (SiteConfig.SiteOption.ContentConfig == 1)
        {
            CData.Status = 0;
        }
        else
        {
            CData.Status = 99;
        }
        CData.Inputer    = buser.GetLogin().UserName;
        CData.EliteLevel = 0;
        CData.InfoID     = "";
        CData.SpecialID  = "";
        CData.Hits       = 0;
        CData.UpDateType = 2;
        CData.UpDateTime = DateTime.Now;
        //string Keyword = this.TxtTagKey.Text.Trim().Replace(" ", "|");
        CData.TagKey       = oaDoc.Keywords;
        CData.Status       = 99;//状态,如果需要审核后才能看到,这里做下逻辑
        CData.Titlecolor   = "";
        CData.Template     = "";
        CData.CreateTime   = DateTime.Now;
        CData.ProWeek      = 0;
        CData.Pronum       = 0;
        CData.BidType      = 0;
        CData.IsBid        = (CData.BidType > 0) ? 1 : 0;
        CData.BidMoney     = DataConverter.CDouble(0);
        CData.DefaultSkins = 0;
        CData.FirstNodeID  = 0;                            //GetNo(NodeID)
        CData.TitleStyle   = "";
        CData.ParentTree   = conBll.GetParentTree(NodeID); //父级别树
        CData.TopImg       = "";                           //首页图片
        CData.PdfLink      = "";
        CData.Subtitle     = "";
        CData.PYtitle      = "";
        int newID = conBll.AddContent(table, CData);
    }