Beispiel #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 = "";
            }
        }
        void NextNote(TreeNode nextnote)
        {
            DataTable dt = new DataTable();
            //获取部门编号节的
            string nextnoteid = nextnote.Value.ToString();

            dt = user.GetList("Did=" + nextnoteid).Tables[0];
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                TreeNode node = new TreeNode();
                node.Value = dt.Rows[i]["Uid"].ToString();
                node.Text  = dt.Rows[i]["Uname"].ToString();
                nextnote.ChildNodes.Add(node);
            }
        }
Beispiel #4
0
 protected void dropuser()
 {
     JumbotOA.BLL.UserBLL user = new JumbotOA.BLL.UserBLL();
     touser.DataSource     = user.GetList("Did in(1,2,3)").Tables[0];
     touser.DataTextField  = "Uname";
     touser.DataValueField = "Uname";
     touser.DataBind();
 }
 protected void dropuser()
 {
     if (pids == 2 || pids == 1)
     {
         ddlUname.DataSource = user.GetList("Did>0").Tables[0];
     }
     else if (pids == 3)
     {
         string did = user.GetList("Uid=" + getvalue(1)).Tables[0].Rows[0]["Did"].ToString();
         ddlUname.DataSource = user.GetList("Did=" + did).Tables[0];
     }
     else
     {
         ddlUname.DataSource = user.GetList("Uid=" + getvalue(1)).Tables[0];
     }
     ddlUname.DataTextField  = "Uname";
     ddlUname.DataValueField = "Uid";
     ddlUname.DataBind();
     if (pids == 2 || pids == 1)
     {
         ddlUname.Items.Insert(0, new ListItem("==全部人员==", "0"));
     }
 }
Beispiel #6
0
        //checkboxlist的绑定
        void ddlWorkerbind()
        {
            this.txtBegintime.Text = DateTime.Now.ToString();
            JumbotOA.BLL.UserBLL user  = new JumbotOA.BLL.UserBLL();
            DataTable            table = user.GetList(wherestr2).Tables[0];

            for (int i = 0; i < table.Rows.Count; i++)
            {
                ListItem item = new ListItem();
                item.Value = table.Rows[i]["Uid"].ToString();
                DataSet ds = new JumbotOA.BLL.TaskBLL().GetList(" uid = " + Convert.ToInt32(table.Rows[i]["Uid"].ToString()) + " and worktime > '" + Convert.ToDateTime(this.txtBegintime.Text) + "' and [Workprogress]in(2,5,6,7,8)");
                if (ds.Tables[0].Rows.Count != 0)
                {
                    item.Text = table.Rows[i]["Uname"].ToString() + "<font style=\"color:#FF0000\">(" + ds.Tables[0].Rows.Count + ")</font>";
                }
                else
                {
                    item.Text = table.Rows[i]["Uname"].ToString();
                }
                ddlWorker.Items.Add(item);
            }
        }
 //添加信息
 protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
 {
     Entity.PlacardEntity model = new Entity.PlacardEntity();
     model.Pauthor = UserName;
     model.Ptitle = this.txtTitle.Text;
     model.Pdate = DateTime.Now;
     model.Ptext = this.FCKeditor1.Value;
     int i = new JumbotOA.BLL.PlacardBLL().Add(model);
     if (i > 0)
     {
         JumbotOA.BLL.UserBLL user = new JumbotOA.BLL.UserBLL();
         DataTable dt=user.GetList("").Tables[0];
         string aa = "";
         for (int j = 0; j <dt.Rows.Count ; j++)
         {
             aa += dt.Rows[j]["Uid"].ToString()+",";
         }
         JumbotOA.BLL.OA_SysMessageIn.ADDsysMessage(1, "," + aa, "[新通知]" + txtTitle.Text, JumbotOA.Utils.Strings.Left(JumbotOA.Utils.Strings.delhtml(FCKeditor1.Value.ToString()), 53), "My_Placard_Show.aspx?id=" + i.ToString());
         aa = "";
         string addtype = "添加通知公告";
         Addlog(addtype);
     }
 }
Beispiel #8
0
        //添加信息
        protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
        {
            Entity.PlacardEntity model = new Entity.PlacardEntity();
            model.Pauthor = UserName;
            model.Ptitle  = this.txtTitle.Text;
            model.Pdate   = DateTime.Now;
            model.Ptext   = this.FCKeditor1.Value;
            int i = new JumbotOA.BLL.PlacardBLL().Add(model);

            if (i > 0)
            {
                JumbotOA.BLL.UserBLL user = new JumbotOA.BLL.UserBLL();
                DataTable            dt   = user.GetList("").Tables[0];
                string aa = "";
                for (int j = 0; j < dt.Rows.Count; j++)
                {
                    aa += dt.Rows[j]["Uid"].ToString() + ",";
                }
                JumbotOA.BLL.OA_SysMessageIn.ADDsysMessage(1, "," + aa, "[新通知]" + txtTitle.Text, JumbotOA.Utils.Strings.Left(JumbotOA.Utils.Strings.delhtml(FCKeditor1.Value.ToString()), 53), "My_Placard_Show.aspx?id=" + i.ToString());
                aa = "";
                string addtype = "添加通知公告";
                Addlog(addtype);
            }
        }
 protected void dropuser()
 {
     JumbotOA.BLL.UserBLL user = new JumbotOA.BLL.UserBLL();
     touser.DataSource = user.GetList("Did in(1,2,3)").Tables[0];
     touser.DataTextField = "Uname";
     touser.DataValueField = "Uname";
     touser.DataBind();
 }
 //checkboxlist的绑定
 void ddlWorkerbind()
 {
     this.txtBegintime.Text = DateTime.Now.ToString();
     JumbotOA.BLL.UserBLL user=new JumbotOA.BLL.UserBLL ();
      DataTable table= user.GetList(wherestr2).Tables[0];
      for(int i=0;i<table.Rows.Count;i++)
      {
          ListItem item = new ListItem();
          item.Value = table.Rows[i]["Uid"].ToString();
          DataSet ds = new JumbotOA.BLL.TaskBLL().GetList(" uid = " + Convert.ToInt32(table.Rows[i]["Uid"].ToString()) + " and worktime > '" + Convert.ToDateTime(this.txtBegintime.Text) + "' and [Workprogress]in(2,5,6,7,8)");
          if (ds.Tables[0].Rows.Count != 0)
              item.Text =table.Rows[i]["Uname"].ToString()+ "<font style=\"color:#FF0000\">(" + ds.Tables[0].Rows.Count + ")</font>";
          else
              item.Text = table.Rows[i]["Uname"].ToString();
          ddlWorker.Items.Add(item);
      }
 }