Esempio n. 1
0
        /// <summary>
        /// 读取通过的岗位名称
        /// </summary>
        /// <param name="userID"></param>
        /// <param name="startDate">开始日期</param>
        /// <param name="endDate">截至日期</param>
        /// <param name="count">通过的岗位数量</param>
        /// <returns></returns>
        public static string ReadPassPostName(int userID, DateTime startDate, DateTime endDate, ref int count)
        {
            string       ReturnString = string.Empty;
            PostPassInfo postPass     = new PostPassInfo();

            postPass.UserId          = userID;
            postPass.SearchStartDate = startDate;
            postPass.CreateDate      = endDate;
            postPass.IsRZ            = 1;
            List <PostPassInfo> PostPassList = ReadPostPassList(postPass);

            if (PostPassList != null)
            {
                foreach (PostPassInfo Info in PostPassList)
                {
                    count++;
                    if (string.IsNullOrEmpty(ReturnString))
                    {
                        ReturnString = PostBLL.ReadPost(Info.PostId).PostName;
                    }
                    else
                    {
                        ReturnString = ReturnString + "," + PostBLL.ReadPost(Info.PostId).PostName;
                    }
                }
            }
            return(ReturnString);
        }
Esempio n. 2
0
        /// <summary>
        /// 核对岗位是否通过
        /// </summary>
        /// <param name="productID"></param>
        /// <returns></returns>
        public static void CheckPostPass(int userID, int productID)
        {
            string      companyPostID = CookiesHelper.ReadCookieValue("UserCompanyPostSetting");
            ProductInfo product       = ProductBLL.ReadProduct(productID);

            //如果本次通过的是综合考试,就更新通过岗位的记录状态
            if (StringHelper.CompareSingleString(product.ClassID, "4387", '|'))
            {
                PostPassInfo PostPassModel = new PostPassInfo();
                PostPassModel.UserId = userID;
                PostPassModel.PostId = RenZhengCateBLL.ReadTestCateByID(productID, companyPostID).PostId;
                PostPassModel.IsRZ   = 1;
                PostPassBLL.UpdateIsRZ(PostPassModel);
            }
            else
            {
                //读取和本课程关联的岗位
                List <PostInfo> RelatedPostList = PostBLL.FilterPostListByCourseID(productID);
                if (RelatedPostList != null)
                {
                    //统计通过的课程ID
                    string PassCateId     = TestPaperBLL.ReadCourseIDStr(TestPaperBLL.ReadList(userID, DateTime.Now.AddDays(1), 1));
                    string companyBrandID = CookiesHelper.ReadCookieValue("UserCompanyBrandID");
                    foreach (PostInfo Item in RelatedPostList)
                    {
                        //去除非公司设定的岗位
                        if (StringHelper.CompareSingleString(companyPostID, Item.PostId.ToString()))
                        {
                            string postCourseID = PostBLL.ReadPostCourseID(Item.PostId, companyBrandID);
                            if (string.IsNullOrEmpty(StringHelper.SubString(postCourseID, PassCateId)))
                            {
                                PostPassInfo PostPassModel = PostPassBLL.ReadPostPassInfo(userID, Item.PostId);
                                if (PostPassModel.Id <= 0)
                                {
                                    PostPassModel.UserId   = userID;
                                    PostPassModel.PostId   = Item.PostId;
                                    PostPassModel.PostName = Item.PostName;
                                    if (Item.PostId == 220) //钣金喷漆岗位直接发证书
                                    {
                                        PostPassModel.IsRZ = 1;
                                    }
                                    else
                                    {
                                        PostPassModel.IsRZ = 0;
                                    }
                                    PostPassBLL.AddPostPassInfo(PostPassModel);
                                }
                            }
                        }
                    }
                }
            }
        }
Esempio n. 3
0
        public static void DeleteProduct(string strID)
        {
            UploadBLL.DeleteUploadByRecordID(TableID, strID);
            //ProductBrandBLL.ChangeProductBrandCountByGeneral(strID, ChangeAction.Minus);
            //ProductPhotoBLL.DeleteProductPhotoByProductID(strID);

            //更新与此产品有关联的产品
            UpdateRelationProductByProductId(strID);
            //更新与此新产品有关的岗位计划
            PostBLL.UpdatePostPlan(strID);
            //删除产品
            dal.DeleteProduct(strID);
        }