Example #1
0
        /// <summary>
        /// 删除文件
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public bool DelResurces(int id)
        {
            BLL.CommonClass.ChangeLogs cl_h_info = new BLL.CommonClass.ChangeLogs("Resources", "ltrim(rtrim(ResID))");
            cl_h_info.AddRecord(id);
            cl_h_info.DeletedIntoLogs(BLL.CommonClass.ChangeCategory.company18, id.ToString(), BLL.CommonClass.ENUM_USERTYPE.objecttype10);

            ResourcesDAL dao = new ResourcesDAL();

            return(dao.DelResurces(id));
        }
Example #2
0
 /// <summary>
 /// This procedure is used for the update the resource key value.
 /// </summary>
 /// <param name="i_sConnectionString">DB Connection string</param>
 /// <param name="m_objResourceDTO">Object of Resource DTO</param>
 /// <returns>If saves return true otherwise false</returns>
 public bool SaveDetails(string i_sConnectionString, ResourcesDTO m_objResourcesDTO)
 {
     try
     {
         using (var objResourcesDAL = new ResourcesDAL())
         {
             return(objResourcesDAL.Save(i_sConnectionString, m_objResourcesDTO));
         }
     }
     catch (Exception exp)
     {
         throw exp;
     }
 }
Example #3
0
        /// <summary>
        /// 修改上传资料
        /// </summary>
        /// <param name="resource"></param>
        /// <returns></returns>
        public bool UpdateResource(ResourceModel resource)
        {
            BLL.CommonClass.ChangeLogs cl_h_info = new BLL.CommonClass.ChangeLogs("Resources", "ltrim(rtrim(ResID))");

            cl_h_info.AddRecord(resource.ResID);

            ResourcesDAL dao = new ResourcesDAL();
            bool         boo = dao.UpdateResource(resource);

            cl_h_info.AddRecord(resource.ResID);
            cl_h_info.ModifiedIntoLogs(BLL.CommonClass.ChangeCategory.company18, resource.ResID.ToString(), BLL.CommonClass.ENUM_USERTYPE.objecttype10);

            return(boo);
        }
Example #4
0
 /// <summary>
 /// This method is used for fetching details of resource key.
 /// </summary>
 /// <param name="i_sConnectionString">DB COnnection string</param>
 /// <param name="inp_sResourceKey">Resource Key</param>
 /// <returns>Object of ResourceDTO</returns>
 public ResourcesDTO GetDetails(string i_sConnectionString, string inp_sResourceKey)
 {
     try
     {
         using (var objResourcesDAL = new ResourcesDAL())
         {
             return(objResourcesDAL.GetDetails(i_sConnectionString, inp_sResourceKey));
         }
     }
     catch (Exception exp)
     {
         throw exp;
     }
 }
Example #5
0
 public void GetAllResources(string i_sConnectionString, out Dictionary <string, string> o_lstResources)
 {
     o_lstResources = new Dictionary <string, string>();
     //InsiderTradingDAL.ResourcesDAL objResourcesDAL = new ResourcesDAL();
     try
     {
         using (var objResourcesDAL = new ResourcesDAL())
         {
             objResourcesDAL.GetAllResources(i_sConnectionString, out o_lstResources);
         }
     }
     catch (Exception exp)
     {
         throw exp;
     }
 }
Example #6
0
 /// <summary>
 /// 更新指定的下载次数
 /// </summary>
 /// <param name="resID">资源ID</param>
 /// <returns>返回更新指定的下载次数所影响的行数</returns>
 public static int UpdResourcesResTimesByResID(int resID)
 {
     return(ResourcesDAL.UpdResourcesResTimesByResID(resID));
 }
Example #7
0
 /// <summary>
 /// 查询指定条件的Resources信息
 /// </summary>
 /// <param name="columnNames">列名</param>
 /// <param name="conditions">条件</param>
 /// <returns>返回DataTable对象</returns>
 public static DataTable GetResourcesInfoByConditions(string columnNames, string conditions)
 {
     return(ResourcesDAL.GetResourcesInfoByConditions(columnNames, conditions));
 }
Example #8
0
        public int updresources(string resid)
        {
            ResourcesDAL rd = new ResourcesDAL();

            return(rd.updresources(resid));
        }
Example #9
0
        /// <summary>
        /// 检查文件名称是否存在 DS2012
        /// </summary>
        /// <param name="ResName"></param>
        /// <returns></returns>
        public bool CheckReourceResname(string ResName)
        {
            ResourcesDAL dao = new ResourcesDAL();

            return(dao.CheckReourceResname(ResName));
        }
Example #10
0
        /// <summary>
        /// 插入上传文件
        /// </summary>
        /// <param name="resource"></param>
        /// <returns></returns>
        public bool InsertResource(ResourceModel resource)
        {
            ResourcesDAL dao = new ResourcesDAL();

            return(dao.InsertResource(resource));
        }
Example #11
0
        /// <summary>
        /// 查询出老的文件名
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public string GetOldfilename(int id)
        {
            ResourcesDAL dao = new ResourcesDAL();

            return(dao.GetOldfilename(id));
        }
Example #12
0
        /// <summary>
        /// 检查上传的文件名字是否存在
        /// </summary>
        /// <param name="FileName"></param>
        /// <returns></returns>
        public bool CheckFileName(string FileName)
        {
            ResourcesDAL dao = new ResourcesDAL();

            return(dao.CheckFileName(FileName));
        }
Example #13
0
        /// <summary>
        /// 根据条件查出数据 返回一个结果集 (导出excel)
        /// </summary>
        /// <param name="conction"></param>
        /// <returns></returns>
        public DataTable GetTableForExcel(string conction)
        {
            ResourcesDAL dao = new ResourcesDAL();

            return(dao.GetTableForExcel(conction));
        }
Example #14
0
        /// <summary>
        /// 根据id查询Resource
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ResourceModel GetResourcesById(int id)
        {
            ResourcesDAL dao = new ResourcesDAL();

            return(dao.GetResourcesById(id));
        }
Example #15
0
        /// <summary>
        /// 修改下载次数
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public bool UpdateResutcesResTime(int id)
        {
            ResourcesDAL dao = new ResourcesDAL();

            return(dao.UpdateResutcesResTime(id));
        }