示例#1
0
        /// <summary>
        /// 修改阶段
        /// </summary>
        /// <returns></returns>
        public StageUpdateResponse UpdateStage(StageUpdaterequest request)
        {
            StageUpdateResponse response = new StageUpdateResponse();

            StagePlanInfo info = new StagePlanInfo()
            {
                PlanId          = request.PlanId,
                StageName       = request.StageName,
                StageStaus      = 1,
                StageStartTime  = request.StageStartTime.ToUniversalTime(),
                StageFinishTime = request.StageFinishTime.ToUniversalTime(),
                StageStaffName  = request.StageStaffName
            };

            var result = dal.UpdateStage(info);

            if (result > 0)
            {
                response.Message         = "阶段修改成功";
                response.IsRegistSuccess = true;
            }
            else
            {
                response.Message         = "阶段修改失败";
                response.IsRegistSuccess = false;
            }

            return(response);
        }
示例#2
0
        /// <summary>
        /// 新增阶段
        /// </summary>
        /// <returns></returns>
        public StageAddResponse AddStage(StageAddRequest request)
        {
            StageAddResponse response = new StageAddResponse();

            StagePlanInfo info = new StagePlanInfo()
            {
                ProjectStageId  = request.ProjectStageId,
                StageName       = request.StageName,
                StageFinishTime = request.StageFinishTime.ToUniversalTime(),
                StageStaffName  = request.StageStaffName,
                StageStartTime  = request.StageStartTime,
                StageStaus      = 1
            };

            var result = dal.AddStage(info);

            if (result > 0)
            {
                response.Message         = "阶段添加成功";
                response.IsRegistSuccess = true;
            }

            else
            {
                response.Message         = "阶段添加失败";
                response.IsRegistSuccess = false;
            }

            return(response);
        }
示例#3
0
        /// <summary>
        /// 新增阶段
        /// </summary>
        /// <returns></returns>
        public int AddStage(StagePlanInfo info)
        {
            string sql = @"insert into StagePlanInfo 
                         (StageName,StageStartTime,StageFinishTime,
                          StageStaffName,ProjectStageId,StageStaus)
                          values(@StageName,@StageStartTime,
                          @StageFinishTime,@StageStaffName,
                          @ProjectStageId,@StageStaus)";

            return(DapperHelper <StagePlanInfo> .Execute(sql, info));
        }
示例#4
0
        /// <summary>
        /// 修改阶段
        /// </summary>
        /// <returns></returns>
        public int UpdateStage(StagePlanInfo info)
        {
            string sql = "update StagePlanInfo set StageName=@StageName ,StageStartTime=@StageStartTime,StageFinishTime=@StageFinishTime,StageStaffName=@StageStaffName,StageStaus=@StageStaus where PlanId=@PlanId";

            return(DapperHelper <StagePlanInfo> .Execute(sql, info));
        }