Ejemplo n.º 1
0
 //审阅状态
 public string GetStatus(YanFa.Crm2009.Entities.WorkReport report)
 {
     if (!YanFa.Crm2009.BLL.WorkReport.Instance.IsViewed(report, BLL.Util.GetLoginUserID()))
     {
         return("未审阅");
     }
     else
     {
         return("已审阅");
     }
 }
Ejemplo n.º 2
0
        //标题
        protected string GetTitle(YanFa.Crm2009.Entities.WorkReport report)
        {
            string str = "<a href=\"http://" + WpUrl + "/WorkReport/View.aspx?RecID=" + report.RecID + "&Source=1&From=CC\" target=\"_blank\"";

            str += ">" + YanFa.Crm2009.BLL.WorkReport.Instance.GetTitle(report) + "</a>";
            IList <YanFa.Crm2009.Entities.AttachFile> listAttach = BitAuto.YanFa.Crm2009.BLL.AttachFile.Instance.Get(report);

            foreach (YanFa.Crm2009.Entities.AttachFile item in listAttach)
            {
                str += " <a href=\"http://" + WpUrl + item.FilePath + "\" target=\"_blank\" title=\"" + item.FileName + "\"><img src=\"/images/" + GetFileIconName(item.FileType) + ".gif\" style=\"border:0\" alt=\"" + item.FileName + "\" /></a>";
            }
            return(str);
        }
        //标题
        protected string GetTitle(YanFa.Crm2009.Entities.WorkReport report)
        {
            string title = string.Empty;

            if (report.Status == YanFa.Crm2009.Entities.WorkReportStatus.Draft)
            {
                title += "<span style=\"float:right;color:#999;margin-right:10px;\">草稿</span> <a href=\"http://" + WpUrl + "/WorkReport/Edit.aspx?RecID=" + report.RecID + "&From=CC&BtnID=btnsearch\" target=\"_blank\">" + YanFa.Crm2009.BLL.WorkReport.Instance.GetTitle(report) + "</a>";
            }
            else
            {
                title += "<a href=\"http://" + WpUrl + "/WorkReport/View.aspx?RecID=" + report.RecID + "&Source=0&From=CC\" target=\"_blank\">" + YanFa.Crm2009.BLL.WorkReport.Instance.GetTitle(report) + "</a>";
            }
            IList <YanFa.Crm2009.Entities.AttachFile> listAttach = BitAuto.YanFa.Crm2009.BLL.AttachFile.Instance.Get(report);

            foreach (YanFa.Crm2009.Entities.AttachFile item in listAttach)
            {
                title += " <a href=\"http://" + WpUrl + item.FilePath + "\" target=\"_blank\" title=\"" + item.FileName + "\"><img src=\"/images/" + GetFileIconName(item.FileType) + ".gif\" style=\"border:0\" alt=\"" + item.FileName + "\" /></a>";
            }
            return(title);
        }
        //操作
        protected string GetOpearte(YanFa.Crm2009.Entities.WorkReport report)
        {
            string strOperate = string.Empty;

            if (report.Status == YanFa.Crm2009.Entities.WorkReportStatus.Draft)
            {
                strOperate += "<a href=\"http://" + WpUrl + "/WorkReport/Edit.aspx?RecID=" + report.RecID + "&From=CC&BtnID=btnsearch\" target=\"_blank\">编辑</a>";
                strOperate += "&nbsp;&nbsp;<a href=\"javascript:DeleteReport(" + report.RecID + ");\">删除</a>";
            }
            else
            {
                //查看来源:0我的工作报告;1下属工作报告;3所有报告
                strOperate += "<a href=\"http://" + WpUrl + "/WorkReport/View.aspx?RecID=" + report.RecID + "&From=CC\" target=\"_blank\">查看</a>";
                if (!YanFa.Crm2009.BLL.WorkReport.Instance.IsView(report.RecID))
                {
                    strOperate += "&nbsp;&nbsp;<a href=\"javascript:revokeReport(" + report.RecID + ");\">撤回</a>";
                }
                if (report.Type == YanFa.Crm2009.Entities.WorkReportType.Daily)
                {
                    //strOperate += "&nbsp;&nbsp;<a href=\"javascript:ExportReport(" + report.RecID + ");\">导出</a>";
                }
            }
            return(strOperate);
        }