예제 #1
0
        protected void ShowInitInfo(string ID)
        {
            try
            {
                string    sql = " SELECT * FROM vBudget_Todo_List WHERE id='" + common.SafeString(ID) + "' order by id";
                DataTable DT  = new DataTable();
                DT = pageControl.doSql(sql).Tables[0];
                if (DT.Rows.Count > 0)
                {
                    //预算名称
                    LB_Name.Text = DT.Rows[0]["BudgetName"].ToString();
                    //项目负责人
                    //LB_Managers.Text = DT.Rows[0]["ManagerIds"].ToString();
                    //审批人
                    LB_Approver.Text = DT.Rows[0]["Approver"].ToString();
                    //预算经费编号
                    LB_BudgetCode.Text = DT.Rows[0]["Code"].ToString();
                    //预算经费
                    LB_LimitNumbers.Text = DT.Rows[0]["Balance"].ToString();
                    //总余额
                    LB_YEBalance.Text = DT.Rows[0]["KYBalance"].ToString();
                    //预算开始时间
                    LB_StartTime.Text = DT.Rows[0]["StartTime"].ToString();
                    //预算结束时间
                    LB_EndTime.Text = DT.Rows[0]["EndTime"].ToString();
                    //项目负责人
                    LB_Managers.Text = userExt.GetUserRealNamesByIds(DT.Rows[0]["ManagerIds"].ToString(), ',');
                    //所属部门
                    LB_Department.Text = userGroupExt.GetGroupNamesByIds(DT.Rows[0]["DepartmentIds"].ToString());
                    //所属专项资金
                    //LB_SpecialFundsName.Text = DT.Rows[0]["SpecialFundsName"].ToString();
                    //所属帐户
                    //LB_AccountName.Text = DT.Rows[0]["AccountName"].ToString();
                    //所属预算报告
                    //LB_SFOrderName.Text = "<a href='" + DT.Rows[0]["BudgetList"].ToString() + "' target='_blank'>" + DT.Rows[0]["SFOrderName"].ToString() + "</a>";

                    //LB_Info.Text = "&nbsp;可用金额调整情况:<br>" + DT.Rows[0]["TEMP0"].ToString();


                    //DList_YSJE.DataSource = DT;
                    //DList_YSJE.DataBind();
                    //DList_YSJE.RepeatColumns = DT.Rows.Count;

                    //DList_KYJE.DataSource = DT;
                    //DList_KYJE.DataBind();
                    //DList_KYJE.RepeatColumns = DT.Rows.Count;

                    //DList_DQYE.DataSource = DT;
                    //DList_DQYE.DataBind();
                    //DList_DQYE.RepeatColumns = DT.Rows.Count;
                }
                else
                {
                    LB_MSG.Text = "暂无该待办预算的相关信息!";
                }
            }
            catch (Exception e)
            {
            }
        }
예제 #2
0
        protected void btnApply_Click(object sender, EventArgs e)
        {
            string    id     = ((LinkButton)sender).CommandArgument.ToString();
            string    strSQL = "SELECT LeaderID From Project_Projects Where ID=" + common.SafeString(id);
            DataTable dt     = new DataTable();

            dt = pageControl.doSql(strSQL).Tables[0];
            if (dt.Rows.Count > 0)
            {
                string LeaderID = dt.Rows[0]["LeaderID"].ToString();
                if (LeaderID == ((Model.USER_Users)Session["USER_Users"]).ID)
                {
                    Response.Redirect("/Admin/personalProjectManage/OAapply/add.aspx?apply=true");
                }
            }
            strSQL = "Select UserID From Project_UserList Where Status=1 and ProjectID=" + common.SafeString(id);
            dt     = new DataTable();
            dt     = pageControl.doSql(strSQL).Tables[0];
            if (dt.Rows.Count > 0)
            {
                if ((dt.Select("UserID='" + ((Model.USER_Users)Session["USER_Users"]).ID + "'")).Length > 0)
                {
                    Response.Redirect("/Admin/personalProjectManage/OAapply/add.aspx?apply=true");
                }
            }
            string coutws = "<script language=\"javascript\" type=\"text/javascript\">alert(\"您没有相应的权限!现在进入部门首页面\"); location.href = \"department_Index.aspx" + "\";</script>";

            Response.Write(coutws);
        }
