Пример #1
0
    public string ShowName(object o)
    {
        string a = string.Empty;

        Tunnel.BLL.Tunnel_menber   tm  = new Tunnel.BLL.Tunnel_menber();
        Tunnel.Model.Tunnel_menber tmm = new Tunnel.Model.Tunnel_menber();
        tmm = tm.GetModel(Convert.ToInt64(o.ToString()));
        if (tmm != null)
        {
            a = tmm.m_name;
        }
        return(a);
    }
Пример #2
0
    /// <summary>
    /// 显示用户真实姓名
    /// </summary>
    /// <param name="Id">用户Id</param>
    /// <returns></returns>
    public string ShowUserName(string UserId)
    {
        Tunnel.BLL.Tunnel_menber   mbll  = new Tunnel.BLL.Tunnel_menber();
        Tunnel.Model.Tunnel_menber model = new Tunnel.Model.Tunnel_menber();
        model = mbll.GetModel(Convert.ToInt64(UserId));
        string strTemp = string.Empty;

        if (model != null)
        {
            strTemp = model.m_name;
        }
        return(strTemp);
    }
Пример #3
0
    public static string GetName(object o)
    {
        string temp = "";

        Tunnel.BLL.Tunnel_menber tm = new Tunnel.BLL.Tunnel_menber();
        if (!string.IsNullOrEmpty(Convert.ToString(o)))
        {
            Tunnel.Model.Tunnel_menber tmm = tm.GetModel(Convert.ToInt64(o.ToString()));
            if (tmm != null)
            {
                temp = tmm.m_name;
            }
        }
        return(temp);
    }
Пример #4
0
    /// <summary>
    /// 得到所有权限
    /// </summary>
    public Dictionary <int, string> getAllPermission()
    {
        Dictionary <int, string> allDic = new Dictionary <int, string>();

        Tunnel.BLL.Tunnel_quanxian          tq     = new Tunnel.BLL.Tunnel_quanxian();
        List <Tunnel.Model.Tunnel_quanxian> tqList = new List <Tunnel.Model.Tunnel_quanxian>();

        if (ul.JiaoSe(ul.LoginID) == "系统管理员")
        {
            tqList = tq.GetModelList("1=1 order by q_rId asc ");
            foreach (Tunnel.Model.Tunnel_quanxian item in tqList)
            {
                allDic.Add(item.q_id, item.q_mark + "-->>" + item.q_name);
            }
        }
        else
        {
            Tunnel.BLL.Tunnel_menber   tm  = new Tunnel.BLL.Tunnel_menber();
            Tunnel.Model.Tunnel_menber tmm = new Tunnel.Model.Tunnel_menber();
            tmm = tm.GetModel(ul.LoginID);
            if (!string.IsNullOrEmpty(Convert.ToString(tmm.m_bum)))
            {
                Tunnel.BLL.Tunnel_byingshe          tb     = new Tunnel.BLL.Tunnel_byingshe();
                Tunnel.Model.Tunnel_byingshe        tbb    = new Tunnel.Model.Tunnel_byingshe();
                List <Tunnel.Model.Tunnel_byingshe> tbList = new List <Tunnel.Model.Tunnel_byingshe>();
                tbList = tb.GetModelList("by_bid = " + tmm.m_bum + "");
                if (tbList.Count > 0)
                {
                    tbb = tbList[0];
                    string byList = tbb.by_list;
                    if (byList.Length > 0)
                    {
                        string[] temp = byList.Split('|');
                        foreach (string item in temp)
                        {
                            Tunnel.Model.Tunnel_quanxian tqq = new Tunnel.Model.Tunnel_quanxian();
                            tqq = tq.GetModel(int.Parse(item));
                            if (tqq != null)
                            {
                                allDic.Add(tqq.q_id, tqq.q_mark + "-->>" + tqq.q_name);
                            }
                        }
                    }
                }
            }
        }
        return(allDic);
    }
Пример #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (!string.IsNullOrEmpty(Request.QueryString["id"]))
         {
             uid = Request.QueryString["id"].ToString();
             tmm = tm.GetModel(int.Parse(uid));
             bind();
         }
         else
         {
             Tunnel.Common.Message.Show("非法访问", "tunnel_userlist.aspx");
         }
     }
 }
Пример #6
0
 /// <summary>
 /// 得到 类型ID 和 ID
 /// </summary>
 public void getIdtypeId(ref int tmpId, ref int typeId)
 {
     if (!string.IsNullOrEmpty(Request.QueryString["uid"]))
     {
         tmpId    = Convert.ToInt32(Request.QueryString["uid"].ToString());
         tempName = "用户管理";
         Tunnel.BLL.Tunnel_menber   menberBLL   = new Tunnel.BLL.Tunnel_menber();
         Tunnel.Model.Tunnel_menber menberModel = menberBLL.GetModel(tmpId);
         tempName_TypeName = menberModel.m_name;
         typeId            = 1;
         if (!string.IsNullOrEmpty(Request.QueryString["uid"]))
         {
             GetUserAllPermission(int.Parse(Request.QueryString["uid"]));
         }
     }
     if (!string.IsNullOrEmpty(Request.QueryString["jid"]))
     {
         tmpId    = Convert.ToInt32(Request.QueryString["jid"].ToString());
         tempName = "角色管理";
         Tunnel.BLL.Tunnel_jiaose   jiaoseBLL   = new Tunnel.BLL.Tunnel_jiaose();
         Tunnel.Model.Tunnel_jiaose jiaoseModel = jiaoseBLL.GetModel(tmpId);
         tempName_TypeName   = jiaoseModel.j_name;
         this.tmpSet.Visible = false;
         typeId = 2;
     }
     if (!string.IsNullOrEmpty(Request.QueryString["did"]))
     {
         tmpId    = Convert.ToInt32(Request.QueryString["did"].ToString());
         tempName = "职位管理";
         Tunnel.BLL.Tunnel_duty   dutyBLL   = new Tunnel.BLL.Tunnel_duty();
         Tunnel.Model.Tunnel_duty dutyModel = dutyBLL.GetModel(tmpId);
         tempName_TypeName   = dutyModel.d_name;
         this.tmpSet.Visible = false;
         typeId = 3;
     }
     if (!string.IsNullOrEmpty(Request.QueryString["bid"]))
     {
         tmpId = Convert.ToInt32(Request.QueryString["bid"].ToString());
         Tunnel.BLL.Tunnel_bum   bumBLL    = new Tunnel.BLL.Tunnel_bum();
         Tunnel.Model.Tunnel_bum bumModels = bumBLL.GetModel(tmpId);
         tempName_TypeName   = bumModels.b_name;
         tempName            = "部门管理";
         this.tmpSet.Visible = false;
         typeId = 4;
     }
 }
Пример #7
0
    private void PageBind(int mailId)
    {
        Tunnel.BLL.Tunnel_mail   mail  = new Tunnel.BLL.Tunnel_mail();
        Tunnel.Model.Tunnel_mail model = new Tunnel.Model.Tunnel_mail();
        model           = mail.GetModel(mailId);
        tb_Title.Text   = "回复:" + model.m_title;
        tb_content.Text = "原信息内容:\n" + model.m_content.Replace(@"<br \>", "\n") + "\n" + model.m_time.ToString() + "\n-------------------------------\n";
        Tunnel.BLL.Tunnel_menber   menb = new Tunnel.BLL.Tunnel_menber();
        Tunnel.Model.Tunnel_menber mmol = new Tunnel.Model.Tunnel_menber();
        mmol             = menb.GetModel(model.m_from);
        tb_toname.Text   = mmol.m_name + ",";
        id_toValue.Value = model.m_from.ToString() + ",";
        string priv_name = mmol.m_name;
        long   priv_id   = mmol.m_id;
        char   d         = '"';

        td_tomail.InnerHtml = priv_name + "<IMG id=" + priv_name + priv_id + " onclick=" + "'" + "removeimg(" + d + priv_name + d + "," + d + priv_id + d + ");" + "'" + " src=" + d + "../../image/remove.png" + d + ">,";
    }
Пример #8
0
    public string GetBum(object o)
    {
        Tunnel.BLL.Tunnel_menber   tm  = new Tunnel.BLL.Tunnel_menber();
        Tunnel.Model.Tunnel_menber tmm = new Tunnel_menber();
        tmm = tm.GetModel(Convert.ToInt64(o.ToString()));
        string strTemp = string.Empty;

        if (tmm != null)
        {
            Tunnel_bum            tbb = new Tunnel_bum();
            Tunnel.BLL.Tunnel_bum tb  = new Tunnel.BLL.Tunnel_bum();
            tbb = tb.GetModel(Convert.ToInt64(tmm.m_bum.ToString()));
            if (tbb != null)
            {
                strTemp = tbb.b_name;
            }
        }
        return(strTemp);
    }
Пример #9
0
    public static string GetName(object o)
    {
        string[] temp  = null;
        string   temp1 = string.Empty;

        if (!string.IsNullOrEmpty(Convert.ToString(o)))
        {
            temp = o.ToString().Split(',');
            foreach (string item in temp)
            {
                if (!string.IsNullOrEmpty(item))
                {
                    Tunnel.BLL.Tunnel_menber   tm  = new Tunnel.BLL.Tunnel_menber();
                    Tunnel.Model.Tunnel_menber tmm = new Tunnel.Model.Tunnel_menber();
                    tmm    = tm.GetModel(Convert.ToInt64(item.ToString()));
                    temp1 += tmm.m_name + ",";
                }
            }
        }

        return(temp1);
    }
