示例#1
0
    //向当前用户的直接领导发送邮件提醒功能
    public static void SendMailToLeader(string title, string remark, string url)
    {
        string user1  = HttpContext.Current.User.Identity.Name;
        string leader = null;

        if (String.IsNullOrEmpty(user1) == false)
        {
            U_UserNameBU userBU = new U_UserNameBU();
            leader = userBU.GetDirLeader();
            userBU.Close();
        }

        if (leader != null)
        {
            ZX_EmailBu email1 = new ZX_EmailBu();
            Hashtable  ht     = new Hashtable();
            ht["time0"]  = System.DateTime.Now.ToString();
            ht["title"]  = title;
            ht["remark"] = remark;
            ht["from1"]  = user1;
            ht["to1"]    = leader;
            ht["back"]   = "1";
            ht["url"]    = url;

            email1.AddMail(ht);
            email1.Close();
        }
    }
示例#2
0
    //处理特殊的显示信息
    void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        DataRowView dv = e.Item.DataItem as DataRowView;

        if (dv != null)
        {
            DataRow dr    = dv.Row;
            Label   lab1  = e.Item.FindControl("kindCaption") as Label;
            String  kind1 = dr["kind"].ToString();
            if (lab1 != null)
            {
                if (kind1 == "01")
                {
                    lab1.Text = "尽职调查-阅卷";
                }
                else if (kind1 == "02")
                {
                    lab1.Text = "尽职调查-下户";
                }
                else if (kind1 == "03")
                {
                    lab1.Text = "尽职调查-取证";
                }
                else if (kind1 == "04")
                {
                    lab1.Text = "尽职调查-报告";
                }
                else if (kind1 == "2")
                {
                    lab1.Text = "方案执行-" + dr["status1"].ToString().Trim();
                }
                else
                {
                }
            }


            //判断责任人
            String       zeren1   = dr["zeren"].ToString();
            U_UserNameBU u1       = new U_UserNameBU();
            bool         isLeader = false;
            String       leader1  = u1.GetDirLeader(zeren1);
            if (leader1 == Page.User.Identity.Name)
            {
                isLeader = true;
            }

            Control con1 = e.Item.FindControl("info1") as Control;
            if (con1 != null)
            {
                con1.Visible = isLeader;
            }
        }
    }