예제 #3
0
 //清空当前项目ID
 protected void DelUser(string ProjectId)
 {
     try
     {
         string strsql = "Delete from Personal_Plan_Limits where userid ='" + common.SafeString(ProjectId) + "'";
         pagedosql.doSql(strsql);
     }
     catch (Exception)
     {
     }
 }
예제 #4
0
 //清空当前项目ID
 protected void DelUser(string ProjectId)
 {
     try
     {
         string strsql = "Delete from Project_userList where projectID ='" + common.SafeString(ProjectId) + "'";
         pagedosql.doSql(strsql);
     }
     catch (Exception)
     {
     }
 }
예제 #5
0
        protected void ShowInitInfo(string ID)
        {
            try
            {
                string    sql = " SELECT * FROM vCash_CardsDetail WHERE CardID='" + common.SafeString(ID) + "' order by id";
                DataTable DT  = new DataTable();
                DT = pageControl.doSql(sql).Tables[0];
                if (DT.Rows.Count > 0)
                {
                    //资金卡名称
                    LB_Name.Text = DT.Rows[0]["CardName"].ToString();
                    //所属项目
                    LB_Project.Text = DT.Rows[0]["ProjectName"].ToString();
                    //持卡人
                    LB_Holder.Text = DT.Rows[0]["HolderRealName"].ToString();
                    //审批人
                    LB_Checker.Text = DT.Rows[0]["CheckRealName"].ToString();
                    //资金卡编号
                    LB_CardNum.Text = DT.Rows[0]["CardNum"].ToString();
                    //所属专项资金
                    LB_SpecialFundsName.Text = DT.Rows[0]["SpecialFundsName"].ToString();
                    //所属帐户
                    LB_AccountName.Text = DT.Rows[0]["AccountName"].ToString();
                    //所属预算报告
                    LB_SFOrderName.Text = "<a href='" + DT.Rows[0]["BudgetList"].ToString() + "' target='_blank'>" + DT.Rows[0]["SFOrderName"].ToString() + "</a>";

                    LB_Info.Text = "&nbsp;可用金额调整情况:<br>" + DT.Rows[0]["TEMP0"].ToString();

                    DList_YSJE.DataSource = DT;
                    DList_YSJE.DataBind();
                    DList_YSJE.RepeatColumns = DT.Rows.Count;

                    DList_KYJE.DataSource = DT;
                    DList_KYJE.DataBind();
                    DList_KYJE.RepeatColumns = DT.Rows.Count;

                    DList_DQYE.DataSource = DT;
                    DList_DQYE.DataBind();
                    DList_DQYE.RepeatColumns = DT.Rows.Count;
                }
                else
                {
                    LB_MSG.Text = "暂无该资金卡的相关信息!";
                }
            }
            catch
            { }
        }
예제 #6
0
 protected void ShowInitInfo(string ID)
 {
     try
     {
         string    sql = " SELECT * FROM vBudget_Department_List WHERE id='" + common.SafeString(ID) + "' order by id";
         DataTable DT  = new DataTable();
         DT = pageControl.doSql(sql).Tables[0];
         if (DT.Rows.Count > 0)
         {
             //预算名称
             LB_Name.Text = DT.Rows[0]["BudgetName"].ToString();
             //所属项目
             LB_ParentBudget.Text = DT.Rows[0]["ParentBudgetName"].ToString();
             //项目负责人
             LB_Managers.Text = DT.Rows[0]["ManagerIds"].ToString();
             //审批人
             LB_Approver.Text = DT.Rows[0]["Approver"].ToString();
             //预算经费编号
             LB_BudgetCode.Text = DT.Rows[0]["Code"].ToString();
             //预算经费
             LB_LimitNumbers.Text = DT.Rows[0]["Balance"].ToString();
             //总余额
             LB_YEBalance.Text = DT.Rows[0]["KYBalance"].ToString();
             //预算开始时间
             LB_StartTime.Text = DT.Rows[0]["StartTime"].ToString();
             //预算结束时间
             LB_EndTime.Text = DT.Rows[0]["EndTime"].ToString();
             //项目负责人
             LB_Managers.Text = userExt.GetUserRealNamesByIds(DT.Rows[0]["ManagerIds"].ToString(), ',');
             //所属部门
             //LB_Department.Text = userGroupExt.GetGroupNamesByIds(DT.Rows[0]["DepartmentIds"].ToString());
         }
         else
         {
             LB_MSG.Text = "暂无该预算的相关信息!";
         }
     }
     catch (Exception e)
     {
     }
 }
        /// <summary>
        /// 资金卡
        /// </summary>
        public void Show_DDList_Cards()
        {
            DataTable dt     = new DataTable();
            string    strSQL = "select cast(ID as varchar(10))+'|'+cast(AccountID as varchar(10)) ID, CardName from vCash_Cards where Statas='使用中' and CardholderID='" + common.SafeString(UserID) + "' and AccountSTATUS=1";

            dt = pagecontrol.doSql(strSQL).Tables[0];

            if (dt.Rows.Count > 0)
            {
                DDList_Cards.DataSource     = dt;
                DDList_Cards.DataTextField  = "CardName";
                DDList_Cards.DataValueField = "ID";
                DDList_Cards.DataBind();
            }
        }