Пример #10
0
        /// <summary>
        /// 用户角色名称
        /// </summary>
        public string JiaoSe(int userId)
        {
            Tunnel.BLL.Tunnel_menber   tm  = new Tunnel_menber();
            Tunnel.Model.Tunnel_menber tmm = new Tunnel.Model.Tunnel_menber();
            tmm = tm.GetModel(Convert.ToInt64(userId.ToString()));
            string jiaose = "无角色";

            if (userId == 1)
            {
                jiaose = "系统管理员";
            }
            if (tmm.m_jiao != 0)
            {
                Tunnel_jiaose tj = new Tunnel_jiaose();
                Tunnel.Model.Tunnel_jiaose tjj = new Tunnel.Model.Tunnel_jiaose();
                tjj = tj.GetModel(Convert.ToInt64(tmm.m_jiao.ToString()));
                if (tjj != null)
                {
                    jiaose = tjj.j_name;
                }
            }
            return(jiaose);
        }
Пример #11
0
    public void ListBind()
    {
        nianyue = DropDownList1.SelectedValue;

        Tunnel.BLL.Tunnel_menber          tm     = new Tunnel.BLL.Tunnel_menber();
        Tunnel.Model.Tunnel_menber        tmm    = new Tunnel.Model.Tunnel_menber();
        List <Tunnel.Model.Tunnel_menber> tmList = new List <Tunnel.Model.Tunnel_menber>();

        Tunnel.BLL.Tunnel_work          tw     = new Tunnel.BLL.Tunnel_work();
        Tunnel.Model.Tunnel_work        tww    = new Tunnel.Model.Tunnel_work();
        List <Tunnel.Model.Tunnel_work> twList = new List <Tunnel.Model.Tunnel_work>();

        Tunnel.BLL.Tunnel_grade          tg     = new Tunnel.BLL.Tunnel_grade();
        Tunnel.Model.Tunnel_grade        tgg    = new Tunnel.Model.Tunnel_grade();
        List <Tunnel.Model.Tunnel_grade> tgList = new List <Tunnel.Model.Tunnel_grade>();

        Tunnel.BLL.Tunnel_items          ti     = new Tunnel.BLL.Tunnel_items();
        Tunnel.Model.Tunnel_items        tii    = new Tunnel.Model.Tunnel_items();
        List <Tunnel.Model.Tunnel_items> tiList = new List <Tunnel.Model.Tunnel_items>();

        Tunnel.BLL.Tunnel_check          tc     = new Tunnel.BLL.Tunnel_check();
        Tunnel.Model.Tunnel_check        tcc    = new Tunnel.Model.Tunnel_check();
        List <Tunnel.Model.Tunnel_check> tcList = new List <Tunnel.Model.Tunnel_check>();

        List <Tunnel.Model.Tunnel_ReadCheckList> trList = new List <Tunnel.Model.Tunnel_ReadCheckList>();

        tcList = tc.GetModelList("c_date='" + nianyue + "'");

        foreach (Tunnel.Model.Tunnel_check itemCheck in tcList)
        {
            Tunnel.Model.Tunnel_ReadCheckList tr    = new Tunnel.Model.Tunnel_ReadCheckList();
            List <Tunnel.Model.Tunnel_check>  clist = new List <Tunnel.Model.Tunnel_check>();

            tr.ItemsID   = Convert.ToInt32(itemCheck.c_itemsId);
            tr.ItemsName = ti.GetModel(Convert.ToInt32(itemCheck.c_itemsId)).i_name;
            tr.UserId    = Convert.ToInt32(itemCheck.c_userId);
            tr.UserName  = tm.GetModel(Convert.ToInt64(itemCheck.c_userId.ToString())).m_name;
            tgList       = tg.GetModelList("g_checkid=" + itemCheck.c_id + "");
            tr.AqscCent  = 0;
            tr.CbkzCent  = 0;
            tr.ClglCent  = 0;
            tr.DzbgzCent = 0;
            tr.GbgzCent  = 0;
            tr.GczlCent  = 0;
            tr.SbglCent  = 0;
            tr.ScjhCent  = 0;
            tr.WmsgCent  = 0;
            tr.XcgzCent  = 0;
            tr.XnzhCent  = 0;
            tr.XxgzCent  = 0;
            tr.ZhzlCent  = 0;
            if (tgList.Count > 0)
            {
                foreach (Tunnel.Model.Tunnel_grade item in tgList)
                {
                    if (tw.GetModel(Convert.ToInt32(item.g_workId)).w_workName == "成本控制")
                    {
                        tr.CbkzCent = Convert.ToSingle(item.g_cent.ToString());
                    }
                    if (tw.GetModel(Convert.ToInt32(item.g_workId)).w_workName == "虚拟账户")
                    {
                        tr.XnzhCent = Convert.ToSingle(item.g_cent.ToString());
                    }
                    if (tw.GetModel(Convert.ToInt32(item.g_workId)).w_workName == "生产计划")
                    {
                        tr.ScjhCent = Convert.ToSingle(item.g_cent.ToString());
                    }
                    if (tw.GetModel(Convert.ToInt32(item.g_workId)).w_workName == "文明施工")
                    {
                        tr.WmsgCent = Convert.ToSingle(item.g_cent.ToString());
                    }
                    if (tw.GetModel(Convert.ToInt32(item.g_workId)).w_workName == "安全生产")
                    {
                        tr.AqscCent = Convert.ToSingle(item.g_cent.ToString());
                    }
                    if (tw.GetModel(Convert.ToInt32(item.g_workId)).w_workName == "工程质量")
                    {
                        tr.GczlCent = Convert.ToSingle(item.g_cent.ToString());
                    }
                    if (tw.GetModel(Convert.ToInt32(item.g_workId)).w_workName == "设备管理")
                    {
                        tr.SbglCent = Convert.ToSingle(item.g_cent.ToString());
                    }
                    if (tw.GetModel(Convert.ToInt32(item.g_workId)).w_workName == "材料管理")
                    {
                        tr.ClglCent = Convert.ToSingle(item.g_cent.ToString());
                    }
                    if (tw.GetModel(Convert.ToInt32(item.g_workId)).w_workName == "综合治理")
                    {
                        tr.ZhzlCent = Convert.ToSingle(item.g_cent.ToString());
                    }
                    if (tw.GetModel(Convert.ToInt32(item.g_workId)).w_workName == "贯标工作")
                    {
                        tr.GbgzCent = Convert.ToSingle(item.g_cent.ToString());
                    }
                    if (tw.GetModel(Convert.ToInt32(item.g_workId)).w_workName == "宣传工作")
                    {
                        tr.XcgzCent = Convert.ToSingle(item.g_cent.ToString());
                    }
                    if (tw.GetModel(Convert.ToInt32(item.g_workId)).w_workName == "党支部工作")
                    {
                        tr.DzbgzCent = Convert.ToSingle(item.g_cent.ToString());
                    }
                    if (tw.GetModel(Convert.ToInt32(item.g_workId)).w_workName == "信息工作")
                    {
                        tr.XxgzCent = Convert.ToSingle(item.g_cent.ToString());
                    }
                }
            }

            tr.AllCent = tr.AqscCent +
                         tr.CbkzCent +
                         tr.ClglCent +
                         tr.DzbgzCent +
                         tr.GbgzCent +
                         tr.GczlCent +
                         tr.SbglCent +
                         tr.ScjhCent +
                         tr.WmsgCent +
                         tr.XcgzCent +
                         tr.XnzhCent +
                         tr.XxgzCent +
                         tr.ZhzlCent;
            trList.Add(tr);
        }
        GridView1.DataSource = trList;
        GridView1.DataBind();
    }
