示例#1
0
        public ActionResult UpdateRepro(string id, string DemandCode, string Description, string Provider, string date, string Solver, string ifsolve, string DevelopTime, string DesignTime, string TestTime)
        {
            CIReviewProblem reviewpro = new CIReviewProblem();

            reviewpro             = _reviewproService.GetById(id);
            reviewpro.DemandCode  = DemandCode;
            reviewpro.Description = Description;
            reviewpro.Provider    = Provider;
            reviewpro.Solver      = Solver;
            reviewpro.IfSolve     = ifsolve;
            reviewpro.DevelopTime = DevelopTime;
            reviewpro.DesignTime  = DesignTime;
            reviewpro.TestTime    = TestTime;
            if (date == "")
            {
                date = DateTime.Now.ToString();
            }
            reviewpro.Deadline   = Convert.ToDateTime(date);
            reviewpro.UpdateTime = DateTime.Now;

            int num = _reviewproService.UpdatePro(reviewpro);

            if (num > 0)
            {
                return(Content("编辑成功"));
            }
            else
            {
                return(Content("编辑失败"));
            }
        }
示例#2
0
        public ActionResult InsertReproWithOutDeadLine(string DemandCode, string Description, string Provider, string date, string Solver, string ifsolve, string DevelopTime, string DesignTime, string TestTime)
        {
            CIReviewProblem reviewpro = new CIReviewProblem();
            int             num       = 0;

            reviewpro.ID          = Guid.NewGuid().ToString();
            reviewpro.ReviewID    = "";
            reviewpro.DemandCode  = DemandCode;
            reviewpro.Provider    = Provider;
            reviewpro.Solver      = Solver;
            reviewpro.Description = Description;
            reviewpro.IfSolve     = ifsolve;
            reviewpro.DevelopTime = DevelopTime;
            reviewpro.DesignTime  = DesignTime;
            reviewpro.TestTime    = TestTime;
            reviewpro.AddTime     = DateTime.Now;
            reviewpro.UpdateTime  = DateTime.Now;
            if (date == "")
            {
                date = DateTime.Now.ToString();
            }
            reviewpro.Deadline = Convert.ToDateTime(date);

            num = _reviewproService.InsertPro(reviewpro);

            if (num > 0)
            {
                return(Content("提交成功"));
            }
            else
            {
                return(Content("提交失败"));
            }
        }
示例#3
0
        /// <summary>
        /// 删除项目
        /// </summary>
        /// <param name="checkitem"></param>
        /// <returns></returns>
        public int Delete(CIReviewProblem reviewpro)
        {
            const string sql = "DELETE FROM CIReviewProblem WHERE ID=@ID ";

            using (var conn = new DapperHelper().OpenConnection())
            {
                return(conn.Execute(sql, new { ID = reviewpro.ID }));
            }
        }
示例#4
0
        /// <summary>
        /// 添加项目
        /// </summary>
        /// <param name="checkitem"></param>
        /// <returns></returns>
        public int Insert(CIReviewProblem reviewpro)
        {
            var sql = @"INSERT INTO CIReviewProblem 
                              (ID,ReviewID,DemandCode,Description,Provider,Deadline,Solver,IfSolve,DevelopTime,DesignTime,TestTime,AddTime,UpdateTime) 
                      VALUES (@ID,@ReviewID,@DemandCode,@Description,@Provider,@Deadline,@Solver,@IfSolve,@DevelopTime,@DesignTime,@TestTime,@AddTime,@UpdateTime)";

            using (var conn = new DapperHelper().OpenConnection())
            {
                return(conn.Execute(sql, reviewpro));
            }
        }
示例#5
0
        public ReviewModel()
        {
            ReviewList         = new List <CIReview>();
            Review             = new CIReview();
            PageList           = new ReviewPageList();
            StatusSelectItem   = new List <SelectListItem>();
            MethodSelectItem   = new List <SelectListItem>();
            User               = new CIUser();
            UserList           = new List <CIUser>();
            IfReviewSelectItem = new List <SelectListItem>();

            ReviewPro         = new CIReviewProblem();
            DemandList        = new List <CIDemand>();
            IfSolveSelectItem = new List <SelectListItem>();
            DemandSelectItem  = new List <SelectListItem>();
            Demand            = new CIDemand();
            DemandList        = new List <CIDemand>();
        }
示例#6
0
        /// <summary>
        /// 编辑项目
        /// </summary>
        /// <param name="checkitem"></param>
        /// <returns></returns>
        public int Update(CIReviewProblem reviewpro)
        {
            const string sql = @"UPDATE CIReviewProblem SET
				                                        DemandCode = @DemandCode,	
				                                        Description = @Description,	
				                                        Provider = @Provider,	
				                                        Deadline = @Deadline,	
				                                        Solver = @Solver,	
				                                        IfSolve = @IfSolve,
                                                        DevelopTime = @DevelopTime,
                                                        DesignTime = @DesignTime,
                                                        TestTime = @TestTime,
                                                        UpdateTime = @UpdateTime
				                       WHERE ID=@ID "                            ;

            using (var conn = new DapperHelper().OpenConnection())
            {
                return(conn.Execute(sql, reviewpro));
            }
        }
示例#7
0
 /// <summary>
 /// 编辑需求
 /// </summary>
 /// <param name="project"></param>
 /// <returns></returns>
 public int UpdatePro(CIReviewProblem reviewpro)
 {
     return(_reviewproblemRepositpry.Update(reviewpro));
 }
示例#8
0
 /// <summary>
 /// 添加评审
 /// </summary>
 /// <param name="project"></param>
 /// <returns></returns>
 public int InsertPro(CIReviewProblem reviewpro)
 {
     return(_reviewproblemRepositpry.Insert(reviewpro));
 }
示例#9
0
 /// <summary>
 /// 新增需求
 /// </summary>
 /// <param name="reviewpro"></param>
 /// <returns></returns>
 public int InsertReproWithOutReviewID(CIReviewProblem reviewpro)
 {
     return(_reviewproblemRepositpry.InsertReproWithOutDeadLine(reviewpro));
 }