예제 #8
0
        protected void BindData()
        {
            try
            {
                string sqlAll = " select a.CardID,a.CardName as CardName , a.HolderRealName , ";
                sqlAll += " (max(case a.DetailName when '劳务费' then a.Balance else 0 end)+ ";
                sqlAll += " max(case a.DetailName when '餐费' then a.Balance else 0 end)+  ";
                sqlAll += " max(case a.DetailName when '资料费' then a.Balance else 0 end)+ ";
                sqlAll += " max(case a.DetailName when '会务费' then a.Balance else 0 end)+ ";
                sqlAll += " max(case a.DetailName when '交通费' then a.Balance else 0 end)+ ";
                sqlAll += " max(case a.DetailName when '其他' then a.Balance else 0 end)) as BalanceAll , ";
                sqlAll += " (max(case a.DetailName when '劳务费' then a.Oldbalance else 0 end)+ ";
                sqlAll += " max(case a.DetailName when '餐费' then a.Oldbalance else 0 end)+ ";
                sqlAll += " max(case a.DetailName when '资料费' then a.Oldbalance else 0 end)+ ";
                sqlAll += " max(case a.DetailName when '会务费' then a.Oldbalance else 0 end)+ ";
                sqlAll += " max(case a.DetailName when '交通费' then a.Oldbalance else 0 end)+ ";
                sqlAll += " max(case a.DetailName when '其他' then a.Oldbalance else 0 end)) as OldbalanceAll ";
                sqlAll += " from vCash_CardsDetail as a ";
                if (!string.IsNullOrEmpty(snm))
                {
                    sqlAll += " where a.CardName like '%" + snm + "%' ";
                }
                sqlAll += " group by CardID,CardName,HolderRealName ";
                sqlAll += " order by CardID desc ";


                string sTable = " ( ";
                sTable += " select a.CardID,a.CardName as CardName , a.HolderRealName ,  ";
                sTable += " (max(case a.DetailName when '劳务费' then a.Balance else 0 end)+ ";
                sTable += " max(case a.DetailName when '餐费' then a.Balance else 0 end)+   ";
                sTable += " max(case a.DetailName when '资料费' then a.Balance else 0 end)+  ";
                sTable += " max(case a.DetailName when '会务费' then a.Balance else 0 end)+  ";
                sTable += " max(case a.DetailName when '交通费' then a.Balance else 0 end)+  ";
                sTable += " max(case a.DetailName when '其他' then a.Balance else 0 end)) as BalanceAll , ";
                sTable += " (max(case a.DetailName when '劳务费' then a.Oldbalance else 0 end)+  ";
                sTable += " max(case a.DetailName when '餐费' then a.Oldbalance else 0 end)+  ";
                sTable += " max(case a.DetailName when '资料费' then a.Oldbalance else 0 end)+  ";
                sTable += " max(case a.DetailName when '会务费' then a.Oldbalance else 0 end)+  ";
                sTable += " max(case a.DetailName when '交通费' then a.Oldbalance else 0 end)+  ";
                sTable += " max(case a.DetailName when '其他' then a.Oldbalance else 0 end)) as OldbalanceAll  ";
                sTable += " from vCash_CardsDetail as a";
                if (!string.IsNullOrEmpty(snm))
                {
                    sTable += " where a.CardName like '%" + common.SafeString(snm) + "%' ";
                }
                sTable += " group by CardID,CardName,HolderRealName ";
                sTable += " ) ";

                string swhere = " 1=1 ";

                DataTable DT = new DataTable();
                DT = GetDatePaging(pageSize, int.Parse(nowPaging), sTable, "*", "CardID", swhere, "", "", "CardID desc");
                this.GridView2.DataSource = DT;
                this.GridView2.DataBind();


                ShowPaging(sqlAll);
            }
            catch
            { }
        }