Пример #12
0
    void bindflow()
    {
        string bWhere = "";

        mtb = btb.GetModel(int.Parse(Request.Params["bid"]));
        mf  = bf.GetModel(mtb.b_sort);
        if (mf.f_sort == 18)
        {
            bWhere = " and e_bid<>0";
        }
        else
        {
            bWhere = "";
        }
        Page.Title = mtb.b_title;
        DataSet       ds      = bte.GetList("e_gid=" + mtb.b_id + bWhere + " order by e_id asc");
        StringBuilder text    = new StringBuilder();
        StringBuilder texttop = new StringBuilder();

        texttop.Append("<tr>");
        texttop.Append("<td align=\"center\" style=\"height: 30px; width: 10%;\">第<font color=red>1</font>步</td>");
        texttop.Append("<td align=\"left\" style=\"height: 30px; width: 20%\">&nbsp;&nbsp;发起</td>");
        texttop.Append("<td align=\"left\" style=\"height: 30%\">&nbsp;&nbsp;<strong style=\"color:Red\">" + getUname(mtb.b_user.ToString()) + "</strong> [<font color=Green>发起</font>]");
        texttop.Append("<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;发起于:" + mtb.b_time.ToString() + "</td>");
        texttop.Append("<td align=\"left\" style=\"height: 30px; width: 40%\">&nbsp;<td>");
        texttop.Append("</tr> ");
        if (mtb.b_state == 3)
        {
            nextb = ""; isend = true;
        }
        else if (mtb.b_state == 1)
        {
            string suser = "";
            if (mtb.b_suser == 0)
            {
                ul.UsbnLogin = bm.GetModel(mtb.b_user);
                DataSet dss = new DataSet();
                dss = bm.GetList("m_bum=" + ul.UsbnLogin.m_bum);
                foreach (DataRow dr in dss.Tables[0].Rows)
                {
                    if (Tunnel.BLL.Permission.IfHasPrimision(dr["m_id"].ToString(), "流程审核", "我的工作", false))
                    {
                        suser += dr["m_id"].ToString() + ",";
                    }
                }
                if (!string.IsNullOrEmpty(suser))
                {
                    text.Append("<tr>");
                    text.Append("<td align=\"center\" style=\"height: 30px; width: 10%;\">第<font color=red>2</font>步</td>");
                    text.Append("<td align=\"left\" style=\"height: 30px; width: 20%\">&nbsp;&nbsp;审核</td>");
                    text.Append("<td align=\"left\" style=\"height: 30%\">&nbsp;&nbsp;<strong style=\"color:Red\">" + getallUname(suser) + " 主办</strong> [<font color=blue>审核中</font>]");
                    text.Append("<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;开始于:" + mtb.b_time.ToString() + "</td>");
                    text.Append("<td align=\"left\" style=\"height: 30px; width: 40%\">&nbsp;&nbsp;</td>");
                    text.Append("</tr> ");
                }
                else
                {
                    text.Append("<tr>");
                    text.Append("<td align=\"center\" colspan='4' style=\"height: 30px; width: 10%;color:red\">没有设置审核人,请与管理员联系!</td>");
                    text.Append("</tr> ");
                }
            }
            else
            {
                text.Append("<tr>");
                text.Append("<td align=\"center\" style=\"height: 30px; width: 10%;\">第<font color=red>2</font>步</td>");
                text.Append("<td align=\"left\" style=\"height: 30px; width: 20%\">&nbsp;&nbsp;审核</td>");
                text.Append("<td align=\"left\" style=\"height: 30%\">&nbsp;&nbsp;<strong style=\"color:Red\">" + getUname(mtb.b_suser.ToString()) + " 主办</strong> [<font color=blue>审核中</font>]");
                text.Append("<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;开始于:" + mtb.b_time.ToString() + "</td>");
                text.Append("<td align=\"left\" style=\"height: 30px; width: 40%\">&nbsp;&nbsp;</td>");
                text.Append("</tr> ");
            }
            nextb = text.ToString();
        }
        else
        {
            if (mtb.b_state > 0)
            {
                string currbid  = Tunnel.Common.GetValue.getDataValue("Tunnel_exam", "e_nextbid", "e_gid=" + mtb.b_id + " order by e_id desc");
                string currtime = Tunnel.Common.GetValue.getDataValue("Tunnel_exam", "e_time", "e_gid=" + mtb.b_id + " order by e_id desc");
                int    currnum  = Convert.ToInt32(Tunnel.Common.GetValue.getDataValue("Tunnel_exam", "count(*)", "e_gid=" + mtb.b_id));
                if ("".Equals(currbid) || "0".Equals(currbid))
                {
                    currbid = Tunnel.Common.GetValue.getDataValue("Tunnel_step", "s_id", "s_lid=" + mtb.b_sort + " and s_num=1");
                }
                mts = ts.GetModel(Convert.ToInt32(currbid));
                string nextnum  = "";
                string nextname = "";
                string nextuser = "";
                if (mts != null)
                {
                    nextnum  = Tunnel.Common.GetValue.getDataValue("Tunnel_step", "s_num", "s_id=" + mts.s_id);
                    nextname = getname(mts.s_id.ToString());
                    nextuser = getallUname(mts.s_zid.ToString());
                }
                else
                {
                    nextname = "步骤不存在或已删除";
                    nextuser = nextnum = "无";
                }
                text.Append("<tr>");
                text.Append("<td align=\"center\" style=\"height: 30px; width: 10%;\">第<font color=red>" + (currnum + (bWhere == "" ? 2 : 1)) + "</font>步</td>");
                text.Append("<td align=\"left\" style=\"height: 30px; width: 20%\">&nbsp;&nbsp;" + "序号" + nextnum + ":" + nextname + "</td>");
                text.Append("<td align=\"left\" style=\"height: 30%\">&nbsp;&nbsp;<strong style=\"color:Red\">" + nextuser + " 主办</strong> [<font color=blue>办理中</font>]");
                text.Append("<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;开始于:" + currtime + "</td>");
                text.Append("<td align=\"left\" style=\"height: 30px; width: 40%\">&nbsp;&nbsp;</td>");
                text.Append("</tr> ");
                nextb = text.ToString();
            }
        }
        toptb = texttop.ToString();
        Repeater2.DataSource = ds;
        Repeater2.DataBind();
    }
Пример #13
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     try
     {
         System.Web.HttpFileCollection uploadFiles = Request.Files;
         System.Web.HttpPostedFile     theFile;
         for (int i = 0; i < uploadFiles.Count; i++)
         {
             theFile = uploadFiles[i];
             if (Convert.ToDouble(theFile.ContentLength) / 1024 / 1024 > 10)
             {
                 Tunnel.Common.Message.back("附件大小不能大于10MB");
                 return;
             }
             else
             {
                 continue;
             }
         }
         Tunnel.Model.Tunnel_menber tm = ul.GetUserBean(ul.LoginID);
         //下一步骤ID
         string currbid  = Tunnel.Common.GetValue.getDataValue("Tunnel_step", "s_id", "s_lid=" + Request.Params["Flow"] + " and s_num=1");
         string curruser = Tunnel.Common.GetValue.getDataValue("Tunnel_step", "s_zid", "s_lid=" + Request.Params["Flow"] + " and s_num=1");
         //如果流程没有预设步骤
         if ("".Equals(currbid))
         {
             Tunnel.Common.Message.back("本流程未预设步骤,请与管理员联系!"); return;
         }
         Tunnel.Model.Tunnel_Remind tr = new Tunnel.Model.Tunnel_Remind();
         Tunnel.BLL.Tunnel_Remind   br = new Tunnel.BLL.Tunnel_Remind();
         mf = bf.GetModel(int.Parse(Request.Params["Flow"]));
         if (mf.f_state.ToString() == "0")
         {
             isshen = true;
         }
         else
         {
             isshen = false;
         }
         if (!isshen)
         {
             //将当前步骤存入数据库表:Tunnel_exam
             Tunnel.BLL.Tunnel_exam   bte = new Tunnel.BLL.Tunnel_exam();
             Tunnel.Model.Tunnel_exam mte = new Tunnel.Model.Tunnel_exam();
             mte.e_bid     = 0;
             mte.e_endtime = DateTime.Now;
             mte.e_gid     = this.sava();
             mte.e_user    = ul.LoginID;
             mte.e_time    = DateTime.Now;
             mte.e_nextbid = Convert.ToInt32(currbid);
             bte.Add(mte);
             string[] users = curruser.Split(',');
             foreach (string user in users)
             {
                 if (!string.IsNullOrEmpty(user))
                 {
                     tr.m_title    = TextBox1.Text.Trim() + "<font color=red>(待审批)</font>";
                     tr.m_url      = "N_WorkFlow/MyApply/Apply_zSp.aspx?bid=" + mte.e_gid;
                     tr.m_touser   = Convert.ToInt32(user);
                     tr.m_time     = DateTime.Now;
                     tr.m_type     = 1;
                     tr.m_typeid   = mte.e_gid;
                     tr.m_bid      = Convert.ToInt32(currbid);
                     tr.m_callTime = Convert.ToDateTime("1800-1-1 00:00:00");
                     tr.m_isread   = 0;
                     long messge = br.Add(tr);
                 }
             }
         }
         else
         {
             int s = this.sava();
             ul.UsbnLogin = bm.GetModel(ul.LoginID);
             DataSet dss      = bm.GetList("m_bum=" + ul.UsbnLogin.m_bum);
             string  userlist = "";
             foreach (DataRow dr in dss.Tables[0].Rows)
             {
                 if (Tunnel.BLL.Permission.IfHasPrimision(dr["m_id"].ToString(), "流程审核", "我的工作", false))
                 {
                     userlist = dr["m_id"].ToString();
                 }
             }
             tr.m_title    = TextBox1.Text.Trim() + "<font color=red>(待审核)</font>";
             tr.m_url      = "N_WorkFlow/MyApply/Apply_zSh.aspx?bid=" + s;
             tr.m_touser   = (RadioButtonList3.SelectedValue == "1" ? int.Parse(m_value.Value) : Convert.ToInt32(userlist));
             tr.m_time     = DateTime.Now;
             tr.m_type     = 1;
             tr.m_typeid   = s;
             tr.m_bid      = 0;
             tr.m_callTime = Convert.ToDateTime("1800-1-1 00:00:00");
             tr.m_isread   = 0;
             long messge = br.Add(tr);
         }
         Tunnel.Common.Message.Show("提交成功!", "Apply_Add.aspx?Flow=" + Request.Params["Flow"]);
     }
     catch
     {
         Tunnel.Common.Message.back("流程错误,请与管理员联系!");
     }
 }
Пример #14
0
 public string showusername(object id)
 {
     Tunnel.BLL.Tunnel_menber mbll = new Tunnel.BLL.Tunnel_menber();
     return(mbll.GetModel(Convert.ToInt64(id)).m_name);
 }
