コード例 #1
0
ファイル: DocHelper.cs プロジェクト: Avimunk/soglowek.tmgroup
        public static MvcHtmlString CountNotSubmited(this HtmlHelper helper, Doc doc,IEnumerable<Employee> emps)
        {

            int submitted = Convert.ToInt32(CountSubmited(helper, doc));

            int allemps = emps.Count();

            int res = allemps - submitted;
            return MvcHtmlString.Create(res.ToString());

        }
コード例 #2
0
ファイル: DocHelper.cs プロジェクト: Avimunk/soglowek.tmgroup
		public static MvcHtmlString CountSubmited(this HtmlHelper helper, Doc doc) {

            string[] count = new string[] { };
            if (string.IsNullOrEmpty(doc.Submited))
            {
                return MvcHtmlString.Create("0");
            }
            else
            {
                count = doc.Submited.Split(',');

                return MvcHtmlString.Create(count.Length.ToString());
            }
			
		}
コード例 #3
0
        public static string GetSubmitedDocs(long userID, Doc doc)
        {
            if (string.IsNullOrEmpty(doc.Submited))
            {

                docCounter++;


                string[] arr = doc.Url.Split('.').ToArray();

                if (arr.Length > 1)
                {
                    return "<td>" + doc.Name + " </td><td><a name='submited' title='" + userID + "' alt='" + doc.Id +
                    "'  class='new_doc doc_action' target='_blank' href='/Public/userfiles/docs/" + doc.Url + "'>הורד לקריאה</a></td><td>" +
                    "<input type='checkbox' id='" + userID + "' name='" + doc.Id + "' class='checked' >" +
                    "</td>";
                }
                else
                {
                    return "<td>" + doc.Name + " </td><td><a name='submited' title='" + userID + "' alt='" + doc.Id +
            "'  class='new_doc doc_action' target='_blank' href='" + doc.Url + "'>לחץ כאן</a></td><td>" +
            "<input type='checkbox' id='" + userID + "' name='" + doc.Id + "' class='checked' >" +
            "</td>";

                }




            }
            if (doc.Url != null)
            {
                if (!doc.Submited.Split(',').Select(v => long.Parse(v)).Contains(userID))
                {

                    docCounter++;

                    string[] arr = doc.Url.Split('.').ToArray();

                    if (arr.Length > 1)
                    {
                        return "<td>" + doc.Name + " </td><td><a name='submited' title='" + userID + "' alt='" + doc.Id +
                  "'  class='new_doc doc_action' target='_blank' href='/Public/userfiles/docs/" + doc.Url + "'>הורד לקריאה</a></td><td>" +
                  "<input type='checkbox' id='" + userID + "' name='" + doc.Id + "' class='checked' >" +
                  "</td>";

                    }
                    else
                    {
                        return "<td>" + doc.Name + " </td><td><a name='submited' title='" + userID + "' alt='" + doc.Id +
                     "'  class='new_doc doc_action' target='_blank' href='" + doc.Url + "'>לחץ כאן</a></td><td>" +
                     "<input type='checkbox' id='" + userID + "' name='" + doc.Id + "' class='checked' >" +
                     "</td>";


                    }

                   
                }
                return "";
            }
            else
            {
                return "";
            }
        }