예제 #9
0
        /// <summary>
        /// 加载所属项目列表(对于上传预算报告来说,所属项目只能是“我负责的项目”和“我创建的项目”)
        /// </summary>
        protected void ShowProjectList(string userid)
        {
            try
            {
                DataTable DT = new DataTable();
                //我负责的项目与我创建的项目(SendUserID=userid表示我创建的,LeaderID=userid表示我负责的)
                string sql1 = " SELECT * FROM vProject_Projects WHERE (SendUserID='" + common.SafeString(userid) + "' OR LeaderID='" + common.SafeString(userid) + "')  and DELFLAG=0    and (Status=1 or Status=3)";

                DT = pageControl.doSql(sql1).Tables[0];

                if (DT.Rows.Count > 0)
                {
                    DDL_Project.DataSource     = DT;
                    DDL_Project.DataValueField = "ID";
                    DDL_Project.DataTextField  = "NAMES";
                    DDL_Project.DataBind();
                }
                else
                {
                    ListItem li = new ListItem("-暂无可选项目-", "");
                    DDL_Project.Items.Add(li);
                }
            }
            catch
            { }
        }
예제 #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string urls = Request.Url.AbsoluteUri.ToString();

            if (urls.Contains("isshownews=1"))
            {
                if (!IsPostBack)
                {
                    string id = Request["id"].ToString();
                    if (String.IsNullOrEmpty(id))
                    {
                        this.Label_NAME.Text = "信息已经被删除!";
                        return;
                    }
                    DataTable dt     = new DataTable();
                    string    strSQL = "Select ID From News_News WHERE DELFLAG=0 and ID=" + common.SafeString(id);
                    dt = pageControl.doSql(strSQL).Tables[0];
                    if (dt.Rows.Count < 1)
                    {
                        this.Label_NAME.Text = "信息已经被删除!";
                        return;
                    }
                    BindData(id);
                    UpdateData(id);
                }
            }
            else
            {
                urls = urls + "&isshownews=1";
                Response.Redirect(urls);
            }
        }
예제 #11
0
 protected void ShowInitInfo(string ID)
 {
     try
     {
         string    sql = " SELECT BudgetName,Code FROM vBudget_Department_List WHERE parentId='" + common.SafeString(ID) + "' order by id";
         DataTable DT  = new DataTable();
         DT = pageControl.doSql(sql).Tables[0];
         if (DT.Rows.Count > 0)
         {
             //预算名称
             LB_Name.Text = DT.Rows[0]["BudgetName"].ToString();
             //预算经费编号
             LB_BudgetCode.Text = DT.Rows[0]["Code"].ToString();
         }
         else
         {
             //LB_MSG.Text = "暂无该父项目经费明细的相关信息!";
         }
     }
     catch (Exception e)
     {
     }
 }
예제 #12
0
 private void GetddlProjectID()
 {
     try
     {
         DataTable dt = new DataTable();
         //string strSQL = "Select distinct(ProjectID),ProjectName From vProject_UserList Where ProjectID=" + _projectid;
         string strSQL = "Select distinct(ID) as ProjectID,NAMES as ProjectName From Project_Projects Where ID=" + common.SafeString(_projectid);
         dt = pageControl.doSql(strSQL).Tables[0];
         if (dt.Rows.Count > 0)
         {
             this.ddlProjectID.DataSource     = dt;
             this.ddlProjectID.DataTextField  = "ProjectName";
             this.ddlProjectID.DataValueField = "ProjectID";
             this.ddlProjectID.DataBind();
             Button_sumbit.Enabled = true;
         }
         else
         {
             Button_sumbit.Enabled = false;
         }
     }
     catch
     {
         Button_sumbit.Enabled = false;
     }
 }