Пример #15
0
    public void showHtml(int d)
    {
        Tunnel.BLL.Tunnel_MingXing          tmx      = new Tunnel.BLL.Tunnel_MingXing();
        Tunnel.Model.Tunnel_MingXing        tmxx     = new Tunnel.Model.Tunnel_MingXing();
        List <Tunnel.Model.Tunnel_MingXing> tmxxList = new List <Tunnel.Model.Tunnel_MingXing>();

        if (d == -1)
        {
            tmxxList = tmx.GetModelList(" 1=1 order by Convert(datetime,str(m_year)+'-'+str(M_moon)+'-'+'01') desc");
            if (tmxxList.Count > 0)
            {
                d = tmxxList[0].m_id;
            }
        }

        tmxxList = tmx.GetModelList("m_id = " + d + "");

        for (int i = 0; i < tmxxList.Count; i++)
        {
            Tunnel.BLL.Tunnel_menber   tm  = new Tunnel.BLL.Tunnel_menber();
            Tunnel.Model.Tunnel_menber tmm = new Tunnel.Model.Tunnel_menber();
            tmm = tm.GetModel(Convert.ToInt64(tmxxList[i].m_uid));
            if (tmm != null)
            {
                name = tmm.m_name;
                Tunnel.BLL.Tunnel_bum   tb  = new Tunnel.BLL.Tunnel_bum();
                Tunnel.Model.Tunnel_bum tbb = new Tunnel.Model.Tunnel_bum();
                tbb = tb.GetModel(Convert.ToInt64(tmm.m_bum));
                if (tbb != null)
                {
                    bum = tbb.b_name;
                }
            }
            title   = tmxxList[i].Title.ToString();
            year    = tmxxList[i].m_year.ToString();
            moon    = tmxxList[i].m_moon.ToString();
            img     = "../N_MyWork/N_Star/" + tmxxList[i].m_img;
            content = tmxxList[i].m_content;
        }

        lblcontent.Text = content;


        string dateStr = string.Empty;

        string  tempYear = year;
        string  tempMoon = moon;
        string  tempSql  = @"
select * from (select top 4 * from (select top 4 * from tunnel_mingxing where  
Convert(datetime,lTRIM(str(m_year))+'-'+ltrim(str(m_moon))+'-'+'01') 
<substring(Convert(varchar,'" + year + "-" + (moon.Length == 1 ? "0" + moon : moon) + "-01" + @"',20),0,8)+'-01'  
order by Convert(datetime,lTRIM(str(m_year))+'-'+ltrim(str(m_moon))+'-'+'01') 
desc) as bb order by 
Convert(datetime,lTRIM(str(m_year))+'-'+ltrim(str(m_moon))+'-'+'01')) 
 as tunnel_mingxing 
union all  
select * from (select top 1 * from tunnel_mingxing where  
Convert(datetime,lTRIM(str(m_year))+'-'+ltrim(str(m_moon))+'-'+'01') 
=substring(Convert(varchar,'" + year + "-" + (moon.Length == 1 ? "0" + moon : moon) + "-01" + @"',20),0,8)+'-01' ) as tunnel_mingxing 
union all 
select * from (select top 4 * from tunnel_mingxing where  
Convert(datetime,lTRIM(str(m_year))+'-'+ltrim(str(m_moon))+'-'+'01') 
>substring(Convert(varchar,'" + year + "-" + (moon.Length == 1 ? "0" + moon : moon) + "-01" + @"',20),0,8)+'-01' ) as tunnel_mingxing 
 ";
        DataSet ds       = Tunnel.Data.DbHelperSQL.Query(tempSql);

        tmxxList = tmx.DataTableToList(ds.Tables[0]);

        foreach (Tunnel.Model.Tunnel_MingXing item in tmxxList)
        {
            if (item.m_year == Convert.ToInt32(year) && Convert.ToInt32(item.m_moon) == Convert.ToInt32(moon))
            {
                dateStr += "<a href=?id=" + item.m_id + "><font color=\"red\" style=\"14px\" >" + item.m_year + "-" + item.m_moon + "</font></a>  ";
            }
            else
            {
                dateStr += "<a href=?id=" + item.m_id + "><font color=\"black\" style=\"12px\" >" + item.m_year + "-" + item.m_moon + "</font></a>  ";
            }
        }

        //Label1.Text = dateStr;
    }
