void Msgbind()
 {
     int id = Str2Int(q("id"), 0);
     Entity.TaskEntity model = new Entity.TaskEntity();
     model = new JumbotOA.BLL.TaskBLL().GetEntity(id);
     this.lblTitle.Text = model.Tasktitle;
     this.lblBegintime.Text = model.Nowtime.ToString();
     this.lblEndtime.Text = model.Plantime.ToString();
     txt.Text = model.Content;
     question.Text = model.Question;
     classse.Text = model.Classse;
     Manager.Text = model.Manager;
     labwork.Text = model.Worktime.ToString();
 }
コード例 #2
0
        void Msgbind()
        {
            int id = Str2Int(q("id"), 0);

            Entity.TaskEntity model = new Entity.TaskEntity();
            model = new JumbotOA.BLL.TaskBLL().GetEntity(id);
            this.lblTitle.Text     = model.Tasktitle;
            this.lblBegintime.Text = model.Nowtime.ToString();
            this.lblEndtime.Text   = model.Plantime.ToString();
            txt.Text      = model.Content;
            question.Text = model.Question;
            classse.Text  = model.Classse;
            Manager.Text  = model.Manager;
            labwork.Text  = model.Worktime.ToString();
        }
        public string download()
        {
            string str = "";
            int id = Str2Int(q("id"), 0);
            Entity.TaskEntity model = new Entity.TaskEntity();
            model = new JumbotOA.BLL.TaskBLL().GetEntity(id);
            if (model.Filepath != null)
            {
                string[] rows = model.Filepath.ToString().Split(",".ToCharArray());
                if (rows.Length > 1)
                {
                    for (int i = 0; i < rows.Length - 1; i++)
                    {
                        str += "<a href=\"/workfile/" + rows[i].ToString() + "\" style=\"border:0\">" + rows[i].Substring(rows[i].LastIndexOf("$") + 1) + "</a><br />&nbsp;";

                    }
                }
            }
            return str;
        }
コード例 #4
0
        public string download()
        {
            string str = "";
            int    id  = Str2Int(q("id"), 0);

            Entity.TaskEntity model = new Entity.TaskEntity();
            model = new JumbotOA.BLL.TaskBLL().GetEntity(id);
            if (model.Filepath != null)
            {
                string[] rows = model.Filepath.ToString().Split(",".ToCharArray());
                if (rows.Length > 1)
                {
                    for (int i = 0; i < rows.Length - 1; i++)
                    {
                        str += "<a href=\"/workfile/" + rows[i].ToString() + "\" style=\"border:0\">" + rows[i].Substring(rows[i].LastIndexOf("$") + 1) + "</a><br />&nbsp;";
                    }
                }
            }
            return(str);
        }
コード例 #5
0
        void Msgbind()
        {
            int id = Str2Int(q("id"), 0);

            Entity.TaskEntity model = new Entity.TaskEntity();
            model = new Daiv_OA.BLL.TaskBLL().GetEntity(id);
            if (model.Workprogress == 1)
            {
                Daiv_OA.BLL.TaskBLL u = new Daiv_OA.BLL.TaskBLL();
                u.Upworkprogress(2, id);
            }
            if (model.Uid != UserId)
            {
                FinalMessage("请勿违规操作", "", 100);
            }
            this.lblTitle.Text     = model.Tasktitle;
            this.lblBegintime.Text = model.Nowtime.ToString();
            this.lblEndtime.Text   = model.Plantime.ToString();
            txt.Text      = model.Content;
            question.Text = model.Question;
            classse.Text  = model.Classse;
            Manager.Text  = model.Manager;
            labwork.Text  = model.Worktime.ToString();
        }
 void Msgbind()
 {
     int id = Str2Int(q("id"), 0);
     Entity.TaskEntity model = new Entity.TaskEntity();
     model = new JumbotOA.BLL.TaskBLL().GetEntity(id);
     if (model.Workprogress == 1)
     {
         JumbotOA.BLL.TaskBLL u = new JumbotOA.BLL.TaskBLL();
         u.Upworkprogress(2, id);
     }
     if (model.Uid != UserId)
     {
         FinalMessage("请勿违规操作", "", 100);
     }
     this.lblTitle.Text = model.Tasktitle;
     this.lblBegintime.Text = model.Nowtime.ToString();
     this.lblEndtime.Text = model.Plantime.ToString();
     txt.Text = model.Content;
     question.Text = model.Question;
     classse.Text = model.Classse;
     Manager.Text = model.Manager;
     labwork.Text = model.Worktime.ToString();
 }