예제 #13
0
        /// <summary>
        /// 点击确定触发事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Button_sumbit_onclick(object sender, EventArgs e)
        {
            try
            {
                //项目ID
                string projectid = common.cleanXSS(Request["ID"]);
                project_model = project_bll.GetModel(int.Parse(projectid.ToString()));
                Model.USER_Users user_model = (Model.USER_Users)Session["USER_Users"];
                string           checkvalue = RadioButtonList_Check.SelectedValue.ToString();
                string           flag       = "";

                string urls = "";           //接受审核通过和不通过的地址:审核通过,到项目文档中,审核不通过到只做提示

                if (checkvalue.Equals("1")) //表示审核通过
                {
                    flag = "审核通过";
                    //预算表单的审核状态
                    project_model.TEMP1 = "1";

                    //如果审核通过将上传的预算表单保存到项目的目录中
                    string    sql = "SELECT ID FROM Document_Folder WHERE (ProjectID = '" + common.SafeString(projectid) + "') AND (UpID = 38)  and delflag='0'";
                    DataTable dt  = pageControl.doSql(sql).Tables[0];

                    if (dt.Rows.Count > 0)
                    {
                        string id = dt.Rows[0]["ID"].ToString();
                        //如果审核通过将上传的预算表单保存到项目的目录中
                        if (null != project_model.BudgetList && !(project_model.BudgetList.ToString().Equals("")))
                        {
                            setAttachmentsToDocument(user_model.ID, id, project_model.BudgetList.ToString());
                        }
                    }

                    //选择资金卡
                    DataSet ds1 = cashmessage_bll.GetList(" ProjectID = " + project_model.ID);
                    DataSet ds2 = card_bll.GetList(" ProjectID = " + project_model.ID);

                    if (RB_CashCardID.Checked == true)//如果选择的是资金卡则设为资金卡的ID;
                    {
                        //如果在资金卡中以前本身就有该项目的。。则要将原来的该项目的资金卡的项目ID设空
                        if (ds2.Tables[0].Rows.Count > 0)
                        {
                            for (int i = 0; i < ds2.Tables[0].Rows.Count; i++)
                            {
                                Model.Cash_Cards card_model1 = new Dianda.Model.Cash_Cards();
                                BLL.Cash_Cards   card_bll1   = new Dianda.BLL.Cash_Cards();

                                string id = ds2.Tables[0].Rows[i]["ID"].ToString();
                                card_model1 = card_bll1.GetModel(int.Parse(id));

                                card_model1.ProjectID = null;
                                card_bll1.Update(card_model1);
                            }
                        }

                        //资金卡ID
                        string cashcardid = DDL_CashCardID.SelectedValue.ToString();
                        card_model = card_bll.GetModel(int.Parse(cashcardid));
                        //将资金卡表中的项目ID改成当前项目
                        card_model.ProjectID = int.Parse(projectid);

                        card_bll.Update(card_model);
                    }
                    else//如果选择的是新建资金卡则设为0,并且需要向cash_message表中加一条记录
                    {
                        project_model.CashCardID = 0;

                        //如果原来就有记录,则修改
                        if (ds1.Tables[0].Rows.Count > 0)
                        {
                            //ID
                            string cashid = ds1.Tables[0].Rows[0]["ID"].ToString();
                            cashmessage_model = cashmessage_bll.GetModel(int.Parse(cashid));
                            //资金卡初始金额
                            cashmessage_model.LimitNums = Convert.ToDecimal(TB_LimitNums.Text);
                            //新建备注说明
                            cashmessage_model.Notes = TB_Notes.Text.ToString();

                            cashmessage_bll.Update(cashmessage_model);
                        }
                        else
                        {
                            //资金卡名称(暂时写的留空)
                            cashmessage_model.CardName = "";
                            //持卡人
                            cashmessage_model.CardholderID = project_model.SendUserID.ToString();
                            //项目的ID
                            cashmessage_model.ProjectID = project_model.ID;
                            //初始金额
                            cashmessage_model.LimitNums = Convert.ToDecimal(TB_LimitNums.Text.ToString());
                            //填写的时间
                            cashmessage_model.DATETIME = Convert.ToDateTime(DateTime.Now.ToString());
                            //发出这个消息的用户的ID
                            cashmessage_model.SendUserID = user_model.ID;
                            //备注说明
                            cashmessage_model.Notes = TB_Notes.Text.ToString();
                            //是否已经阅读
                            cashmessage_model.IsRead = 0;
                            //消息的状态
                            cashmessage_model.Status = 1;

                            Session["Cash_Message_temps"] = cashmessage_model;

                            //向信息表中添加一条新建资金卡的记录
                            cashmessage_bll.Add(cashmessage_model);
                        }
                    }
                    BLL.Document_Folder          bllFolder  = new Dianda.BLL.Document_Folder();
                    List <Model.Document_Folder> folderlist = bllFolder.GetModelList("UpID='38' and Types='public' and ProjectID='" + projectid + "' and delflag='0'");
                    if (folderlist.Count > 0)
                    {
                        urls = "<a href='/Admin/DocumentManage/manage.aspx?CID=" + folderlist[0].COLUMNSPATH.ToString() + "&tp=1' target='_self' title='预算表单审核:审核时间" + DateTime.Now.ToString() + "'>" + project_model.NAMES.ToString() + "  预算表单  " + flag + "</a>";
                    }
                    else
                    {
                        urls = project_model.NAMES.ToString() + "  预算表单  " + flag;
                    }
                }
                else
                {
                    flag = "审核不通过";
                    //预算表单的审核状态
                    project_model.TEMP1 = "2";

                    urls = project_model.NAMES.ToString() + "  预算表单  " + flag;
                }

                project_bll.Update(project_model);


                //给业务申请者发信息
                Model.FaceShowMessage mFaceShowMessage = new Dianda.Model.FaceShowMessage();
                BLL.FaceShowMessage   bFaceShowMessage = new Dianda.BLL.FaceShowMessage();

                mFaceShowMessage.DATETIME  = DateTime.Now;
                mFaceShowMessage.FromTable = "申请情况";
                mFaceShowMessage.IsRead    = 0;
                mFaceShowMessage.NewsID    = null;
                mFaceShowMessage.NewsType  = "申请情况";
                mFaceShowMessage.ReadTime  = null;
                mFaceShowMessage.DELFLAG   = 0;
                mFaceShowMessage.ProjectID = project_model.ID;
                mFaceShowMessage.Receive   = project_model.SendUserID.ToString();//当前项目的创建人的ID
                mFaceShowMessage.URLS      = urls;

                //mFaceShowMessage.URLS = "<a href='/Admin/budgetManage/manage.aspx?role=manager&Status=" + project_model.TEMP1 + "' target='_self' title='预算表单审核:审核时间" + DateTime.Now.ToString() + "'>" + project_model.NAMES.ToString() + "  预算表单  " + flag + "</a>";

                bFaceShowMessage.Add(mFaceShowMessage);
                //给业务申请者发信息



                ScriptManager.RegisterStartupScript(this, this.GetType(), "ok", "<script>alert('操作成功!现在进入列表页面');javascript:location='manage.aspx?pageindex=" + Request["pageindex"] + "&Status=" + Request["Status"] + "&role=manager';</script>", false);


                //添加操作日志

                Dianda.BLL.SYS_LogsExt bsyslog = new Dianda.BLL.SYS_LogsExt();
                bsyslog.addlogs(user_model.REALNAME + "(" + user_model.USERNAME + ")", "预算管理", project_model.NAMES + " 预约表单" + flag);

                //添加操作日志
            }
            catch
            {
            }
        }