Пример #16
0
    private void BindDownList()
    {
        string strSQL = "";
        string strOR  = "";
        string strBum = tm.GetModel(ul.LoginID).m_bum.ToString().Trim();
        List <Tunnel.Model.Tunnel_SelType> newsType = st.GetModelList("ParentID=0 and IsDel=0");
        string sBum = "";

        for (int i = 0; i < newsType.Count; i++)
        {
            if (sBum == newsType[i].BumID)
            {
                continue;
            }
            else
            {
                string[] bums = newsType[i].BumID.Trim().Split(new Char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                for (int j = 0; j < bums.Length; j++)
                {
                    if (strBum == bums[j])
                    {
                        strOR += " BumID='" + newsType[i].BumID + "' OR";
                        break;
                    }
                }
                sBum = newsType[i].BumID;
            }
        }

        if (strOR != "")
        {
            strOR = strOR.Substring(0, strOR.Length - 2);
        }
        ddlType.Items.Clear();
        ddlType1.Items.Clear();
        List <Tunnel.Model.Tunnel_SelType> headList = new List <Tunnel.Model.Tunnel_SelType>();

        if ("系统管理员" == ul.JiaoSe(ul.LoginID))
        {
            strSQL = "ParentID=0 and IsDel=0 order by bumname desc";
        }
        else
        {
            if (strOR != "")
            {
                strSQL = string.Format("ParentID=0 and IsDel=0 AND ({0}) ORDER BY bumname desc", strOR);
            }
            else
            {
                strSQL = "1=2";
            }
        }
        //else if (tm.GetModel(ul.LoginID).m_bum == 131)
        //{
        //    strSQL = string.Format("ParentID=0 and (BumID='{0}' or BumID=0) order by bumname desc", tm.GetModel(ul.LoginID).m_bum);
        //}
        //else if (tm.GetModel(ul.LoginID).m_bum == 134)
        //{
        //    strSQL = string.Format("ParentID=0 and (BumID='{0}' or BumID=132 or BumID=0) order by bumname desc", tm.GetModel(ul.LoginID).m_bum);
        //}
        //else
        //{
        //    strSQL = string.Format("ParentID=0 and BumID='{0}' order by bumname desc", tm.GetModel(ul.LoginID).m_bum);
        //}
        headList = st.GetModelList(strSQL);
        for (int i = 0; i < headList.Count; i++)
        {
            ddlType.Items.Add(new ListItem("(" + headList[i].BumName + ") " + headList[i].TypeName, headList[i].TypeID.ToString()));
            ddlType1.Items.Add(new ListItem("(" + headList[i].BumName + ") " + headList[i].TypeName, headList[i].TypeID.ToString()));

            //List<Tunnel.Model.Tunnel_SelType> itemList = new List<Tunnel.Model.Tunnel_SelType>();
            //itemList = st.GetModelList(string.Format("ParentID={0} order by bumname desc", headList[i].TypeID));
            //for (int j = 0; j < itemList.Count; j++)
            //{
            //    DropDownList1.Items.Add(new ListItem("|-> " + itemList[j].TypeName, itemList[j].TypeID.ToString()));
            //    List<Tunnel.Model.Tunnel_SelType> list = new List<Tunnel.Model.Tunnel_SelType>();
            //    list = st.GetModelList(string.Format("ParentID={0} order by bumname desc", itemList[j].TypeID));
            //    for (int k = 0; k < list.Count; k++)
            //    {
            //        DropDownList1.Items.Add(new ListItem("|->-> " + list[k].TypeName, list[k].TypeID.ToString()));
            //    }
            //}
        }
        ddlType1.Items.Insert(0, new ListItem("全部", "0"));
    }
Пример #17
0
    public static int typeId        = 0;  //管理类型编号


    /// <summary>
    /// 根据 用户编号获取用户拥有的所有权限
    /// </summary>
    /// <param name="userId"></param>
    public void GetUserAllPermission(int userId)
    {
        ListBox3.Items.Clear();
        int    bumId   = 0;
        int    dutyId  = 0;
        int    jueSeId = 0;
        string qxList  = string.Empty;

        Tunnel.BLL.Tunnel_menber   tm  = new Tunnel.BLL.Tunnel_menber();
        Tunnel.Model.Tunnel_menber tmm = new Tunnel.Model.Tunnel_menber();

        Tunnel.BLL.Tunnel_uyingshe   uy  = new Tunnel.BLL.Tunnel_uyingshe();
        Tunnel.Model.Tunnel_uyingshe uyy = new Tunnel.Model.Tunnel_uyingshe();

        Tunnel.BLL.Tunnel_dyingshe   dy  = new Tunnel.BLL.Tunnel_dyingshe();
        Tunnel.Model.Tunnel_dyingshe dyy = new Tunnel.Model.Tunnel_dyingshe();

        Tunnel.BLL.Tunnel_yingshe   jy  = new Tunnel.BLL.Tunnel_yingshe();
        Tunnel.Model.Tunnel_yingshe jyy = new Tunnel.Model.Tunnel_yingshe();

        Tunnel.BLL.Tunnel_byingshe   by  = new Tunnel.BLL.Tunnel_byingshe();
        Tunnel.Model.Tunnel_byingshe byy = new Tunnel.Model.Tunnel_byingshe();

        tmm = tm.GetModel(userId);

        #region 判断
        if (tmm != null)
        {
            bumId   = tmm.m_bum;
            dutyId  = tmm.m_duty;
            jueSeId = tmm.m_jiao;
            if (uy.GetModelList("uy_uid=" + userId).Count > 0)
            {
                uyy = uy.GetModelList("uy_uid=" + userId)[0];
                if (uyy != null)
                {
                    if (uyy.uy_list.Length > 0)
                    {
                        qxList += uyy.uy_list + "|";
                    }
                }
            }
            if (by.GetModelList("by_bid=" + bumId).Count > 0)
            {
                byy = by.GetModelList("by_bid=" + bumId)[0];
                if (byy != null)
                {
                    if (byy.by_list.Length > 0)
                    {
                        qxList += byy.by_list + "|";
                    }
                }
            }
            if (dy.GetModelList("dy_did=" + dutyId).Count > 0)
            {
                dyy = dy.GetModelList("dy_did=" + dutyId)[0];
                if (dyy != null)
                {
                    if (dyy.dy_list.Length > 0)
                    {
                        qxList += dyy.dy_list + "|";
                    }
                }
            }
            if (jy.GetModelList("y_jsid=" + jueSeId).Count > 0)
            {
                jyy = jy.GetModelList("y_jsid=" + jueSeId)[0];
                if (jyy != null)
                {
                    if (jyy.y_qxlist.Length > 0)
                    {
                        qxList += jyy.y_qxlist + "|";
                    }
                }
            }
            if (qxList.Length > 1)
            {
                qxList = qxList.Substring(0, qxList.Length - 1);
            }
        }
        #endregion
        Tunnel.BLL.Tunnel_quanxian tq = new Tunnel.BLL.Tunnel_quanxian();

        if (qxList.Length > 0)
        {
            foreach (string item in qxList.Split('|'))
            {
                Tunnel.Model.Tunnel_quanxian tqq = new Tunnel.Model.Tunnel_quanxian();
                tqq = tq.GetModel(int.Parse(item));
                if (tqq != null)
                {
                    ListItem li = new ListItem(tqq.q_mark + "-->>" + tqq.q_name, tqq.q_id.ToString());
                    if (!ListBox3.Items.Contains(li))
                    {
                        ListBox3.Items.Add(li);
                    }
                }
            }
        }
    }
Пример #18
0
    void ShowInit(string sql)
    {
        DataSet ds = new DataSet();

        string where = "";
        string userlist = "0";

        Tunnel.BLL.Tunnel_menber bm = new Tunnel.BLL.Tunnel_menber();
        ul.UsbnLogin = bm.GetModel(ul.LoginID);
        if (Tunnel.BLL.Permission.IfHasPrimision(ul.LoginID.ToString(), "流程审核", "我的工作", false))
        {
            DataSet dss = new DataSet();
            if (ul.JiaoSe(ul.LoginID) != "系统管理员")
            {
                dss = bm.GetList("m_bum=" + ul.UsbnLogin.m_bum);

                foreach (DataRow dr in dss.Tables[0].Rows)
                {
                    userlist += dr["m_id"].ToString() + ",";
                }
                if (userlist.Length > 0)
                {
                    userlist = userlist.Substring(0, userlist.Length - 1);
                }
            }
            else
            {
                userlist = "0";
            }
        }
        else
        {
            userlist = "0";
        }
        if ("search".Equals(sql))
        {
            if (TextBox1.Text.Trim() != "")
            {
                where += " and b_time>='" + TextBox1.Text + "'";
            }
            if (TextBox2.Text.Trim() != "")
            {
                where += " and b_time<='" + TextBox2.Text + "'";
            }
            if (TextBox3.Text.Trim() != "")
            {
                try
                {
                    where += " and b_id=" + int.Parse(TextBox3.Text.Trim());
                }
                catch
                {
                    Tunnel.Common.Message.back("请输入正确的文号");
                }
            }
            if (TextBox4.Text.Trim() != "")
            {
                where += " and b_title like '%" + TextBox4.Text + "%'";
            }
        }
        else
        {
            where = "";
        }
        string sWhere = "";

        if (ul.JiaoSe(ul.LoginID) != "系统管理员")
        {
            sWhere = "select DISTINCT bf.b_id,bf.b_title,bf.b_sort,bf.b_time,bf.b_file,bf.b_state,bf.b_user,bf.b_suser,bf.b_stype from tunnel_bumf bf left join tunnel_exam em on bf.b_id=em.e_gid left join tunnel_step ep on em.e_nextbid=ep.s_id where (((CHARINDEX('" + ul.LoginID + ",', ep.s_zid)>=1 or ep.s_zid ='" + ul.LoginID + "') or (CHARINDEX('" + ul.LoginID + ",', em.e_nextbuser) >= 1 or em.e_nextbuser ='******')) " + where + " and bf.b_state>0) or (b_user in(" + userlist + ") or b_suser="******") order by bf.b_state asc,bf.b_time desc";
            ds     = Tunnel.Data.DbHelperSQL.Query(sWhere);
        }
        else
        {
            ds = tb.GetList("b_state>0 " + where + " order by b_state asc,b_time desc");
        }
        PagedDataSource pds = new PagedDataSource();

        pds.DataSource  = ds.Tables[0].DefaultView;//设置数据源(DataTable类型)
        pds.AllowPaging = true;
        //每页显示的行数
        //pds.PageSize = 12;
        AspNetPager1.RecordCount = ds.Tables[0].Rows.Count;
        pds.CurrentPageIndex     = AspNetPager1.CurrentPageIndex - 1;
        pds.PageSize             = AspNetPager1.PageSize;
        Repeater1.DataSource     = pds;
        Repeater1.DataBind();
    }
Пример #19
0
 public void ListBind()
 {
     if (ul.JiaoSe(ul.LoginID).Equals("系统管理员"))
     {
         where = "";
         PageBind2();
     }
     else
     {
         Tunnel.BLL.Tunnel_bum tb  = new Tunnel.BLL.Tunnel_bum();
         Tunnel_bum            tbb = new Tunnel_bum();
         tmm = tm.GetModel(Convert.ToInt64(ul.LoginID.ToString()));
         if (tmm != null)
         {
             if (!string.IsNullOrEmpty(tmm.m_bum.ToString()))
             {
                 tbb = tb.GetModel(Convert.ToInt64(tmm.m_bum.ToString()));
                 if (tbb != null)
                 {
                     List <Tunnel.Model.Tunnel_SelType> tsList = new List <Tunnel_SelType>();
                     Tunnel.BLL.SelType tst = new Tunnel.BLL.SelType();
                     tsList = tst.GetModelList("");
                     // bumname='" + tbb.b_name + "'
                     if (tsList.Count > 0)
                     {
                         for (int i = 0; i < tsList.Count; i++)
                         {
                             bhtype += tsList[i].TypeID.ToString() + "|";
                         }
                         if (bhtype.Length > 0)
                         {
                             bhtype = bhtype.Substring(0, bhtype.Length - 1);
                         }
                     }
                     where = "";
                     for (int i = 0; i < bhtype.Split('|').Length; i++)
                     {
                         if (where.Length > 0)
                         {
                             if (i == bhtype.Split('|').Length - 1)
                             {
                                 where += "  or typeid=" + bhtype.Split('|')[i] + ")";
                             }
                             else
                             {
                                 where += "  or typeid=" + bhtype.Split('|')[i] + "";
                             }
                         }
                         else
                         {
                             where += "   (typeid=" + bhtype.Split('|')[i] + "";
                         }
                     }
                     PageBind2();
                 }
                 else
                 {
                     MTCPager1.RecordCount = 0;
                 }
             }
         }
     }
 }
Пример #20
0
    /// <summary>
    /// 明星员工
    /// </summary>
    /// <param name="d"></param>
    public void showHtml(int d)
    {
        Tunnel.BLL.Tunnel_MingXing          tmx      = new Tunnel.BLL.Tunnel_MingXing();
        Tunnel.Model.Tunnel_MingXing        tmxx     = new Tunnel.Model.Tunnel_MingXing();
        List <Tunnel.Model.Tunnel_MingXing> tmxxList = new List <Tunnel.Model.Tunnel_MingXing>();

        if (d == -1)
        {
            tmxxList = tmx.GetModelList(" 1=1 order by Convert(datetime,str(m_year)+'-'+str(M_moon)+'-'+'01') desc");
            if (tmxxList.Count > 0)
            {
                d = tmxxList[0].m_id;
            }
        }

        tmxxList = tmx.GetModelList("m_id = " + d + "");

        for (int i = 0; i < tmxxList.Count; i++)
        {
            Tunnel.BLL.Tunnel_menber   tm  = new Tunnel.BLL.Tunnel_menber();
            Tunnel.Model.Tunnel_menber tmm = new Tunnel.Model.Tunnel_menber();
            tmm = tm.GetModel(Convert.ToInt64(tmxxList[i].m_uid));
            if (tmm != null)
            {
                name = tmm.m_name;
                Tunnel.BLL.Tunnel_bum   tb  = new Tunnel.BLL.Tunnel_bum();
                Tunnel.Model.Tunnel_bum tbb = new Tunnel.Model.Tunnel_bum();
                tbb = tb.GetModel(Convert.ToInt64(tmm.m_bum));
                if (tbb != null)
                {
                    bum = tbb.b_name;
                    if (!string.IsNullOrEmpty(bum))
                    {
                        if (bum.Length > 8)
                        {
                            bum = bum.Substring(0, 8);
                        }
                    }
                }

                Tunnel.BLL.Tunnel_duty   td  = new Tunnel.BLL.Tunnel_duty();
                Tunnel.Model.Tunnel_duty tdd = new Tunnel.Model.Tunnel_duty();
                tdd = td.GetModel(Convert.ToInt64(tmm.m_duty));
                if (tdd != null)
                {
                    duty = tdd.d_name;
                }
            }
            year = tmxxList[i].m_year.ToString();
            moon = tmxxList[i].m_moon.ToString();
            img  = "N_MyWork/N_Star/" + tmxxList[i].m_img;
            mxId = tmxxList[i].m_id.ToString();
        }

        string tempYear = DateTime.Now.AddMonths(-12).Year.ToString();
        string tempMoon = DateTime.Now.AddMonths(-12).Month.ToString();

        tmxxList = tmx.GetModelList("m_year >= " + tempYear + "  order by Convert(datetime,str(m_year)+'-'+str(M_moon)+'-'+'01') asc");

        int count = 0;

        foreach (Tunnel.Model.Tunnel_MingXing item in tmxxList)
        {
            if (item.m_moon >= Convert.ToInt32(tempMoon) || item.m_year != DateTime.Now.Year)
            {
                content += "<a href=?id=" + item.m_id + ">" + item.m_year + "-" + item.m_moon + "</a>  ";
                count++;
            }
            if (count > 1)
            {
                break;
            }
        }
    }
Пример #21
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            titleId             = 0;
            this.Label1.Visible = false;
            //根据登录者ID判断是否存在于某部门

            //如果是管理员登陆,则可查看所有列表信息

            if (ul.LoginID == 1 || "系统管理员" == ul.JiaoSe(ul.LoginID))
            {
                //mostList = st.GetModelList("1=1 and bumname not in ('党工团','项目经理部') order by bumname desc");
                mostList = st.GetModelList("1=1 order by bumname desc");
                //若系统管理员也属于某部门

                for (int t = 0; t < mostList.Count; t++)
                {
                    DropDownList1.Items.Add(new ListItem(mostList[t].TypeName + "(" + mostList[t].BumName + ")", mostList[t].TypeID.ToString()));
                }
                DropDownList1.Items.Insert(0, new ListItem("-请选择-", "0"));
            }
            else
            {
                //若此用户不在任何部门里,则无操作
                if (tm.GetModel(ul.LoginID).m_bum == 0)
                {
                    this.Label1.Visible = true;
                }
                else
                {
                    //若是用户登录,则根据其所属部门得出相应列表信息

                    // 根据登陆ID 找到 member表里对应的m_bum部门ID,然后再找出部门名称

                    most.BumID   = tm.GetModel(ul.LoginID).m_bum.ToString().Trim();
                    most.BumName = tb.GetModel(long.Parse(most.BumID.ToString())).b_name;
                    // st.GetModelList("BumName=" + most.BumName);
                    mostList = st.GetModelList("BumName='" + most.BumName + "' or bumname in ('科室信息','总工室')");

                    for (int j = 0; j < mostList.Count; j++)
                    {
                        DropDownList1.Items.Add(new ListItem(mostList[j].TypeName + "(" + mostList[j].BumName + ")", mostList[j].TypeID.ToString()));
                    }
                    DropDownList1.Items.Insert(0, new ListItem("-请选择-", "0"));
                    //if (!Tunnel.BLL.Permission.IfHasPrimision(ul.LoginID.ToString(), "党建", "党工团", false))
                    //{
                    //    ListItem li = DropDownList1.Items.FindByText("党建动态(党工团)");
                    //    ListItem li1 = DropDownList1.Items.FindByText("党务资料(党工团)");
                    //    DropDownList1.Items.Remove(li);
                    //    DropDownList1.Items.Remove(li1);
                    //}
                    //if (!Tunnel.BLL.Permission.IfHasPrimision(ul.LoginID.ToString(), "工会", "党工团", false))
                    //{
                    //    ListItem li = DropDownList1.Items.FindByText("工会动态(党工团)");
                    //    ListItem li1 = DropDownList1.Items.FindByText("工会资料(党工团)");
                    //    DropDownList1.Items.Remove(li);
                    //    DropDownList1.Items.Remove(li1);
                    //}
                    //if (!Tunnel.BLL.Permission.IfHasPrimision(ul.LoginID.ToString(), "团务", "党工团", false))
                    //{
                    //    ListItem li = DropDownList1.Items.FindByText("团务动态(党工团)");
                    //    ListItem li1 = DropDownList1.Items.FindByText("团务资料(党工团)");
                    //    DropDownList1.Items.Remove(li);
                    //    DropDownList1.Items.Remove(li1);
                    //}
                    if (!Tunnel.BLL.Permission.IfHasPrimision(ul.LoginID.ToString(), "工程警示", "科室信息", false))
                    {
                        ListItem li = DropDownList1.Items.FindByText("工程警示(科室信息)");
                        DropDownList1.Items.Remove(li);
                    }
                    if (!Tunnel.BLL.Permission.IfHasPrimision(ul.LoginID.ToString(), "先锋视野", "科室信息", false))
                    {
                        ListItem li = DropDownList1.Items.FindByText("先锋视野(科室信息)");
                        DropDownList1.Items.Remove(li);
                    }
                    if (!Tunnel.BLL.Permission.IfHasPrimision(ul.LoginID.ToString(), "总工室", "科室信息", false))
                    {
                        ListItem li  = DropDownList1.Items.FindByText("技术动态(总工室)");
                        ListItem li1 = DropDownList1.Items.FindByText("技术资料(总工室)");
                        ListItem li2 = DropDownList1.Items.FindByText("技术管理(总工室)");
                        DropDownList1.Items.Remove(li);
                        DropDownList1.Items.Remove(li1);
                        DropDownList1.Items.Remove(li2);
                    }
                }
            }

            if (!string.IsNullOrEmpty(Request.QueryString["pagetitle"]))
            {
                titleId = Convert.ToInt32(Request.QueryString["pagetitle"]);
                if (titleId == 1)
                {
                    pagetitlestr = "科室信息修改";
                }
                indexId = 0;
                indexId = Convert.ToInt32(Request.QueryString["indexId"]);
                PageBind(indexId);
            }

            BindDownList();
        }
    }
