Example #1
0
        //添加信息
        protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
        {
            Entity.LearningEntity model = new Entity.LearningEntity();

            model.Sauthor = UserName;
            model.Stitle  = this.txtTitle.Text;
            model.Sdate   = DateTime.Now;
            model.Spath   = this.FCKeditor1.Value;
            model.Did     = UserDepartmentId;
            int i = new JumbotOA.BLL.LearningBLL().Add(model);

            if (i > 0)
            {
                JumbotOA.BLL.UserBLL user = new JumbotOA.BLL.UserBLL();
                DataTable            dt   = new DataTable();
                string aa = "";
                if (UserPowerId <= 3)
                {
                    dt = user.GetList("").Tables[0];
                }
                else
                {
                    dt = user.GetList("Did=" + UserDepartmentId).Tables[0];
                }
                for (int j = 0; j < dt.Rows.Count; j++)
                {
                    aa += dt.Rows[j]["Uid"].ToString() + ",";
                }
                JumbotOA.BLL.OA_SysMessageIn.ADDsysMessage(2, "," + aa, "[新资料]" + txtTitle.Text, JumbotOA.Utils.Strings.Left(JumbotOA.Utils.Strings.delhtml(FCKeditor1.Value.ToString()), 53), "My_Learning_Show.aspx?id=" + i.ToString());
                string addtype = "添加学习资料";
                Addlog(addtype);
                aa = "";
            }
        }
        //添加信息
        protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
        {
            Entity.LearningEntity model = new Entity.LearningEntity();

            model.Sauthor = UserName;
            model.Stitle = this.txtTitle.Text;
            model.Sdate = DateTime.Now;
            model.Spath = this.FCKeditor1.Value;
            model.Did = UserDepartmentId;
            int i = new JumbotOA.BLL.LearningBLL().Add(model);
            if (i > 0)
            {
                JumbotOA.BLL.UserBLL user = new JumbotOA.BLL.UserBLL();
                DataTable dt=new DataTable ();
                string aa = "";
                if(UserPowerId<=3)
                 dt=user.GetList("").Tables[0];
                else
                    dt= user.GetList("Did=" + UserDepartmentId).Tables[0];
                for(int j=0;j<dt.Rows.Count;j++)
                {
                      aa +=dt.Rows[j]["Uid"].ToString()+",";
                }
                JumbotOA.BLL.OA_SysMessageIn.ADDsysMessage(2, "," + aa, "[新资料]" + txtTitle.Text, JumbotOA.Utils.Strings.Left(JumbotOA.Utils.Strings.delhtml(FCKeditor1.Value.ToString()),53), "My_Learning_Show.aspx?id=" + i.ToString());
                string addtype = "添加学习资料";
                Addlog(addtype);
                aa = "";
            }
        }
 /// <summary>
 /// 分页
 /// </summary>
 public void Selectinfo(string str)
 {
     int count;
     BLL.LearningBLL bll = new JumbotOA.BLL.LearningBLL();
     this.Sinfo_repeater.DataSource = bll.getpage(AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, out count, str);
     this.Sinfo_repeater.DataBind();
     AspNetPager1.RecordCount = count;
 }
        /// <summary>
        /// 分页
        /// </summary>
        public void Selectinfo(string str)
        {
            int count;

            BLL.LearningBLL bll = new JumbotOA.BLL.LearningBLL();
            this.Sinfo_repeater.DataSource = bll.getpage(AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, out count, str);
            this.Sinfo_repeater.DataBind();
            AspNetPager1.RecordCount = count;
        }
Example #5
0
 //判断是否是发布任务的本人
 void MyValidate()
 {
     JumbotOA.Entity.LearningEntity learningEntity = new JumbotOA.Entity.LearningEntity();
     learningEntity = new JumbotOA.BLL.LearningBLL().GetEntity(Str2Int(q("id")));
     if (UserName != learningEntity.Sauthor)
     {
         FinalMessage("该学习资料你无权修改", "", 1);
     }
 }
 void Bind()
 {
     int id = Str2Int(q("id"), 0);
     Entity.LearningEntity model = new Entity.LearningEntity();
     model = new JumbotOA.BLL.LearningBLL().GetEntity(id);
     if (UserPowerId > 2)
     {
         if (UserDepartmentId != model.Did && model.Did > 0)
         {
             FinalMessage("请勿越权", "Learning_List.aspx", 0);
         }
     }
     this.lblTitle.Text = model.Stitle;
     text = model.Spath;
 }
Example #7
0
        void Bind()
        {
            int id = Str2Int(q("id"), 0);

            Entity.LearningEntity model = new Entity.LearningEntity();
            model = new JumbotOA.BLL.LearningBLL().GetEntity(id);
            if (UserPowerId > 2)
            {
                if (UserDepartmentId != model.Did && model.Did > 0)
                {
                    FinalMessage("请勿越权", "Learning_List.aspx", 0);
                }
            }
            this.lblTitle.Text = model.Stitle;
            text = model.Spath;
        }
 //判断是否是发布任务的本人
 void MyValidate()
 {
     JumbotOA.Entity.LearningEntity learningEntity = new JumbotOA.Entity.LearningEntity();
     learningEntity = new JumbotOA.BLL.LearningBLL().GetEntity(Str2Int(q("id")));
     if (UserName != learningEntity.Sauthor)
     {
         FinalMessage("该学习资料你无权修改", "", 1);
     }
 }