예제 #14
0
        /// <summary>
        /// 按部门将所有的用户呈现,并且将已经选择的用户selectUser在列表上显示出来
        /// </summary>
        /// <param name="selectUser"></param>
        public void showDepartment(string projectId)
        {
            try
            {
                //获取到部门ID
                mProjects = bProjects.GetModel(int.Parse(projectId));
                //通过方法 用逗号把部门ID分开
                string strdepartmentId = commonId.makeSqlIn(mProjects.DepartmentID, ',');
                //查询出部门中status =1 并且delflag=0 的用户
                string    sql = "SELECT  * FROM vProject_UserList WHERE (DELFLAG = '0') and status='1'and ProjectID='" + projectId + "' ORDER BY DepartMentID";
                DataTable dt1 = pagedosql.doSql(sql).Tables[0];

                if (dt1.Rows.Count > 0)
                {
                    Label_tongji.Text = "此项目中共有参与人员&nbsp;" + dt1.Rows.Count.ToString() + "&nbsp;人";
                }
                else
                {
                    Label_tongji.Text = "此项目中没有参与人员";
                }


                //通过部门ID 查看部门里有多少人员
                string[] strdepartmentId_arr = mProjects.DepartmentID.Split(',');
                string   strsql = "";
                for (int i = 0; i < strdepartmentId_arr.Length; i++)
                {
                    if (strsql == "")
                    {
                        strsql = "select id,realName,userName,'" + strdepartmentId_arr[i] + "' departmentid from USER_Users where departmentid like '%" + strdepartmentId_arr[i] + "%'";
                    }
                    else
                    {
                        strsql += " union select id,realName,userName,'" + strdepartmentId_arr[i] + "'departmentid from USER_Users where departmentid like '%" + strdepartmentId_arr[i] + "%'";
                    }
                }

                //string strsql = "select id,realName,userName,departmentid from USER_Users where departmentid in " + strdepartmentId;
                DataTable dt = pagedosql.doSql(strsql).Tables[0];

                Session["temp_UserAllUser_session"] = dt;
                Session["temp_SelectUser_session"]  = dt1;

                //查询出传进来的部门ID
                DataTable dt2 = new DataTable();
                dt2 = bug.GetList(" TAGS='部门' and DELFLAG='0' and id in " + common.SafeString(strdepartmentId) + " order by ISMOREN").Tables[0];
                if (dt.Rows.Count > 0)
                {
                    GridView_grouplist.DataSource = dt2;
                    GridView_grouplist.DataBind();
                    GridView_grouplist.Visible = true;
                }
                else
                {
                    GridView_grouplist.Visible = false;
                }
            }
            catch
            {
            }
        }