Пример #22
0
 public Tunnel.Model.Tunnel_menber getUserModel(long userId)
 {
     Tunnel.BLL.Tunnel_menber mbll = new Tunnel_menber();
     return(mbll.GetModel(userId));
 }
Пример #23
0
    void ShowInit(string sql)
    {
        DataSet ds       = new DataSet();
        string  wheresql = "";

        string where = "b_sort in(select f_id from tunnel_flow where f_sort=18)";
        Tunnel.BLL.Tunnel_menber bm = new Tunnel.BLL.Tunnel_menber();
        ul.UsbnLogin = bm.GetModel(ul.LoginID);
        if ("search".Equals(sql))
        {
            if (DropDownList1.SelectedValue != "0")
            {
                where += " and b_sort=" + DropDownList1.SelectedValue;
            }
            if (DropDownList2.SelectedValue != "")
            {
                where += " and b_state=" + DropDownList2.SelectedValue;
            }
            if (TextBox1.Text.Trim() != "")
            {
                where += " and b_time>='" + TextBox1.Text + "'";
            }
            if (TextBox2.Text.Trim() != "")
            {
                where += " and b_time<='" + TextBox2.Text + "'";
            }
            if (TextBox3.Text.Trim() != "")
            {
                try
                {
                    where += " and b_id=" + int.Parse(TextBox3.Text.Trim());
                }
                catch {
                    Tunnel.Common.Message.back("请输入正确的文号");
                }
            }
            if (TextBox4.Text.Trim() != "")
            {
                where += " and b_title like '%" + TextBox4.Text + "%'";
            }
            if (ul.JiaoSe(ul.LoginID) != "系统管理员")
            {
                where += " and b_user="******" order by b_state asc,b_time desc";
            ds     = tb.GetList(where);
            //对用于分页的类的引用
        }
        else
        {
            if (ul.JiaoSe(ul.LoginID) != "系统管理员")
            {
                where += " and b_user="******" order by b_state asc,b_time desc";
            ds     = tb.GetList(where);
        }
        PagedDataSource pds = new PagedDataSource();

        pds.DataSource  = ds.Tables[0].DefaultView;//设置数据源(DataTable类型)
        pds.AllowPaging = true;
        //每页显示的行数
        //pds.PageSize = 12;
        AspNetPager1.RecordCount = ds.Tables[0].Rows.Count;
        pds.CurrentPageIndex     = AspNetPager1.CurrentPageIndex - 1;
        pds.PageSize             = AspNetPager1.PageSize;
        Repeater1.DataSource     = pds;
        Repeater1.DataBind();
    }
Пример #24
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            titleId             = 0;
            this.Label1.Visible = false;
            //根据登录者ID判断是否存在于某部门

            //如果是管理员登陆,则可查看所有列表信息

            mostList = st.GetModelList("1=1 and BumName = '项目经理部' order by bumname desc");
            //若系统管理员也属于某部门

            if (tm.GetModel(ul.LoginID).m_bum != 0)
            {
                for (int t = 0; t < mostList.Count; t++)
                {
                    DropDownList1.Items.Add(new ListItem(mostList[t].TypeName + "(" + mostList[t].BumName + ")", mostList[t].TypeID.ToString()));
                }
                DropDownList1.Items.Insert(0, new ListItem("-请选择-", "0"));


                if (ul.LoginID == 1 || "系统管理员" == ul.JiaoSe(ul.LoginID))
                {
                }
                else
                {
                    ddlquanxianbind();
                }
            }
            else
            {
            }



            //if (ul.LoginID == 1 || "系统管理员" == ul.JiaoSe(ul.LoginID))
            //{

            //}
            //else
            //{
            //若此用户不在任何部门里,则无操作
            if (tm.GetModel(ul.LoginID).m_bum == 0)
            {
                this.Label1.Visible = true;
            }
            else
            {
                //若是用户登录,则根据其所属部门得出相应列表信息

                // 根据登陆ID 找到 member表里对应的m_bum部门ID,然后再找出部门名称

                //most.BumID = tm.GetModel(ul.LoginID).m_bum;
                //most.BumName = tb.GetModel(long.Parse(most.BumID.ToString())).b_name;
                //// st.GetModelList("BumName=" + most.BumName);
                //mostList = st.GetModelList("BumName='" + most.BumName + "'");

                //for (int j = 0; j < mostList.Count; j++)
                //{
                //    DropDownList1.Items.Add(new ListItem(mostList[j].TypeName + "(" + mostList[j].BumName + ")", mostList[j].TypeID.ToString()));
                //}
                DropDownList2.Items.Clear();
                DropDownList2.Items.Add(new ListItem("请选择类型", "-1"));
            }
            //}

            if (!string.IsNullOrEmpty(Request.QueryString["pagetitle"]))
            {
                titleId = Convert.ToInt32(Request.QueryString["pagetitle"]);
                if (titleId == 1)
                {
                    pagetitlestr = "项经部信息修改";
                }
                indexId = 0;
                indexId = Convert.ToInt32(Request.QueryString["indexId"]);
                PageBind(indexId);
            }
        }
    }
