/// <summary> /// 页码下拉框 /// </summary> /// <param name="DLL">目标下拉框</param> public static void DropDownPageSize(FineUIPro.DropDownList DDL) { DDL.Items.Insert(0, new FineUIPro.ListItem("10", "10")); DDL.Items.Insert(1, new FineUIPro.ListItem("20", "20", true)); DDL.Items.Insert(2, new FineUIPro.ListItem("30", "30")); DDL.Items.Insert(3, new FineUIPro.ListItem("50", "50")); DDL.Items.Insert(4, new FineUIPro.ListItem("所有行", "1000000")); return; }
/// <summary> /// 表下拉框 /// </summary> /// <param name="dropName">下拉框名字</param> /// <param name="isShowPlease">是否显示请选择</param> public static void InitPersonByProjectUnitDropDownList(FineUIPro.DropDownList dropName, string projectId, string unitId, bool isShowPlease) { dropName.DataValueField = "PersonId"; dropName.DataTextField = "PersonName"; dropName.DataSource = GetPersonLitsByprojectIdUnitId(projectId, unitId); dropName.DataBind(); if (isShowPlease) { Funs.FineUIPleaseSelect(dropName); } }
/// <summary> /// 角色下拉框 /// </summary> /// <param name="dropName">下拉框名字</param> /// <param name="projectId">项目id</param> /// <param name="isShowPlease">是否显示请选择</param> public static void InitRoleDropDownList(FineUIPro.DropDownList dropName, string roleId, bool isShowPlease) { dropName.DataValueField = "RoleId"; dropName.DataTextField = "RoleName"; dropName.DataSource = BLL.RoleService.GetRoleDropDownList(roleId); dropName.DataBind(); if (isShowPlease) { Funs.FineUIPleaseSelect(dropName); } }
/// <summary> /// 培训级别下拉框 /// </summary> /// <param name="dropName">下拉框名字</param> /// <param name="isShowPlease">是否显示请选择</param> public static void InitTrainLevelDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease) { dropName.DataValueField = "TrainLevelId"; dropName.DataTextField = "TrainLevelName"; dropName.DataSource = GetTrainLevelList(); dropName.DataBind(); if (isShowPlease) { Funs.FineUIPleaseSelect(dropName); } }
/// <summary> /// 许可证类型下拉框 /// </summary> /// <param name="dropName">下拉框名字</param> /// <param name="isShowPlease">是否显示请选择</param> public static void InitLicenseTypeDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease) { dropName.DataValueField = "LicenseTypeId"; dropName.DataTextField = "LicenseTypeName"; dropName.DataSource = GetLicenseTypeList(); dropName.DataBind(); if (isShowPlease) { Funs.FineUIPleaseSelect(dropName); } }
/// <summary> /// 安全措施表下拉框 /// </summary> /// <param name="dropName">下拉框名字</param> /// <param name="isShowPlease">是否显示请选择</param> public static void InitSafetyMeasuresDropDownList(FineUIPro.DropDownList dropName, string licenseType, bool isShowPlease) { dropName.DataValueField = "SafetyMeasuresId"; dropName.DataTextField = "SafetyMeasures"; dropName.DataSource = BLL.SafetyMeasuresService.GetSafetyMeasuresList(licenseType); dropName.DataBind(); if (isShowPlease) { Funs.FineUIPleaseSelect(dropName); } }
/// <summary> /// 应急响应类型下拉框 /// </summary> /// <param name="dropName">下拉框名字</param> /// <param name="projectId">项目id</param> /// <param name="isShowPlease">是否显示请选择</param> public static void InitEmergencyTypeDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease) { dropName.DataValueField = "EmergencyTypeId"; dropName.DataTextField = "EmergencyTypeName"; dropName.DataSource = BLL.EmergencyTypeService.GetEmergencyTypeList(); dropName.DataBind(); if (isShowPlease) { Funs.FineUIPleaseSelect(dropName); } }
/// <summary> /// 区域表下拉框 /// </summary> /// <param name="dropName">下拉框名字</param> /// <param name="isShowPlease">是否显示请选择</param> public static void InitWorkAreaProjetcUnitDropDownList(FineUIPro.DropDownList dropName, string projectId, string unitId, bool isShowPlease) { dropName.DataValueField = "WorkAreaId"; dropName.DataTextField = "WorkAreaName"; dropName.DataSource = BLL.WorkAreaService.GetWorkAreaByProjectIdUnitId(projectId); dropName.DataBind(); if (isShowPlease) { Funs.FineUIPleaseSelect(dropName); } }
/// <summary> /// 物质类别表下拉框 /// </summary> /// <param name="dropName">下拉框名字</param> /// <param name="isShowPlease">是否显示请选择</param> public static void InitUnitDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease) { dropName.DataValueField = "GoodsCategoryId"; dropName.DataTextField = "GoodsCategoryName"; dropName.DataSource = GetGoodsCategoryList(); dropName.DataBind(); if (isShowPlease) { Funs.FineUIPleaseSelect(dropName); } }
/// <summary> /// 表下拉框 /// </summary> /// <param name="dropName">下拉框名字</param> /// <param name="isShowPlease">是否显示请选择</param> public static void InitCertificateDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease) { dropName.DataValueField = "CertificateId"; dropName.DataTextField = "CertificateName"; dropName.DataSource = BLL.CertificateService.GetCertificateList(); dropName.DataBind(); if (isShowPlease) { Funs.FineUIPleaseSelect(dropName); } }
/// <summary> /// 表下拉框 /// </summary> /// <param name="dropName">下拉框名字</param> /// <param name="isShowPlease">是否显示请选择</param> public static void InitDepartDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease) { dropName.DataValueField = "DepartId"; dropName.DataTextField = "DepartName"; dropName.DataSource = BLL.DepartService.GetDepartList(); dropName.DataBind(); if (isShowPlease) { Funs.FineUIPleaseSelect(dropName); } }
/// <summary> /// 表下拉框 /// </summary> /// <param name="dropName">下拉框名字</param> /// <param name="isShowPlease">是否显示请选择</param> public static void InitTeamGroupProjectUnitDropDownList(FineUIPro.DropDownList dropName, string projectId, string unitId, bool isShowPlease) { dropName.DataValueField = "TeamGroupId"; dropName.DataTextField = "TeamGroupName"; dropName.DataSource = GetTeamGroupListByUnitId(projectId, unitId); dropName.DataBind(); if (isShowPlease) { Funs.FineUIPleaseSelect(dropName); } }
/// <summary> /// 表下拉框 /// </summary> /// <param name="dropName">下拉框名字</param> /// <param name="isShowPlease">是否显示请选择</param> public static void InitWorkPostDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease) { dropName.DataValueField = "WorkStageId"; dropName.DataTextField = "WorkStageName"; dropName.DataSource = GetWorkStageList(); dropName.DataBind(); if (isShowPlease) { Funs.FineUIPleaseSelect(dropName); } }
/// <summary> /// 表下拉框 /// </summary> /// <param name="dropName">下拉框名字</param> /// <param name="isShowPlease">是否显示请选择</param> public static void InitPostTitleDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease) { dropName.DataValueField = "PostTitleId"; dropName.DataTextField = "PostTitleName"; dropName.DataSource = BLL.PostTitleService.GetPostTitleList(); dropName.DataBind(); if (isShowPlease) { Funs.FineUIPleaseSelect(dropName); } }
/// <summary> /// 用户下拉框 /// </summary> /// <param name="dropName">下拉框名字</param> /// <param name="projectId">项目id</param> /// <param name="roleIds">角色id</param> /// <param name="isShowPlease">是否显示请选择</param> public static void InitUserProjectIdRoleIdDropDownList(FineUIPro.DropDownList dropName, string projectId, string roleIds, bool isShowPlease) { dropName.DataValueField = "UserId"; dropName.DataTextField = "UserName"; dropName.DataSource = BLL.UserService.GetUserListByProjectIdAndRoleId(projectId, roleIds); dropName.DataBind(); if (isShowPlease) { Funs.FineUIPleaseSelect(dropName); } }
/// <summary> /// 获取分公司表下拉框 /// </summary> /// <param name="dropName"></param> /// <param name="isShowPlease"></param> public static void InitBranchUnitDropDownList(FineUIPro.DropDownList dropName, string unitId, bool isShowPlease) { dropName.DataValueField = "UnitId"; dropName.DataTextField = "UnitName"; dropName.DataSource = BLL.UnitService.GetSubUnitList(unitId); dropName.DataBind(); if (isShowPlease) { Funs.FineUIPleaseSelect(dropName); } }
/// <summary> /// 带角色用户下拉框 /// </summary> /// <param name="dropName">下拉框名字</param> /// <param name="projectId">项目id</param> /// <param name="isShowPlease">是否显示请选择</param> public static void InitFlowOperateControlUserDropDownList(FineUIPro.DropDownList dropName, string projectId, string unitId, bool isShowPlease) { dropName.DataValueField = "UserId"; dropName.DataTextField = "UserName"; dropName.DataSource = BLL.UserService.GetProjectRoleUserListByProjectId(projectId, unitId); dropName.DataBind(); if (isShowPlease) { Funs.FineUIPleaseSelect(dropName); } }
/// <summary> /// 根据单位类型获取单位表下拉框 /// </summary> /// <param name="dropName">下拉框名字</param> /// <param name="isShowPlease">是否显示请选择</param> public static void InitUnitNameByProjectIdUnitTypeDropDownList(FineUIPro.DropDownList dropName, string projectId, string unitType, bool isShowPlease) { dropName.DataValueField = "UnitName"; dropName.DataTextField = "UnitName"; dropName.DataSource = BLL.UnitService.GetUnitByProjectIdUnitTypeList(projectId, unitType); dropName.DataBind(); if (isShowPlease) { Funs.FineUIPleaseSelect(dropName); } }
/// <summary> /// 检查项表下拉框 /// </summary> /// <param name="dropName">下拉框名字</param> /// <param name="isShowPlease">是否显示请选择</param> public static void InitCheckItemSetNameDropDownList(FineUIPro.DropDownList dropName, string checkType, string supCheckItem, bool isShowPlease) { dropName.DataValueField = "CheckItemName"; dropName.DataTextField = "CheckItemName"; dropName.DataSource = GetCheckItemSetListByCheckTypeSupCheckItem(checkType, supCheckItem); dropName.DataBind(); if (isShowPlease) { Funs.FineUIPleaseSelect(dropName); } }
public static void InitConstNameDropDownList(FineUIPro.DropDownList dropName, string groupId, bool isShowPlease) { dropName.DataValueField = "ConstText"; dropName.DataTextField = "ConstText"; dropName.DataSource = ConstValue.drpConstItemList(groupId); dropName.DataBind(); if (isShowPlease) { Funs.FineUIPleaseSelect(dropName); } }
/// <summary> /// 获取分公司表下拉框 /// </summary> /// <param name="dropName"></param> /// <param name="isShowPlease"></param> public static void InitMenuFlowOperateDropDownList(FineUIPro.DropDownList dropName, string menuId, string thisId, bool isShowPlease) { dropName.DataValueField = "FlowOperateId"; dropName.DataTextField = "AuditFlowName"; dropName.DataSource = (from x in Funs.DB.Sys_MenuFlowOperate where x.MenuId == menuId && x.IsFlowEnd == false && x.FlowOperateId != thisId orderby x.FlowStep select x).ToList(); dropName.DataBind(); if (isShowPlease) { Funs.FineUIPleaseSelect(dropName); } }
/// <summary> /// 某类型下项目表下拉框 /// </summary> /// <param name="dropName">下拉框名字</param> /// <param name="isShowPlease">是否显示请选择</param> public static void InitProjectByProjectTypeDropDownList(FineUIPro.DropDownList dropName, string projectType, bool isShowPlease) { dropName.DataValueField = "ProjectId"; dropName.DataTextField = "ProjectName"; var projectlist = BLL.ProjectService.GetProjectByProjectTypeDropDownList(projectType); dropName.DataSource = projectlist; dropName.DataBind(); if (projectlist.Count() == 0) { isShowPlease = true; } if (isShowPlease) { Funs.FineUIPleaseSelect(dropName); } }
/// <summary> /// 项目类型单位表下拉框 /// </summary> /// <param name="dropName">下拉框名字</param> /// <param name="isShowPlease">是否显示请选择</param> public static void InitUnitDropDownList(FineUIPro.DropDownList dropName, string projectId, string unitType, bool isShowPlease) { var pUnit = (from x in Funs.DB.Project_ProjectUnit join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId where x.ProjectId == projectId && x.UnitType == unitType orderby y.UnitCode select y).ToList(); dropName.DataValueField = "UnitId"; dropName.DataTextField = "UnitName"; dropName.DataSource = pUnit; dropName.DataBind(); if (isShowPlease) { Funs.FineUIPleaseSelect(dropName); } }
/// <summary> /// 单位下拉选择项(添加其他单位) /// </summary> /// <param name="dropName"></param> /// <param name="projectId"></param> /// <param name="isShowPlease"></param> public static void InitUnitOtherDropDownList(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease) { dropName.DataValueField = "UnitId"; dropName.DataTextField = "UnitName"; List <Model.Base_Unit> units = new List <Model.Base_Unit>(); units.AddRange(BLL.UnitService.GetUnitListByProjectId(projectId)); Model.Base_Unit other = new Model.Base_Unit { UnitName = "其他", UnitId = "0" }; units.Add(other); dropName.DataSource = units; dropName.DataBind(); if (isShowPlease) { Funs.FineUIPleaseSelect(dropName); } }
/// <summary> /// 为目标下拉框加上选择内容 /// </summary> /// <param name="DLL">目标下拉框</param> public static void FineUIPleaseSelect(FineUIPro.DropDownList DDL, string text) { DDL.Items.Insert(0, new FineUIPro.ListItem(text, BLL.Const._Null)); return; }
///// <summary> ///// 为目标下拉框加上 "请选择" 项 ///// </summary> ///// <param name="DLL">目标下拉框</param> //public static void PleaseSelect(System.Web.UI.WebControls.DropDownList DDL) //{ // DDL.Items.Insert(0, new System.Web.UI.WebControls.ListItem("- 请选择 -", "0")); // return; //} /// <summary> /// 为目标下拉框加上 "请选择" 项 /// </summary> /// <param name="DLL">目标下拉框</param> public static void FineUIPleaseSelect(FineUIPro.DropDownList DDL) { DDL.Items.Insert(0, new FineUIPro.ListItem("- 请选择 -", BLL.Const._Null)); return; }