コード例 #7
0
        public List <Entity.TaskEntity> getpage(int pageSize, int pageNum, out int count, string str)
        {
            string select, table, where, order;

            select = " *,(case when (Workprogress= 1) then '新的任务' when (Workprogress= 2) then '正在办理' when (Workprogress= 3) then '已经完成' when (Workprogress= 4) then '验收未完成' when (Workprogress= 5) then '提前完成' when (Workprogress= 6) then '按时完成' when (Workprogress= 7) then '未完成' when (Workprogress= 8) then '重新申请时间' when (Workprogress= 9) then '拒收' end) as Workstate ";

            table = "[OA_Task] ";

            StringBuilder sb = new StringBuilder();

            sb.Append(" ( 1 = 1 ) " + str);

            where = sb.ToString();

            order = "Tlid";

            string sql = "exec Pagination @select, @table, @where, @orderField, @orderType, @pageSize, @pageNum ";

            SqlParameter[] paras =
            {
                new SqlParameter("@select",     select),
                new SqlParameter("@table",      table),
                new SqlParameter("@where",      where),
                new SqlParameter("@orderField", order),
                new SqlParameter("@orderType",  '1'),
                new SqlParameter("@pageSize",   pageSize),
                new SqlParameter("@pageNum",    pageNum)
            };

            DataSet ds = DbHelperSQL.Query(sql, paras);

            count = Convert.ToInt32(ds.Tables[1].Rows[0][0]);

            List <Entity.TaskEntity> list = new List <Entity.TaskEntity>();

            Entity.TaskEntity model;

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                model = new Entity.TaskEntity();

                if (ds.Tables[0].Rows[i]["Tlid"].ToString() != "")
                {
                    model.Tlid = int.Parse(ds.Tables[0].Rows[i]["Tlid"].ToString());
                }
                model.Nowtime      = Convert.ToDateTime(ds.Tables[0].Rows[i]["Nowtime"].ToString());
                model.Manager      = ds.Tables[0].Rows[i]["Manager"].ToString();
                model.Plantime     = Convert.ToDateTime(ds.Tables[0].Rows[i]["Plantime"].ToString());
                model.Tasktitle    = ds.Tables[0].Rows[i]["Tasktitle"].ToString();
                model.Uid          = Convert.ToInt32(ds.Tables[0].Rows[i]["Uid"].ToString());
                model.Worktime     = Convert.ToDateTime(ds.Tables[0].Rows[i]["Worktime"].ToString());
                model.Workprogress = int.Parse(ds.Tables[0].Rows[i]["Workprogress"].ToString());
                model.Workstate    = ds.Tables[0].Rows[i]["Workstate"].ToString();
                if (ds.Tables[0].Rows[i]["sumtime"].ToString() == "")
                {
                    model.Sumtime = 0;
                }
                else
                {
                    model.Sumtime = int.Parse(ds.Tables[0].Rows[i]["sumtime"].ToString());
                }
                if (ds.Tables[0].Rows[i]["progresstime"].ToString() == "")
                {
                    model.Progresstime = 0;
                }
                else
                {
                    model.Progresstime = int.Parse(ds.Tables[0].Rows[i]["progresstime"].ToString());
                }
                model.Classse  = ds.Tables[0].Rows[i]["classse"].ToString();
                model.Remark   = ds.Tables[0].Rows[i]["remark"].ToString();
                model.Newnote  = ds.Tables[0].Rows[i]["newnote"].ToString();
                model.Filepath = ds.Tables[0].Rows[0]["filepath"].ToString();
                model.Question = ds.Tables[0].Rows[0]["Question"].ToString();

                list.Add(model);
            }
            return(list);
        }