Пример #25
0
        /// <summary>
        /// 查看是否有权限
        /// </summary>
        /// <param name="userID">用户ID</param>
        /// <param name="XreqestStr">小类</param>
        /// <param name="BreqestStr">大类</param>
        /// <returns>true有权限</returns>
        public static bool IfHasPrimision(string userID, string XreqestStr, string BreqestStr, bool IfRead)
        {
            string tmpUid = string.Empty;
            string tmpBid = string.Empty;
            string tmpDid = string.Empty;
            string tmpJid = string.Empty;

            Tunnel.BLL.Tunnel_menber          tm     = new Tunnel_menber();
            Tunnel.Model.Tunnel_menber        tmm    = new Tunnel.Model.Tunnel_menber();
            List <Tunnel.Model.Tunnel_menber> tmlist = new List <Tunnel.Model.Tunnel_menber>();

            Tunnel.BLL.Tunnel_jiaose   tj  = new Tunnel_jiaose();
            Tunnel.Model.Tunnel_jiaose tjj = new Tunnel.Model.Tunnel_jiaose();


            Tunnel.BLL.Tunnel_quanxian          qx     = new Tunnel_quanxian();
            Tunnel.Model.Tunnel_quanxian        qxx    = new Tunnel.Model.Tunnel_quanxian();
            List <Tunnel.Model.Tunnel_quanxian> qxlist = new List <Tunnel.Model.Tunnel_quanxian>();

            Tunnel.BLL.Tunnel_yingshe          tyj     = new Tunnel_yingshe();
            Tunnel.Model.Tunnel_yingshe        tyjj    = new Tunnel.Model.Tunnel_yingshe();
            List <Tunnel.Model.Tunnel_yingshe> tyjlist = new List <Tunnel.Model.Tunnel_yingshe>();

            Tunnel.BLL.Tunnel_uyingshe          tyu     = new Tunnel_uyingshe();
            Tunnel.Model.Tunnel_uyingshe        tyuu    = new Tunnel.Model.Tunnel_uyingshe();
            List <Tunnel.Model.Tunnel_uyingshe> tyulist = new List <Tunnel.Model.Tunnel_uyingshe>();

            Tunnel.BLL.Tunnel_byingshe          tyb     = new Tunnel_byingshe();
            Tunnel.Model.Tunnel_byingshe        tybb    = new Tunnel.Model.Tunnel_byingshe();
            List <Tunnel.Model.Tunnel_byingshe> tyblist = new List <Tunnel.Model.Tunnel_byingshe>();

            Tunnel.BLL.Tunnel_dyingshe          tyd     = new Tunnel_dyingshe();
            Tunnel.Model.Tunnel_dyingshe        tydd    = new Tunnel.Model.Tunnel_dyingshe();
            List <Tunnel.Model.Tunnel_dyingshe> tydlist = new List <Tunnel.Model.Tunnel_dyingshe>();

            UserLogin ul    = new UserLogin();
            bool      b     = false;
            string    qxStr = string.Empty;

            tmm    = tm.GetModel(Convert.ToInt64(userID));
            tmpBid = tmm.m_bum.ToString();
            tmpJid = tmm.m_jiao.ToString();
            tmpDid = tmm.m_duty.ToString();
            tmpUid = userID;

            tyulist = tyu.GetModelList("uy_uid='" + tmpUid + "'");

            if (tyulist.Count > 0)
            {
                if (tyulist[0].uy_list.Length > 0)
                {
                    qxStr += tyulist[0].uy_list + "|";
                }
            }

            tyjlist = tyj.GetModelList("y_jsid=" + tmpJid + "");

            if (tyjlist.Count > 0)
            {
                if (tyjlist[0].y_qxlist.Length > 0)
                {
                    qxStr += tyjlist[0].y_qxlist + "|";
                }
            }

            tyblist = tyb.GetModelList("by_bid='" + tmpBid + "'");

            if (tyblist.Count > 0)
            {
                if (tyblist[0].by_list.Length > 0)
                {
                    qxStr += tyblist[0].by_list + "|";
                }
            }


            tydlist = tyd.GetModelList("dy_did='" + tmpDid + "'");
            if (tydlist.Count > 0)
            {
                if (tydlist[0].dy_list.Length > 0)
                {
                    qxStr += tydlist[0].dy_list + "|";
                }
            }


            if (qxStr.Length > 0)
            {
                qxStr = qxStr.Substring(0, qxStr.Length - 1);
            }
            if (userID != "1" && ul.JiaoSe(int.Parse(userID)) != "系统管理员")
            {
                if (IfRead)
                {
                    if (tmpJid != "0")
                    {
                        if (ul.JiaoSe(int.Parse(userID)) == "总经理")
                        {
                            b = true;
                        }
                    }
                }
                if (!string.IsNullOrEmpty(qxStr))
                {
                    qxlist = qx.GetModelList("q_name='" + XreqestStr + "' and q_mark='" + BreqestStr + "'");
                    if (qxlist.Count > 0)
                    {
                        foreach (string item in qxStr.Split('|'))
                        {
                            if (qxlist[0].q_id.ToString().Equals(item.ToString()))
                            {
                                b = true;
                            }
                        }
                    }
                }
            }
            else
            {
                b = true;
            }
            return(b);
        }
Пример #26
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (!string.IsNullOrEmpty(Request.QueryString["delid"]))
            {
                uid = Request.QueryString["delid"].ToString();
                if (uid != "1")
                {
                    if (ul.LoginID.ToString() != uid)
                    {
                        if (tm.Exists(Convert.ToInt32(uid)))
                        {
                            tm.Delete(Convert.ToInt64(uid));
                            if (tu.GetModelList("uy_uid='" + uid + "'").Count != 0)
                            {
                                tu.Delete(tu.GetModelList("uy_uid='" + uid + "'")[0].uy_id);
                            }
                            Tunnel.Common.Message.Show("删除成功", "tunnel_userlist.aspx");
                        }
                        else
                        {
                            Tunnel.Common.Message.Show("该用户有过重要操作记录!请勿删除!");
                        }
                    }
                    else
                    {
                        Tunnel.Common.Message.Show("不能删除自己!");
                    }
                }
                else
                {
                    Tunnel.Common.Message.Show("不能删除初始管理员");
                }
            }
            //if (ul.LoginID != 1)
            if ("系统管理员" != ul.JiaoSe(ul.LoginID))
            {
                Tunnel.Model.Tunnel_menber tmm = new Tunnel_menber();
                tmm = tbll.GetModel(ul.LoginID);
                if (!string.IsNullOrEmpty(tmm.m_bum.ToString()))
                {
                    BumID = tmm.m_bum;
                }

                TextBox1.Text = word;
                SearchWhere   = "  (m_birth like '%" + word + "%' or " +
                                "  m_idcard like '%" + word + "%' or " +
                                "  m_login like '%" + word + "%' or " +
                                "  m_mail like '%" + word + "%' or " +
                                "  m_mobile like '%" + word + "%' or " +
                                "  m_name like '%" + word + "%') and m_bum = " + BumID + " ";
                PageBind();
            }
            else
            {
                TextBox1.Text = word;
                SearchWhere   = "  m_birth like '%" + word + "%' or " +
                                "  m_idcard like '%" + word + "%' or " +
                                "  m_login like '%" + word + "%' or " +
                                "  m_mail like '%" + word + "%' or " +
                                "  m_mobile like '%" + word + "%' or " +
                                "  m_name like '%" + word + "%'";
                PageBind();
            }
        }
    }
