Пример #1
0
        public static List <DepartmentEntity> GetAllDepartment()
        {
            var key = "GetAllDepartmentEntity";
            var all = MemoryCacheUtils.Get(key) as List <DepartmentEntity>;

            if (all == null)
            {
                all = DepartmentDA.GetAllDepartment();
                MemoryCacheUtils.Set(key, all);
            }
            return(all);
        }
Пример #2
0
        public DataTable GetDepartments()
        {
            string    key   = "DepartmentListKey";
            DataTable depts = (DataTable)primitivesCache.GetData(key);

            if (depts == null)
            {
                DepartmentDA da = new DepartmentDA();
                depts = da.GetDepartments();

                primitivesCache.Add(key, depts, CacheItemPriority.Normal, null,
                                    new SlidingTime(TimeSpan.FromMinutes(System.Convert.ToInt32(ConfigUtil.GetConfigItem("StaticElementCacheDuration")))));
            }
            return(depts);
        }
Пример #3
0
 /// <summary>
 /// This Function is used to get list of all the Department using state Id  from Database.
 /// </summary>
 public static List <Department> GetAllByState(int stateId)
 {
     return(DepartmentDA.GetAllByState(stateId));
 }
Пример #4
0
 /// <summary>
 /// This Function is used to get list of all the Department using department type from Database.
 /// </summary>
 public static List <Department> GetAllByType(int departmentTypeId)
 {
     return(DepartmentDA.GetAllByType(departmentTypeId));
 }
Пример #5
0
 /// <summary>
 /// This Function is used to get list of all the Department using location or type of locations from Database.
 /// </summary>
 public static List <Department> GetAllByLocationAndType(int stateId, int cityId, int villageId, int localityId, int departmentTypeId)
 {
     return(DepartmentDA.GetAllByLocationAndType(stateId, cityId, villageId, localityId, departmentTypeId));
 }
Пример #6
0
 /// <summary>
 /// This Function is used to get list of all the Department using username from Database.
 /// </summary>
 public static List <Department> GetAllByUseraname(string username)
 {
     return(DepartmentDA.GetAllByUseraname(username));
 }
Пример #7
0
 /// <summary>
 /// This Function is used to get list of all the Department from Database.
 /// </summary>
 public static List <Department> GetAll()
 {
     return(DepartmentDA.GetAll());
 }
Пример #8
0
 public static List <Department> GetDepartmentByCompanyID(int companyID)
 {
     return(DepartmentDA.GetDepartmentByCompanyID(companyID).Select(DepartmentEntity.Convert).ToList());
 }
 public DepartmentBL()
 {
     DL    = new DepartmentDA();
     DocDL = new DoctorDA();
 }
Пример #10
0
 /// <summary>
 /// This Function is used to Delete previously added Department from database and is performed by SuperAdmin Only.
 /// </summary>
 public static bool Delete(Department info)
 {
     return(DepartmentDA.Delete(info));
 }
Пример #11
0
 /// <summary>
 /// This Function is used to Update previously added Department in database and is performed by SuperAdmin Only.
 /// </summary>
 public static bool Update(Department info)
 {
     return(DepartmentDA.Update(info));
 }
Пример #12
0
 /// <summary>
 /// This Function is used to add new Department to database and is performed by SuperAdmin Only.
 /// </summary>
 public static bool Add(Department info)
 {
     return(DepartmentDA.Add(info));
 }
Пример #13
0
 /// <summary>
 /// This Function is used to get list of all the Department using locality Id  from Database.
 /// </summary>
 public static List <Department> GetAllByLocality(int localityId)
 {
     return(DepartmentDA.GetAllByLocality(localityId));
 }
Пример #14
0
 /// <summary>
 /// This Function is used to get list of all the Department using village Id  from Database.
 /// </summary>
 public static List <Department> GetAllByVillageId(int villageId)
 {
     return(DepartmentDA.GetAllByVillageId(villageId));
 }
 public SystemMessageTemplateController()
 {
     _systemMessageTemplateDa = new SystemMessageTemplateDA("#");
     _departmentDA            = new DepartmentDA("#");
 }
Пример #16
0
 /// <summary>
 /// This Function is used to get list of all the Department using city Id  from Database.
 /// </summary>
 public static List <Department> GetAllByCity(int cityId)
 {
     return(DepartmentDA.GetAllByCity(cityId));
 }
Пример #17
0
 /// <summary>
 /// This Function is used to get Details of the Department from Database.
 /// </summary>
 public static Department GetDetails(int id)
 {
     return(DepartmentDA.GetDetails(id));
 }
Пример #18
0
 public static Department GetDetailsByLocationAndType(int stateId, int cityId, int villageId, int localityId, int departmentTypeId)
 {
     return(DepartmentDA.GetDetailsByLocationAndType(stateId, cityId, villageId, localityId, departmentTypeId));
 }
Пример #19
0
 /// <summary>
 /// 获取单位列表
 /// </summary>
 /// <returns>返回单位列表</returns>
 public List <DepartmentVO> List()
 {
     return(DepartmentDA.List().Select(p => p.ToDepartmentVO()).ToList());
 }
Пример #20
0
 public static List <Department> GetCompanyByAccountAuth(int accountId, int authID)
 {
     return(DepartmentDA.GetCompanyByAccountAuth(accountId, authID).Select(DepartmentEntity.Convert).ToList());
 }