protected void Page_Load(object sender, EventArgs e)
 {
     B_User.CheckIsLogged("/Office");
     //string roleid = buser.GetLogin().UserRole;
     if (!IsPostBack)
     {
         M_UserInfo mu = buser.GetLogin();
         userNameL.Text = mu.HoneyName;
         userGNL.Text   = strBll.SelNameByUid(mu.UserID);
         Work_L.Text    = mu.WorkNum;
         faceImg.Src    = mu.UserFace;
         ucMod          = ucBll.SelModelByUserID(mu.UserID);
         if (ucMod != null)//为空则不检测
         {
             calendarDiv.Visible = ucMod.HasAuth(ucMod.LeftChk, "leftChk1");
             //leftChk2.Visible = ucMod.HasAuth(ucMod.LeftChk, "leftChk2");
             //leftChk3.Visible = ucMod.HasAuth(ucMod.LeftChk, "leftChk3");
             //leftChk4.Visible = ucMod.HasAuth(ucMod.LeftChk, "leftChk4");
             leftChk5.Visible = ucMod.HasAuth(ucMod.LeftChk, "leftChk5");
             if (!ucMod.HasAuth(ucMod.LeftChk, "leftChk0"))
             {
                 Page.ClientScript.RegisterStartupScript(this.GetType(), "", "hiddendiv1();", true);
             }
         }
         string ulId = Request.QueryString["leftul"];
         if (!string.IsNullOrEmpty("left_ul_1_1"))
         {
             function.Script(this, "$('#" + ulId + "').show();");
         }
     }
 }
Exemple #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     mu = buser.GetLogin();
     if (!IsPostBack)
     {
         ucMod = ucBll.SelModelByUserID(mu.UserID);
         if (ucMod == null)//无对应权限,则是默认权限
         {
         }
         else//拥有权限
         {
             SetChk();
         }
         uinfoMod      = buser.GetUserBaseByuserid(mu.UserID);
         TrueName.Text = mu.HoneyName;
         if (uinfoMod.UserSex)
         {
             UserSex.SelectedValue = "1";
         }
         else
         {
             UserSex.SelectedValue = "2";
         }
         UserPhone.Text = uinfoMod.Mobile;
         UserTel.Text   = uinfoMod.HomePhone;
         Branch.Text    = groupBll.GetGroupNameByIDS(mu.GroupID.ToString());
         StatusT.Text   = mu.State == 0 ? "在职" : "离职";
     }
 }
Exemple #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         MyBind();
         //用户配置块
         ucMod = ucBll.SelModelByUserID(buser.GetLogin().UserID);
         if (ucMod != null)//为空则不检测
         {
             mainChk1.Visible = ucMod.HasAuth(ucMod.MainChk, "mainChk1");
             mainChk2.Visible = ucMod.HasAuth(ucMod.MainChk, "mainChk2");
             //mainChk3.Visible = ucMod.HasAuth(ucMod.MainChk, "mainChk3");
             mainChk4.Visible = ucMod.HasAuth(ucMod.MainChk, "mainChk4");
             mainChk5.Visible = ucMod.HasAuth(ucMod.MainChk, "mainChk5");
             mainChk6.Visible = ucMod.HasAuth(ucMod.MainChk, "mainChk6");
         }
     }
 }
Exemple #4
0
        //-------
        protected void saveBtn_Click(object sender, EventArgs e)
        {
            ucMod.UserID = buser.GetLogin().UserID;
            for (int i = 0; i < this.leftChk.Items.Count; i++)
            {
                if (leftChk.Items[i].Selected)
                {
                    ucMod.LeftChk += leftChk.Items[i].Value + ",";
                }
            }
            for (int i = 0; i < this.mainChk.Items.Count; i++)
            {
                if (mainChk.Items[i].Selected)
                {
                    ucMod.MainChk += mainChk.Items[i].Value + ",";
                }
            }
            for (int i = 0; i < this.popChk.Items.Count; i++)
            {
                if (popChk.Items[i].Selected)
                {
                    ucMod.PopChk += popChk.Items[i].Value + ",";
                }
            }

            M_OA_UserConfig model = ucBll.SelModelByUserID(ucMod.UserID);

            if (model == null)
            {
                ucBll.Insert(ucMod);
            }
            else
            {
                ucMod.ID = model.ID;
                ucBll.UpdateByID(ucMod);
            }
            function.WriteSuccessMsg("修改成功");
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            B_User.CheckIsLogged(Request.RawUrl);
            string roleid = buser.GetLogin().UserRole;

            if (!IsPostBack)
            {
                M_UserInfo mu  = buser.GetLogin();
                M_Uinfo    mub = new M_Uinfo();
                mub          = buser.GetUserBaseByuserid(mu.UserID);
                UName_L.Text = mu.HoneyName;
                ucMod        = ucBll.SelModelByUserID(mu.UserID);
                if (ucMod != null)//为空则不检测
                {
                    //leftChk2.Visible = ucMod.HasAuth(ucMod.LeftChk, "leftChk2");
                    //leftChk3.Visible = ucMod.HasAuth(ucMod.LeftChk, "leftChk3");
                    //leftChk4.Visible = ucMod.HasAuth(ucMod.LeftChk, "leftChk4");
                    if (!ucMod.HasAuth(ucMod.LeftChk, "leftChk0"))
                    {
                        Page.ClientScript.RegisterStartupScript(this.GetType(), "", "hiddendiv1();", true);
                    }
                }
            }
        }
Exemple #6
0
 //----------------Update
 public bool UpdateByID(M_OA_UserConfig model)
 {
     return(DBCenter.UpdateByID(model, model.ID));
 }
Exemple #7
0
 //-----------------Insert
 /// <summary>
 /// 添加一条新的数据
 /// </summary>
 /// <param name="appID">申请ID</param>
 /// <param name="proID">使用的流程ID</param>
 /// <param name="userID">审批人</param>
 /// <param name="result">审批结果:0未审,2未通过,99成功</param>
 /// <param name="remind">备注</param>
 /// <param name="createDate">创建日期</param>
 /// <returns></returns>
 public int Insert(M_OA_UserConfig model)
 {
     return(DBCenter.Insert(model));
 }
Exemple #8
0
 //----------------Update
 public bool UpdateByID(M_OA_UserConfig model)
 {
     return(Sql.UpdateByIDs(TbName, PK, model.ID.ToString(), model.GetFieldAndPara(), model.GetParameters(model)));
 }
Exemple #9
0
 //-----------------Insert
 /// <summary>
 /// 添加一条新的数据
 /// </summary>
 /// <param name="appID">申请ID</param>
 /// <param name="proID">使用的流程ID</param>
 /// <param name="userID">审批人</param>
 /// <param name="result">审批结果:0未审,2未通过,99成功</param>
 /// <param name="remind">备注</param>
 /// <param name="createDate">创建日期</param>
 /// <returns></returns>
 public int Insert(M_OA_UserConfig model)
 {
     return(Sql.insert(TbName, model.GetParameters(model), model.GetParas(), model.GetFields()));
 }