Пример #27
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (!string.IsNullOrEmpty(Request.QueryString["id"]))
            {
                id = Convert.ToInt32(Request.QueryString["id"].ToString());
                Tunnel.BLL.Tunnel_Vote   t  = new Tunnel.BLL.Tunnel_Vote();
                Tunnel.Model.Tunnel_Vote tt = new Tunnel.Model.Tunnel_Vote();
                Tunnel.BLL.Tunnel_menber tm = new Tunnel.BLL.Tunnel_menber();
                tt = t.GetModel(id);

                voteTitle    = tt.vote_Title;
                voteUserName = tm.GetModel(Convert.ToInt32(tt.vote_userId)).m_name;
                voteDate     = Convert.ToDateTime(tt.vote_startDate).ToShortDateString();
                if (!string.IsNullOrEmpty(tt.vote_mark))
                {
                    voteMark = "<img src=../image/info.png width=20px />" + tt.vote_mark;
                }
                voteMax   = tt.vote_max.ToString();
                voteType  = tt.vote_Type.ToString();
                max.Value = voteMax;

                tvList = tv.GetModelList("ivote_voteId=" + id + "");
                Repeater1.DataSource = tvList;
                Repeater1.DataBind();
                if (voteType == "0")
                {
                    for (int i = 0; i < Repeater1.Items.Count; i++)
                    {
                        ((CheckBox)Repeater1.Items[i].FindControl("CheckBox1")).Visible = false;
                    }
                }
                else
                {
                    for (int i = 0; i < Repeater1.Items.Count; i++)
                    {
                        ((RadioButton)Repeater1.Items[i].FindControl("RadioButton1")).Visible = false;
                    }
                }
                Tunnel.BLL.UserLogin ul = new Tunnel.BLL.UserLogin();
                bool b = false;
                for (int i = 0; i < tvList.Count; i++)
                {
                    string[] temp = tvList[i].ivote_yesUserId.Split(',');
                    for (int j = 0; j < temp.Length; j++)
                    {
                        if (ul.LoginID.ToString() == temp[j])
                        {
                            b = true;
                        }
                    }
                }
                if (b)
                {
                    Button1.Text = "查看结果";
                }
            }
            else
            {
                Tunnel.BLL.Tunnel_Vote          tv     = new Tunnel.BLL.Tunnel_Vote();
                List <Tunnel.Model.Tunnel_Vote> tvList = new List <Tunnel.Model.Tunnel_Vote>();
                tvList = tv.GetModelList("(getdate()>vote_startDate and getdate()<vote_endDate) and vote_state=0 and vote_top =1 order by vote_startDate desc");
                if (tvList.Count > 0)
                {
                    Response.Redirect("indexvote.aspx?id=" + tvList[0].vote_Id + "");
                }
            }
        }
    }
Пример #28
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            DropDownList1.Items.Clear();
            titleId             = 0;
            this.Label1.Visible = false;

            //若此用户不在任何部门里,则无操作
            //if (tm.GetModel(ul.LoginID).m_bum == 0)
            //{
            //    this.Label1.Visible = true;
            //}
            //else
            //{
            //若是用户登录,则根据其所属部门得出相应列表信息

            // 根据登陆ID 找到 member表里对应的m_bum部门ID,然后再找出部门名称
            string typename = "";
            most.BumID   = tm.GetModel(ul.LoginID).m_bum.ToString();
            most.BumName = "党工团";
            //tb.GetModel(long.Parse(most.BumID.ToString())).b_name;
            // st.GetModelList("BumName=" + most.BumName);
            switch (Request.QueryString["type"].ToString())
            {
            case "1":
                typename = "党建";
                break;

            case "2":
                typename = "工会";
                break;

            case "3":
                typename = "团务";
                break;
            }
            mostList = st.GetModelList("BumName='" + most.BumName + "'");

            for (int j = 0; j < mostList.Count; j++)
            {
                DropDownList1.Items.Add(new ListItem(mostList[j].TypeName + "(" + mostList[j].BumName + ")", mostList[j].TypeID.ToString()));
            }
            if (Tunnel.BLL.Permission.IfHasPrimision(ul.LoginID.ToString(), "党建信息", "党工团", false) && typename == "党建")
            {
                ListItem li = DropDownList1.Items.FindByText("党建动态(党工团)");
                //ListItem li1 = DropDownList1.Items.FindByText("党务资料(党工团)");
                DropDownList1.Items.Clear();
                DropDownList1.Items.Add(li);
                //DropDownList1.Items.Add(li1);
            }
            else if (Tunnel.BLL.Permission.IfHasPrimision(ul.LoginID.ToString(), "工会信息", "党工团", false) && typename == "工会")
            {
                ListItem li = DropDownList1.Items.FindByText("工会动态(党工团)");
                //ListItem li1 = DropDownList1.Items.FindByText("工会资料(党工团)");
                DropDownList1.Items.Clear();
                DropDownList1.Items.Add(li);
                //DropDownList1.Items.Add(li1);
            }
            else if (Tunnel.BLL.Permission.IfHasPrimision(ul.LoginID.ToString(), "团务信息", "党工团", false) && typename == "团务")
            {
                ListItem li = DropDownList1.Items.FindByText("团务动态(党工团)");
                //ListItem li1 = DropDownList1.Items.FindByText("团务资料(党工团)");
                DropDownList1.Items.Clear();
                DropDownList1.Items.Add(li);
                //DropDownList1.Items.Add(li1);
            }
            else
            {
                DropDownList1.Items.Clear();
                Response.Write("<script>alert('无法连接该页面,确认后返回');history.go(-1);</script>");
            }
        }


        if (!string.IsNullOrEmpty(Request.QueryString["pagetitle"]))
        {
            titleId = Convert.ToInt32(Request.QueryString["pagetitle"]);
            if (titleId == 1)
            {
                pagetitlestr = "科室信息修改";
            }
            indexId = 0;
            indexId = Convert.ToInt32(Request.QueryString["indexId"]);
            PageBind(indexId);
        }
        //}
    }
Пример #29
0
    protected void calSchedule_DayRender(object sender, DayRenderEventArgs e)
    {
        Tunnel.BLL.UserLogin       ul   = new Tunnel.BLL.UserLogin();
        Tunnel.BLL.Tunnel_menber   tm   = new Tunnel.BLL.Tunnel_menber();
        Tunnel.Model.Tunnel_menber user = tm.GetModel(Convert.ToInt64(ul.LoginID.ToString()));
        //自定义显示内容
        CalendarDay calDay = e.Day;
        //获取表示呈现在空间中的单元格
        TableCell tc = e.Cell;

        if (calDay.IsOtherMonth)
        {
            tc.Controls.Clear();
        }
        else
        {
            try
            {
                HtmlAnchor ahyperLink = new HtmlAnchor();
                ahyperLink.InnerHtml = calDay.Date.Day > 9 ? "<img src='../image/notify_new.gif' />" : "&nbsp;&nbsp;<img src='../image/notify_new.gif' />";
                ahyperLink.Title     = "新增个人日程";
                ahyperLink.HRef      = "CalendarAdd.aspx?day=" + calDay.Date.ToShortDateString();
                ahyperLink.ID        = "ServerA";
                tc.Controls.Add(new LiteralControl("&nbsp;" + "&nbsp;" + "&nbsp;"));
                tc.Controls.Add(ahyperLink);
                Tunnel.BLL.Tunnel_workplan          tw     = new Tunnel.BLL.Tunnel_workplan();
                List <Tunnel.Model.Tunnel_workplan> wkList =
                    tw.GetModelList("w_user="******" and w_starttime>='" + calDay.Date.ToShortDateString() + "' and  w_starttime<'" + calDay.Date.AddDays(1).ToShortDateString() + "'");

                if (wkList.Count > 0)
                {
                    string str = null;
                    foreach (Tunnel.Model.Tunnel_workplan schedule in wkList)
                    {
                        int        tmpCount = imgCount++;
                        HtmlAnchor ha       = new HtmlAnchor();
                        ha.Attributes.Add("onmouseover", "javascript:show('img" + tmpCount + "')");
                        ha.HRef = "CalendarInfo.aspx?id=" + schedule.w_id + "&day=" + calDay.Date.ToShortDateString();
                        //try
                        //{
                        //    str = schedule.w_title.Substring(0, 3);
                        //}
                        //catch
                        //{
                        //    str = schedule.w_title.ToString();
                        //}
                        ha.InnerHtml = "<img src='../image/atchm.gif' border=0 />" + schedule.w_starttime.Hour.ToString() +
                                       ":" + schedule.w_starttime.Minute.ToString() + "&nbsp;" + str + "..." +
                                       "<a  href='?id=" + schedule.w_id + "' onClick=\"return confirm('是否删除此条记录?')\">" +
                                       "<img alt='删除日程' id=img" + tmpCount + " name=remove src='../image/remove.png' border=0 style='display:none'/></a>";

                        tc.Controls.Add(new LiteralControl("&nbsp;" + "&nbsp;" + "&nbsp;"));
                        tc.Controls.Add(new LiteralControl("<br>"));
                        tc.Controls.Add(ha);
                    }
                }
            }
            catch (Exception)
            {
                //Response.Write(ex.ToString());
            }
            e.Cell.Attributes["onmouseover"] = "javascript:this.style.backgroundColor='#fff7ce';cursor='hand';";
            e.Cell.Attributes["onmouseout"]  = "javascript:this.style.backgroundColor='#ffffff'";
        }
    }