コード例 #8
0
        public List<Entity.TaskEntity> getpage(int pageSize, int pageNum, out int count, string str)
        {
            string select, table, where, order;

            select = " *,(case when (Workprogress= 1) then '新的任务' when (Workprogress= 2) then '正在办理' when (Workprogress= 3) then '已经完成' when (Workprogress= 4) then '验收未完成' when (Workprogress= 5) then '提前完成' when (Workprogress= 6) then '按时完成' when (Workprogress= 7) then '未完成' when (Workprogress= 8) then '重新申请时间' when (Workprogress= 9) then '拒收' end) as Workstate ";

            table = "[OA_Task] ";

            StringBuilder sb = new StringBuilder();
            sb.Append(" ( 1 = 1 ) " + str);

            where = sb.ToString();

            order = "Tlid";

            string sql = "exec Pagination @select, @table, @where, @orderField, @orderType, @pageSize, @pageNum ";

            SqlParameter[] paras ={
                new SqlParameter("@select",     select),
                new SqlParameter("@table",      table),
                new SqlParameter("@where",      where),
                new SqlParameter("@orderField", order),
                new SqlParameter("@orderType",  '1'),
                new SqlParameter("@pageSize",   pageSize),
                new SqlParameter("@pageNum",    pageNum)
            };

            DataSet ds = DbHelperSQL.Query(sql, paras);

            count = Convert.ToInt32(ds.Tables[1].Rows[0][0]);

            List<Entity.TaskEntity> list = new List<Entity.TaskEntity>();
            Entity.TaskEntity model;

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                model = new Entity.TaskEntity();

                if (ds.Tables[0].Rows[i]["Tlid"].ToString() != "")
                {
                    model.Tlid = int.Parse(ds.Tables[0].Rows[i]["Tlid"].ToString());
                }
                model.Nowtime = Convert.ToDateTime(ds.Tables[0].Rows[i]["Nowtime"].ToString());
                model.Manager = ds.Tables[0].Rows[i]["Manager"].ToString();
                model.Plantime = Convert.ToDateTime(ds.Tables[0].Rows[i]["Plantime"].ToString());
                model.Tasktitle = ds.Tables[0].Rows[i]["Tasktitle"].ToString();
                model.Uid = Convert.ToInt32(ds.Tables[0].Rows[i]["Uid"].ToString());
                model.Worktime = Convert.ToDateTime(ds.Tables[0].Rows[i]["Worktime"].ToString());
                model.Workprogress = int.Parse(ds.Tables[0].Rows[i]["Workprogress"].ToString());
                model.Workstate = ds.Tables[0].Rows[i]["Workstate"].ToString();
                if (ds.Tables[0].Rows[i]["sumtime"].ToString() == "")
                    model.Sumtime = 0;
                  else
                    model.Sumtime = int.Parse(ds.Tables[0].Rows[i]["sumtime"].ToString());
                if (ds.Tables[0].Rows[i]["progresstime"].ToString() == "")
                    model.Progresstime = 0;
                else
                model.Progresstime = int.Parse(ds.Tables[0].Rows[i]["progresstime"].ToString());
                model.Classse = ds.Tables[0].Rows[i]["classse"].ToString();
                model.Remark = ds.Tables[0].Rows[i]["remark"].ToString();
                model.Newnote = ds.Tables[0].Rows[i]["newnote"].ToString();
                model.Filepath = ds.Tables[0].Rows[0]["filepath"].ToString();
                model.Question = ds.Tables[0].Rows[0]["Question"].ToString();

                list.Add(model);
            }
            return list;
        }