Ejemplo n.º 1
0
        /// <summary>
        /// 查询是否已审核了,则不能修改了
        /// </summary>
        /// <param name="feeappid"></param>
        /// <returns></returns>
        public bool GetYNSH()
        {
            ReviewDAL dal  = new ReviewDAL(connectionString);
            bool      flsh = dal.GetYNSH(_feeappid);

            return(flsh);
        }
Ejemplo n.º 2
0
        public List <Review> GetReviewById(int articleId)
        {
            var reviews = new List <ReviewDAL>();

            using (SqlConnection conn = new SqlConnection(connString))
            {
                conn.Open();

                SqlCommand cmd = new SqlCommand("PS_GetReviewByArticleId", conn);

                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.Add(new SqlParameter("@articleId", articleId));
                using (SqlDataReader rdr = cmd.ExecuteReader())
                {
                    while (rdr.Read())
                    {
                        var review = new ReviewDAL();
                        review.ArticleId  = (int)rdr["ArticleId"];
                        review.Score      = (int)rdr["Score"];
                        review.ReviewId   = (int)rdr["ReviewId"];
                        review.Comments   = (string)rdr["Comments"];
                        review.ReviewDate = (DateTime)rdr["ReviewDate"];
                        reviews.Add(review);
                    }
                }
            }

            List <Review> articleReview = reviews.Select(review => review.ToDomain()).ToList();

            return(articleReview);
        }
Ejemplo n.º 3
0
 public ReviewBLL()
 {
     reviewDAL = new ReviewDAL();
 }
Ejemplo n.º 4
0
        /// <summary>
        /// 审核状态
        /// </summary>
        /// <param name="feeappid"></param>
        /// <param name="groupname"></param>
        /// <returns></returns>
        public bool GetSHstate(int feeappid, string groupname)
        {
            ReviewDAL dal = new ReviewDAL(connectionString);

            return(dal.GetSHstate(feeappid, groupname));
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 查询财务经理是否审核通过
        /// </summary>
        /// <param name="feeappid"></param>
        /// <returns></returns>
        public bool GetCWstate()
        {
            ReviewDAL dal = new ReviewDAL(connectionString);

            return(dal.GetCWstate(_feeappid));
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 向数据库添加一条记录
        /// </summary>
        /// <param name="actionname"></param>
        /// <param name="actioncolumnid"></param>
        /// <param name="actionstr"></param>
        /// <param name="viewmode"></param>
        /// <returns>返回ID</returns>
        public int Add()
        {
            ReviewDAL dal = new ReviewDAL(connectionString);

            return(dal.Add(_feeappid, _masterid, _mastername, _reviewtime, _advice, _state));
        }
Ejemplo n.º 7
0
        /// <summary>
        /// 查询指定申请单的审核意见
        /// </summary>
        /// <param name="feeappid"></param>
        /// <returns></returns>
        public ArrayList Select()
        {
            ReviewDAL dal = new ReviewDAL(connectionString);

            return(dal.Select(_feeappid));
        }
Ejemplo n.º 8
0
        /// <summary>
        /// 判断是否审核
        /// </summary>
        /// <param name="mastername"></param>
        /// <param name="feeappid"></param>
        /// <returns></returns>
        public bool GetYN(string mastername, int feeappid)
        {
            ReviewDAL dal = new ReviewDAL(connectionString);

            return(dal.GetYN(mastername, feeappid));
        }
Ejemplo n.º 9
0
        /// <summary>
        /// 如果副总经理和财务经理审核通过后就修改费用表的state字段,该申请单生效
        /// </summary>
        /// <param name="feeappid"></param>
        /// <returns></returns>
        public bool UpdateFeeApp()
        {
            ReviewDAL dal = new ReviewDAL(connectionString);

            return(dal.UpdateFeeApp(_feeappid, _foottime));
        }
Ejemplo n.º 10
0
        /// <summary>
        /// 查询指定用户已审核后的申请单
        /// </summary>
        /// <returns></returns>
        public bool GetEndReview(int feeappid, int masterid)
        {
            ReviewDAL dal = new ReviewDAL(connectionString);

            return(dal.GetEndReview(feeappid, masterid));
        }