예제 #15
0
        /// <summary>
        ///点击确定按钮触发的事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Button_sumbit_Click(object sender, EventArgs e)
        {
            try
            {
                string NAME = this.txtNAME.Text;//获取到用户名

                mNews_News      = new Dianda.Model.News_News();
                mNews_News      = bNews_News.GetModel(Int32.Parse(Request["id"]));
                mNews_News.NAME = txtNAME.Text;
                //mNews_News.PARENTID = Int32.Parse(ddlPARENTID.SelectedValue);
                mNews_News.DATETIME = DateTime.Now;
                mNews_News.CONTENTS = this.hid.Value;
                // mNews_News.TYPE = 0;
                mNews_News.KEYWORD = txtNAME.Text;
                mNews_News.WRITER  = ((Model.USER_Users)Session["USER_Users"]).USERNAME;
                //mNews_News.FILEUP = "";//上传附件/AllFileUp/admin/news/目录下
                mNews_News.UPTOP        = 0;
                mNews_News.DELFLAG      = 0;
                mNews_News.ISPASS       = 0;//是否通过审核(默认0,1表示通过审核,2表示审核不通过)添加新闻时,需要根据选择栏目的审核设定进行赋值
                mNews_News.LimitsChoose = Int32.Parse(this.rblLimitsChoose.SelectedValue);
                bNews_News.Update(mNews_News);

                string strSQL = "DELETE FROM News_LimitUser WHERE NewsID=" + common.cleanXSS(Request["id"]);
                pageControl.doSql(strSQL);


                string NEWS = "";
                if (Request["PARENTID"] == "3")
                {
                    NEWS = "部门消息";
                }
                else if (Request["PARENTID"] == "4")
                {
                    NEWS = "个人消息";
                }
                else if (Request["PARENTID"] == "5")
                {
                    NEWS = "通知公告";
                }

                // 添加News_LimitUser
                ArrayList arrUserID = UserManage1.getSelectUser();

                // 清除旧信息
                string strSQL2 = "Update FaceShowMessage set Delflag=1 Where NewsType='" + common.SafeString(NEWS) + "' and URLS like '%id=" + common.cleanXSS(Request["id"]) + "''%'";
                pageControl.doSql(strSQL2);

                if (arrUserID.Count > 0)
                {
                    for (int k = 0; k < arrUserID.Count; k++)
                    {
                        mNews_LimitUser        = new Dianda.Model.News_LimitUser();
                        mNews_LimitUser.ID     = bNews_LimitUser.GetMaxId();
                        mNews_LimitUser.UserID = arrUserID[k].ToString();
                        mNews_LimitUser.NewsID = Int32.Parse(Request["id"]);
                        mNews_LimitUser.IsRead = 0;
                        bNews_LimitUser.Add(mNews_LimitUser);

                        /*给业务申请者发信息*/
                        Model.FaceShowMessage mFaceShowMessage = new Dianda.Model.FaceShowMessage();
                        BLL.FaceShowMessage   bFaceShowMessage = new Dianda.BLL.FaceShowMessage();

                        mFaceShowMessage.DATETIME  = DateTime.Now;
                        mFaceShowMessage.FromTable = NEWS;
                        mFaceShowMessage.IsRead    = 0;
                        mFaceShowMessage.NewsID    = null;
                        mFaceShowMessage.NewsType  = NEWS;
                        mFaceShowMessage.ReadTime  = null;
                        mFaceShowMessage.Receive   = arrUserID[k].ToString();
                        mFaceShowMessage.DELFLAG   = 0;

                        //mFaceShowMessage.URLS = ((Model.USER_Users)Session["USER_Users"]).REALNAME + "(" + ((Model.USER_Users)Session["USER_Users"]).USERNAME.ToString() + ")给您发送了[" + NEWS + "]!<a href='/Admin/newsManage/OAnews/show.aspx?id=" + intMaxID + "' target='_self' rel='gb_page_center[726,400]' title='查看详细'>点击查看</a>";
                        mFaceShowMessage.URLS = "<a href=\"javascript:window.showModalDialog('/Admin/newsManage/OAnews/show.aspx?id=" + Request["id"] + "','','dialogWidth=726px;dialogHeight=400px');\" target='_self' title='发布时间:" + DateTime.Now.ToString() + "'>" + NEWS + ":" + NAME + "</a>  (" + ((Model.USER_Users)Session["USER_Users"]).REALNAME.ToString() + ")";

                        bFaceShowMessage.Add(mFaceShowMessage);
                        /*给业务申请者发信息*/
                    }
                }
                //tag.Text = "操作成功!";
                string coutws = "<script language=\"javascript\" type=\"text/javascript\">alert(\"操作成功!现在进入列表页面\"); location.href = \"manage.aspx?PARENTID=" + Request["PARENTID"] + "&pageindex=" + Request["pageindex"] + "&status=" + Request["status"] + "\";</script>";
                Response.Write(coutws);

                //添加操作日志
                Dianda.BLL.SYS_LogsExt bsyslog    = new Dianda.BLL.SYS_LogsExt();
                Model.USER_Users       user_model = (Model.USER_Users)Session["USER_Users"];
                bsyslog.addlogs(((Model.USER_Users)Session["USER_Users"]).REALNAME + "(" + ((Model.USER_Users)Session["USER_Users"]).USERNAME + ")", "添加新闻", "添加成功");
                //添加操作日志
            }
            catch
            {
                tag.Text = "操作失败,请重试!";
            }
        }
예제 #16
0
        private void BindData(string id)
        {
            DataTable DT     = new DataTable();
            string    strSQL = "Select * From vCash_Apply_History Where CashCertificateID=" + common.SafeString(id);

            DT = pageControl.doSql(strSQL).Tables[0];
            if (DT.Rows.Count > 0)
            {
                RowChangeCell(DT);

                LB_MSG.Text = "";
            }
            else
            {
                GridView1.Visible = false;
                notice.Text       = "该资金卡暂无记帐的操作记录!";
            }
        }