public ActionResult ChuyenNhanVienTheoDoi(string CategoryGuid, int?UserId, string MoTaNoiDungChuyen) { shCategoryService _category = new shCategoryService(); shCategory category = _category.FindByKey(CategoryGuid); _category.ThemMoi_HieuChinhCategory( category.CategoryGuid, null, category.CategoryName, category.ParentId, UserId, category.Status, category.CreatedDate, category.MetaTitle, category.Description, category.SortOrder, category.FileName); if (Request.IsAjaxRequest()) { return(Json("OK", JsonRequestBehavior.AllowGet)); } return(RedirectToAction("Index")); }
public static string LamDanhMucHienThiView(string CategoryGuid) { string html = string.Empty; shCategoryService _category = new shCategoryService(); shCategory category = _category.FindByKey(CategoryGuid); while (!string.IsNullOrWhiteSpace(category.ParentId) || !string.IsNullOrEmpty(category.ParentId)) { category = _category.FindByKey(category.ParentId); //html += StringHelper.ConvertToTitleCase(category.CategoryName) + " » "; html += category.CategoryName + " » "; } return(html); }
public ActionResult ChuyenNhanVienTheoDoi(string CategoryGuid) { shCategoryService _category = new shCategoryService(); shCategory category = _category.FindByKey(CategoryGuid); qtUserService _user = new qtUserService(); IEnumerable <qtUser> ds = _user.DanhSachUser(null, TypeHelper.ToInt32(User.Identity.GetUserLogin().Unitid), null); ViewBag.UserId = new SelectList(ds, "UserId", "UserName", category.UserId); return(PartialView("ChuyenNhanVienTheoDoi", category)); }
public static MvcHtmlString NhanVienXuLyDanhMuChinh(this HtmlHelper helper, shCategory category) { qtUserService _user = new qtUserService(); string UserName = string.Empty; if (!string.IsNullOrEmpty(category.ParentId) || !string.IsNullOrWhiteSpace(category.ParentId)) { shCategoryService _category = new shCategoryService(); shCategory parent = _category.FindByKey(category.ParentId); if (parent != null) { UserName = "******" + _user.UserName(parent.UserId) + " » </span>"; } } UserName += "<span data-toggle='tooltip' title='Theo dõi chính' data-original-title='Theo dõi chính' style='font-weight: 600; color: #72afd2;'>" + _user.UserName(category.UserId) + "</span>"; return new MvcHtmlString(UserName); }
public ActionResult Create(string id) { if (!string.IsNullOrWhiteSpace(id)) { shCategoryService _category = new shCategoryService(); shCategory category = _category.FindByKey(id); if (category != null) { ViewBag.DanhMucId = category.CategoryId; ViewBag.DanhMucGuid = category.CategoryGuid; ViewBag.ParentId = category.ParentId; return(View(category)); } else { return(View(new shCategory())); } } ViewBag.CategoryId = id; return(View(new shCategory())); }
public static string GetUrlTheFirst(string CategoryGuid) { shCategoryService _category = new shCategoryService(); shCategory category = new shCategory(); string controller = CategoryGuid; if (!string.IsNullOrWhiteSpace(CategoryGuid) || !string.IsNullOrEmpty(CategoryGuid)) { category = _category.FindByKey(CategoryGuid); if (!string.IsNullOrWhiteSpace(category.ParentId) || !string.IsNullOrEmpty(category.ParentId)) { controller = GetUrlTheFirst(category.ParentId); } else { controller = category.CategoryGuid; } } return(controller); }