public static string imageUrl(string id) { PersonalFileBll personalFileBll = new PersonalFileBll(); string result = "/images/tree/FileInfo/folderSubtract.png"; if (personalFileBll.GetListArray(" where parentId='" + id + "'").Count > 0) { result = "/images/tree/FileInfo/folderAdd.png"; } return(result); }
protected void SetLimit() { string value = this.hfldUserCodes.Value; string shareUser = ""; if (value != "") { System.Collections.Generic.List <string> list = new System.Collections.Generic.List <string>(value.Split(new char[] { ',' })); shareUser = JsonHelper.Serialize(list.ToArray()); } PersonalFileBll.UpdateFolderShareUser(this.hfldPurchaseChecked.Value, shareUser); this.BindGv(); }
public void BindGv() { string selectedValue = this.ddlScope.SelectedValue; bool isGetAll = true; bool isShare = false; if (this.ViewState["search"].ToString() == "0") { selectedValue = this.tvFile.SelectedValue; isGetAll = false; } this.btnAdd.Disabled = false; this.FileUpload2.Visible = true; int recordCount; DataTable storageDataSource; if (selectedValue == "0") { this.btnAdd.Disabled = true; this.FileUpload2.Visible = false; string shareFolderIds = (this.ViewState["shareId"] == null) ? string.Empty : this.ViewState["shareId"].ToString(); recordCount = PersonalFileBll.GetShareFolersCount(shareFolderIds); storageDataSource = PersonalFileBll.GetShareFolders(shareFolderIds, this.AspNetPager1.PageSize, this.AspNetPager1.CurrentPageIndex); } else { PersonalFileModel model = this.personalFileBll.GetModel(selectedValue); if (model != null) { if (model.FileOwner != base.UserCode) { this.btnAdd.Disabled = true; this.FileUpload2.Visible = false; isShare = true; } if (this.tvFile.Nodes[0].Value == model.Id) { this.FileUpload2.Visible = false; } } recordCount = PersonalFileBll.GetAllFilesCount(selectedValue, this.txtStartTime.Text, this.txtEndTime.Text, this.txtFileName.Text, WebUtil.GetBSize(this.txtStartSize.Text), WebUtil.GetBSize(this.txtEndSize.Text), base.UserCode, isGetAll, isShare); storageDataSource = PersonalFileBll.GetAllFiles(selectedValue, this.txtStartTime.Text, this.txtEndTime.Text, this.txtFileName.Text, WebUtil.GetBSize(this.txtStartSize.Text), WebUtil.GetBSize(this.txtEndSize.Text), base.UserCode, isGetAll, isShare, this.AspNetPager1.PageSize, this.AspNetPager1.CurrentPageIndex); } this.AspNetPager1.RecordCount = recordCount; Common2.BindGvTable(storageDataSource, this.gvFile, true); }
protected string ShareImageUrl(string id) { PersonalFileBll personalFileBll = new PersonalFileBll(); string result = "/images/tree/FileInfo/folderSubtract.png"; if (personalFileBll.GetListArray(string.Concat(new string[] { " where parentId='", id, "' AND ShareUsers like'%", base.UserCode, "%'" })).Count > 0) { result = "/images/tree/FileInfo/folderAdd.png"; } return(result); }
protected void bindSelUser() { string a = base.Request["showType"]; System.Collections.Generic.List <string> list = new System.Collections.Generic.List <string>(); if (a == "1") { string id = base.Request["showId"]; FileInfoBll fileInfoBll = new FileInfoBll(); FileInfoModel model = fileInfoBll.GetModel(id); if (model != null) { list = this.getUserCodes(model.UserCodes); } } else { if (a == "2") { string id2 = base.Request["showId"]; PersonalFileBll personalFileBll = new PersonalFileBll(); PersonalFileModel model2 = personalFileBll.GetModel(id2); if (model2 != null) { list = this.getUserCodes(model2.ShareUsers); this.hfldNoSelCodes.Value = "00000000," + model2.FileOwner; } } else { if (a == "3") { string progressId = base.Request["progressId"]; list = cn.justwin.BLL.ProgressManagement.Privilege.GetUserCodes(progressId); } else { list = cn.justwin.BLL.Privilege.Privilege.GetUserCodes(base.Request["RelationsTable"], base.Request["RelationsKey"]); } } } this.hdId.Value = string.Join(",", list.ToArray()) + ","; this.AddUsers(list); }