public static List <Models.DB.Match> MatchCountByStudent(String College)
        {
            List <Models.DB.Match> Matchs = new List <Models.DB.Match>();

            Models.DB.Match Match;
            DataTable       dt = DAL.Select.MatchCountByStudent("校级", College, "未结束");

            if (dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    Match                   = new Models.DB.Match();
                    Match.ID                = Convert.ToInt32(dt.Rows[i]["Id"]);
                    Match.MatchName         = dt.Rows[i]["MatchName"].ToString();
                    Match.Rule              = dt.Rows[i]["Rule"].ToString();
                    Match.ScoreIntro        = dt.Rows[i]["ScoreIntro"].ToString();
                    Match.Status            = dt.Rows[i]["Status"].ToString();
                    Match.MatchModel        = Convert.ToInt32(dt.Rows[i]["MatchModel"]);
                    Match.College           = dt.Rows[i]["College"].ToString();
                    Match.DeadLine          = Convert.ToDateTime(dt.Rows[i]["DeadLine"]);
                    Match.DeclarantDeadLine = Convert.ToDateTime(dt.Rows[i]["DeclarantDeadLine"]);
                    Matchs.Add(Match);
                }
            }
            return(Matchs);
        }
        public static List <Models.DB.Match> FindByString(String Value, String ValueName)
        {
            #region 输入合法性检查
            if (String.IsNullOrEmpty(Value))
            {
                return(null);
            }
            #endregion

            List <Models.DB.Match> list = new List <Models.DB.Match>();

            DataTable dt = DAL.Select.QueryOne(Value, "Tb_Match", ValueName);
            for (int i = 0; i < dt.Rows.Count; ++i)
            {
                Models.DB.Match e = new Models.DB.Match();
                e.ID                = Convert.ToInt32(dt.Rows[i]["ID"]);
                e.MatchName         = dt.Rows[i]["MatchName"].ToString();
                e.DeadLine          = Convert.ToDateTime(dt.Rows[i]["DeadLine"]);
                e.DeclarantDeadLine = Convert.ToDateTime(dt.Rows[i]["DeclarantDeadLine"]);
                e.College           = dt.Rows[i]["College"].ToString();
                e.Status            = dt.Rows[i]["Status"].ToString();
                e.Rule              = dt.Rows[i]["Rule"].ToString();
                e.ScoreIntro        = dt.Rows[i]["ScoreIntro"].ToString();

                e.MatchModel = Convert.ToInt32(dt.Rows[i]["MatchModel"]);

                list.Add(e);
            }
            return(list);
        }
        /// <summary>
        /// 获取一页记录
        /// </summary>
        public static List <Models.DB.Match> SelectOnePage(int current_page, int page_size)
        {
            List <Models.DB.Match> Matchs = new List <Models.DB.Match>();

            Models.DB.Match       Match;
            System.Data.DataTable dt = DAL.Select.GetSome("Tb_Match", page_size, current_page, "Id", "");
            if (dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    Match    = new Models.DB.Match();
                    Match.ID = Convert.ToInt32(dt.Rows[i]["Id"]);
                    //   Match.Level = dt.Rows[i]["Level"].ToString();
                    Match.MatchName = dt.Rows[i]["MatchName"].ToString();
                    //    Match.ProjectID = dt.Rows[i]["ProjectID"].ToString();
                    Match.Rule              = dt.Rows[i]["Rule"].ToString();
                    Match.ScoreIntro        = dt.Rows[i]["ScoreIntro"].ToString();
                    Match.Status            = dt.Rows[i]["Status"].ToString();
                    Match.MatchModel        = Convert.ToInt32(dt.Rows[i]["MatchModel"]);
                    Match.College           = dt.Rows[i]["College"].ToString();
                    Match.DeadLine          = Convert.ToDateTime(dt.Rows[i]["DeadLine"]);
                    Match.DeclarantDeadLine = Convert.ToDateTime(dt.Rows[i]["DeclarantDeadLine"]);
                    Matchs.Add(Match);
                }
            }
            return(Matchs);
        }
Exemple #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Context.Request["ProjectID"] == null)
     {
         Response.Redirect("../../Match/Default.aspx");
     }
     ProjectID    = Request["ProjectID"];
     CupModellist = BLL.CupProjectModel.FindByInt(ProjectID, "ID");
     if (CupModellist.Count <= 0)
     {
         Response.Redirect("../../Match/Default.aspx");
     }
     Match = BLL.Match.SelectOne(Convert.ToInt32(CupModellist[0].MatchID));
     if (Match == null)
     {
         Response.Redirect("../../Match/Default.aspx");
     }
     if ((WorkModel = BLL.CupWorksInfo.FindByInt(ProjectID, "ProjectID")).Count > 0)
     {
         Response.Redirect(String.Format("~/Web/CupProjectModel/CupInfoEdit/WorkInfo.aspx?ProjectID={0}", WorkModel[0].ProjectID));
     }
     else if ((SurveyModel = BLL.CupWorksSurvey.FindByInt(ProjectID, "ProjectID")).Count > 0)
     {
         Response.Redirect(String.Format("~/Web/CupProjectModel/CupInfoEdit/WorkInfo.aspx?ProjectID={0}", SurveyModel[0].ProjectID));
     }
     else if ((InventionModel = BLL.CupWorksInvention.FindByInt(ProjectID, "ProjectID")).Count > 0)
     {
         Response.Redirect(String.Format("~/Web/CupProjectModel/CupInfoEdit/WorkInfo.aspx?ProjectID={0}", InventionModel[0].ProjectID));
     }
 }
Exemple #5
0
        private void initData()
        {
            if (Context.Request["ProjectID"] == null)
            {
                Response.Redirect("../../Match/Default.aspx");
            }
            if (Context.Session["user"] == null)
            {
                Response.Redirect(ResolveUrl("~/Web/Login/Default.aspx"));
            }

            ProjectID = Context.Request["ProjectID"].ToString();
            UserID    = Context.Session["user"].ToString();
            Student   = BLL.StudentInfoModel.SelectOneByUserId(UserID);
            Projects  = BLL.InnovationProjectModel.FindByInt(ProjectID, "Id");
            Declarant = BLL.InnovationDeclarantInfo.SelectOne(ProjectID);
            if (Declarant == null)
            {
                Declarant = new Models.DB.InnovationDeclarantInfo();
            }


            if (Projects.Count <= 0)
            {
                Response.Redirect("../../Match/Default.aspx");
            }
            Match = BLL.Match.SelectOne(Convert.ToInt32(Projects[0].MatchID));
            if (Match == null)
            {
                Response.Redirect("../../Match/Default.aspx");
            }
        }
Exemple #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Context.Request["ProjectID"] == null)
            {
                Response.Redirect("../../Match/Default.aspx");
            }
            ProjectID    = Request["ProjectID"];
            CupModellist = BLL.CupProjectModel.FindByInt(ProjectID, "ID");
            if (Context.Session["user"] == null)
            {
                Response.Redirect("~/Web/Login/Default.aspx");
            }
            Match = BLL.Match.SelectOne(Convert.ToInt32(ProjectID));
            String UserID = Context.Session["user"].ToString();

            Studentlist = BLL.StudentInfoModel.FindByInt(UserID, "UserId");
            if (CupModellist.Count <= 0 || Studentlist.Count <= 0)
            {
                Response.Redirect("../../Match/Default.aspx");
            }
            Match = BLL.Match.SelectOne(Convert.ToInt32(CupModellist[0].MatchID));
            if (Match == null)
            {
                Response.Redirect("../../Match/Default.aspx");
            }
            Declarant = BLL.CupDeclarantInfo.SelectOne(ProjectID);
            if (Declarant == null)
            {
                Declarant = new Models.DB.CupDeclarantInfo();
            }
        }
Exemple #7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     accessControl();
     if (String.IsNullOrEmpty(Request["ProjectID"]) || String.IsNullOrEmpty(Request["MID"]))
     {
         Response.Redirect("Default.aspx");
     }
     ProjectID = Request["ProjectID"].ToString();
     MatchID   = Request["MID"].ToString();
     Match     = BLL.Match.SelectOne(Convert.ToInt32(MatchID));
     Projects  = BLL.CupProjectModel.FindByInt(ProjectID, "ID");
     if (Projects.Count > 0)
     {
         Project = Projects[0];
     }
     else
     {
         Project = new Models.DB.CupProjectModel();
     }
     Declarant   = BLL.CupDeclarantInfo.SelectOneByProjectID(ProjectID);
     TeamMember  = BLL.CupTeamMemberInfo.SelectByProjectId(ProjectID);
     Recommender = BLL.RecommendInfo.SelectByProjectId(ProjectID);
     Student     = BLL.StudentInfoModel.SelectOneByUserId(Project.UserID.ToString());
     if (Project.Category == "自然科学类学术论文")
     {
         WorkInfoList = BLL.CupWorksInfo.FindByInt(ProjectID, "ProjectID");
         if (WorkInfoList.Count > 0)
         {
             WorkInfo = WorkInfoList[0];
         }
         else
         {
             WorkInfo = new Models.DB.CupWorksInfo();
         }
     }
     else if (Project.Category == "哲学社会科学类社会调查报告和学术论文")
     {
         SurveyInfoList = BLL.CupWorksSurvey.FindByInt(ProjectID, "ProjectID");
         if (SurveyInfoList.Count > 0)
         {
             SurveyInfo = SurveyInfoList[0];
         }
         else
         {
             SurveyInfo = new Models.DB.CupWorksSurvey();
         }
     }
     else if (Project.Category == "科技发明制作")
     {
         InventionInfoList = BLL.CupWorksInvention.FindByInt(ProjectID, "ProjectID");
         if (InventionInfoList.Count > 0)
         {
             InventionInfo = InventionInfoList[0];
         }
         else
         {
             InventionInfo = new Models.DB.CupWorksInvention();
         }
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Context.Request["ProjectID"] == null)
            {
                Response.Redirect("../../Match/Default.aspx");
            }
            ProjectID    = Request["ProjectID"];
            CupModellist = BLL.CupProjectModel.FindByInt(ProjectID, "ID");
            if (CupModellist.Count <= 0)
            {
                Response.Redirect("../../Match/Default.aspx");
            }
            Match = BLL.Match.SelectOne(Convert.ToInt32(CupModellist[0].MatchID));
            if (Match == null)
            {
                Response.Redirect("../../Match/Default.aspx");
            }
            model = BLL.CupDeclarantInfo.SelectOneByProjectID(ProjectID);
            if (model != null)
            {
                Response.Redirect(String.Format("~/Web/CupProjectModel/CupInfoEdit/DeclarantInfo.aspx?ProjectID={0}", model.ProjectID));
            }


            if (Context.Session["user"] == null)
            {
                Response.Redirect("~/Web/Login/Default.aspx");
            }

            String UserID = Context.Session["user"].ToString();

            Studentlist = BLL.StudentInfoModel.FindByInt(UserID, "UserId");
        }
 private void initData()
 {
     if (String.IsNullOrEmpty(Request["ProjectID"]) || String.IsNullOrEmpty(Request["MID"]))
     {
         Response.Redirect("Default.aspx");
     }
     ProjectID   = Request["ProjectID"].ToString();
     MatchID     = Request["MID"].ToString();
     Match       = BLL.Match.SelectOne(Convert.ToInt32(MatchID));
     Innovations = BLL.InnovationProjectModel.FindByInt(ProjectID, "Id");
     if (Innovations.Count > 0)
     {
         Innovation = Innovations[0];
     }
     else
     {
         Innovation = new Models.DB.InnovationProjectModel();
     }
     Declarant   = BLL.InnovationDeclarantInfo.SelectOne(ProjectID);
     TeamMembers = BLL.InnovationTeamMember.SelectByProjectId(ProjectID);
     Tutors      = BLL.Tutors.SelectByProjectId(ProjectID);
     Works       = BLL.InnovationWorksInfo.FindByInt(ProjectID, "ProjectID");
     if (Works.Count > 0)
     {
         WorkInfo = Works[0];
     }
     else
     {
         WorkInfo = new Models.DB.InnovationWorksInfo();
     }
     Student = BLL.StudentInfoModel.SelectOneByUserId(Innovation.UserID.ToString());
 }
        public static List <Models.DB.Match> SelectOnePageByStudent(int current_page, int page_size, String orderField, String orderValue, String College)
        {
            List <Models.DB.Match> Matchs = new List <Models.DB.Match>();

            Models.DB.Match       Match;
            System.Data.DataTable dt = DAL.Select.MatchSearchByStudent("Tb_Match", page_size, current_page, orderField, orderValue, "校级", College, "未结束");
            if (dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    Match                   = new Models.DB.Match();
                    Match.ID                = Convert.ToInt32(dt.Rows[i]["Id"]);
                    Match.MatchName         = dt.Rows[i]["MatchName"].ToString();
                    Match.Rule              = dt.Rows[i]["Rule"].ToString();
                    Match.ScoreIntro        = dt.Rows[i]["ScoreIntro"].ToString();
                    Match.Status            = dt.Rows[i]["Status"].ToString();
                    Match.MatchModel        = Convert.ToInt32(dt.Rows[i]["MatchModel"]);
                    Match.College           = dt.Rows[i]["College"].ToString();
                    Match.DeadLine          = Convert.ToDateTime(dt.Rows[i]["DeadLine"]);
                    Match.DeclarantDeadLine = Convert.ToDateTime(dt.Rows[i]["DeclarantDeadLine"]);
                    Matchs.Add(Match);
                }
            }
            return(Matchs);
        }
        /// <summary>
        /// 查询一条记录
        /// </summary>
        public static Models.DB.Match SelectMatch(string MatchName, string DeadLine, string Status,
                                                  string DeclarantDeadLine, string MatchModel, string College, string Rule, string ScoreIntro)
        {
            Models.DB.Match Match             = new Models.DB.Match();
            DateTime        deadLine          = DateTime.Now;
            DateTime        declarantDeadLine = DateTime.Now;
            int             matchModel        = 0;

            string[] targets = { "MatchName", "DeadLine", "Status", "DeclarantDeadLine", "MatchModel", "College", "Rule", "ScoreIntro" };
            #region 合法性检测
            if (string.IsNullOrEmpty(MatchName) || string.IsNullOrEmpty(DeadLine) || string.IsNullOrEmpty(Status) ||
                string.IsNullOrEmpty(DeclarantDeadLine) || string.IsNullOrEmpty(MatchModel) ||
                string.IsNullOrEmpty(College) || string.IsNullOrEmpty(Rule) || string.IsNullOrEmpty(ScoreIntro))
            {
                return(Match);
            }
            if (MatchName.Length > 255 || Status.Length > 255 || College.Length > 255)
            {
                return(Match);
            }
            try
            {
                deadLine          = Convert.ToDateTime(DeadLine);
                declarantDeadLine = Convert.ToDateTime(DeclarantDeadLine);
                matchModel        = Convert.ToInt32(MatchModel);
            }
            catch
            {
                return(Match);
            }
            #endregion
            Match.College           = College;
            Match.DeadLine          = deadLine;
            Match.DeclarantDeadLine = declarantDeadLine;
            Match.MatchModel        = matchModel;
            Match.MatchName         = MatchName;
            Match.Rule       = Rule;
            Match.ScoreIntro = ScoreIntro;
            Match.Status     = Status;
            //  Match.Level = Level;
            System.Data.DataTable dt = DAL.Select.GetList(Match, targets);
            if (dt.Rows.Count > 0)
            {
                Match.ID = Convert.ToInt32(dt.Rows[0]["Id"]);
                //    Match.Level = dt.Rows[0]["Level"].ToString();
                Match.MatchName = dt.Rows[0]["MatchName"].ToString();
                //    Match.ProjectID = dt.Rows[0]["ProjectID"].ToString();
                Match.Rule              = dt.Rows[0]["Rule"].ToString();
                Match.ScoreIntro        = dt.Rows[0]["ScoreIntro"].ToString();
                Match.Status            = dt.Rows[0]["Status"].ToString();
                Match.MatchModel        = Convert.ToInt32(dt.Rows[0]["MatchModel"]);
                Match.College           = dt.Rows[0]["College"].ToString();
                Match.DeadLine          = Convert.ToDateTime(dt.Rows[0]["DeadLine"]);
                Match.DeclarantDeadLine = Convert.ToDateTime(dt.Rows[0]["DeclarantDeadLine"]);
            }
            return(Match);
        }
Exemple #12
0
        private void initData()
        {
            if (string.IsNullOrEmpty(Request["match"]))
            {
                Response.Redirect("../Match/Default.aspx");
            }
            MatchID = Request["match"];
            if (!string.IsNullOrEmpty(Request["page"]))
            {
                current_page = Convert.ToInt32(Request["page"].ToString());
            }
            int matchid = 0;

            try
            {
                matchid = Convert.ToInt32(MatchID);
            }
            catch
            {
                Response.Redirect("../Match/Default.aspx");
            }
            Match = BLL.Match.SelectOne(matchid);

            page_count = (int)Math.Ceiling(BLL.InnovationProjectModel.CountByMatchId(MatchID) / (double)page_size);
            if (current_page > page_count)
            {
                current_page = page_count;
            }
            if (current_page <= 0)
            {
                current_page = 1;
            }
            Innovations = BLL.InnovationProjectModel.SelectOnePage(current_page, page_size, MatchID);



            for (int i = 0; i < Innovations.Count; i++)
            {
                TeamMemberCount.Add((int)BLL.InnovationTeamMember.CountByProjectID(Innovations[i].Id.ToString()));
                InovationDeclarants.Add(BLL.InnovationDeclarantInfo.SelectOne(Innovations[i].Id.ToString()));
                Students.Add(BLL.StudentInfoModel.SelectOneByUserId(Innovations[i].UserID.ToString()));
                Tutors.Add(BLL.Tutors.SelectByProjectId(Innovations[i].Id.ToString()));
                list = BLL.InnovationWorksInfo.FindByInt(Innovations[i].Id.ToString(), "ProjectID");
                CheckRecord.Add(BLL.CheckRecord.FindOne(Innovations[i].Id.ToString(), Match.MatchModel.ToString()));
                if (list.Count > 0)
                {
                    InnovationWork = list[0];
                }
                else
                {
                    InnovationWork = new Models.DB.InnovationWorksInfo();
                }
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     ProjectID    = Request["ProjectID"].ToString();
     CupModelList = BLL.CupProjectModel.FindByInt(ProjectID, "ID");
     if (CupModelList.Count <= 0)
     {
         Response.Redirect("../../Match/Default.aspx");
     }
     Match = BLL.Match.SelectOne(Convert.ToInt32(CupModelList[0].MatchID));
     if (Match == null)
     {
         Response.Redirect("../../Match/Default.aspx");
     }
     Session["ProjectID"]   = ProjectID;
     Session["ProjectType"] = "CupProjectModel";
 }
        /// <summary>
        /// 更新一条记录
        /// </summary>
        public static int UpdateMatch(string Id, string MatchName, string DeadLine, string Status,
                                      string DeclarantDeadLine, string MatchModel, string College, string Rule, string ScoreIntro)
        {
            DateTime deadLine          = DateTime.Now;
            DateTime declarantDeadLine = DateTime.Now;
            int      matchModel        = 0;
            int      id = 0;

            #region 合法性检测
            if (string.IsNullOrEmpty(MatchName) || string.IsNullOrEmpty(DeadLine) || string.IsNullOrEmpty(Status) ||
                string.IsNullOrEmpty(DeclarantDeadLine) || string.IsNullOrEmpty(MatchModel) ||
                string.IsNullOrEmpty(College) || string.IsNullOrEmpty(Rule) || string.IsNullOrEmpty(ScoreIntro) || string.IsNullOrEmpty(Id))
            {
                return(0);
            }
            if (MatchName.Length > 255 || Status.Length > 255 || College.Length > 255)
            {
                return(0);
            }
            try
            {
                deadLine          = Convert.ToDateTime(DeadLine);
                declarantDeadLine = Convert.ToDateTime(DeclarantDeadLine);
                matchModel        = Convert.ToInt32(MatchModel);
                id = Convert.ToInt32(Id);
            }
            catch
            {
                return(0);
            }
            #endregion

            Models.DB.Match Match = new Models.DB.Match();
            Match.ID                = id;
            Match.College           = College;
            Match.DeadLine          = deadLine;
            Match.DeclarantDeadLine = declarantDeadLine;
            Match.MatchModel        = matchModel;
            Match.MatchName         = MatchName;
            //    Match.ProjectID = ProjectId;
            Match.Rule       = Rule;
            Match.ScoreIntro = ScoreIntro;
            Match.Status     = Status;
            //   Match.Level = Level;

            return(DAL.Update.ChangeSome(Match, "ID"));
        }
 private void initData()
 {
     if (Context.Request["ProjectID"] == null)
     {
         Response.Redirect("../../Match/Default.aspx");
     }
     ProjectID = Request["ProjectID"].ToString();
     Projects  = BLL.InnovationProjectModel.FindByInt(ProjectID, "Id");
     if (Projects.Count <= 0)
     {
         Response.Redirect("../../Match/Default.aspx");
     }
     Match = BLL.Match.SelectOne(Convert.ToInt32(Projects[0].MatchID));
     if (Match == null)
     {
         Response.Redirect("../../Match/Default.aspx");
     }
 }
Exemple #16
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Context.Request["ProjectID"] == null)
     {
         Response.Redirect("../../Match/Default.aspx");
     }
     ProjectID    = Request["ProjectID"];
     CupModellist = BLL.CupProjectModel.FindByInt(ProjectID, "ID");
     if (CupModellist.Count <= 0)
     {
         Response.Redirect("../../Match/Default.aspx");
     }
     Match = BLL.Match.SelectOne(Convert.ToInt32(CupModellist[0].MatchID));
     if (Match == null)
     {
         Response.Redirect("../../Match/Default.aspx");
     }
     Recommendedlist = BLL.RecommendInfo.SelectByProjectId(ProjectID);
 }
        private void initData()
        {
            if (string.IsNullOrEmpty(Request["MatchID"]))
            {
                Response.Redirect("../Match/Default.aspx");
            }
            MatchID = Request["MatchID"];
            int matchid = 0;

            try
            {
                matchid = Convert.ToInt32(MatchID);
            }
            catch
            {
                Response.Redirect("../Match/Default.aspx");
            }
            Match = BLL.Match.SelectOne(matchid);
        }
 private void initData()
 {
     if (string.IsNullOrEmpty(Request["match"]))
     {
         Response.Redirect("Default.aspx");
     }
     try
     {
         Convert.ToInt32(Request["match"]);
         MatchID = Request["match"];
     }
     catch
     {
         Response.Redirect("Default.aspx");
     }
     // 获取当前页
     if (!string.IsNullOrEmpty(Request["page"]))
     {
         try { current_page = Convert.ToInt32(Request["page"]); }
         catch { }
     }
     Match = BLL.Match.SelectOne(Convert.ToInt32(Request["match"]));
     // 获取总页数
     page_count = (int)Math.Ceiling(BLL.CupProjectModel.CountByMatchId(Request["match"]) / (double)page_size);
     if (current_page > page_count)
     {
         current_page = page_count;
     }
     if (current_page <= 0)
     {
         current_page = 1;
     }
     Projects = BLL.CupProjectModel.SelectOnePage(current_page, page_size, Request["match"]);
     for (int i = 0; i < Projects.Count; i++)
     {
         TeamMemberCount.Add((int)BLL.CupTeamMemberInfo.CountByProjectID(Projects[i].ID + ""));
         Declarants.Add(BLL.CupDeclarantInfo.SelectOne(Projects[i].ID + ""));
         Students.Add(BLL.StudentInfoModel.SelectOneByUserId(Projects[i].UserID + ""));
         Recommenders.Add(BLL.RecommendInfo.SelectByProjectId(Projects[i].ID + ""));
         CheckRecord.Add(BLL.CheckRecord.FindOne(Projects[i].ID.ToString(), Match.MatchModel.ToString()));
     }
 }
Exemple #19
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Context.Request["ProjectID"] == null)
     {
         Response.Redirect("../../Match/Default.aspx");
     }
     ProjectID    = Request["ProjectID"];
     CupModellist = BLL.CupProjectModel.FindByInt(ProjectID, "ID");
     if (CupModellist.Count <= 0)
     {
         Response.Redirect("../../Match/Default.aspx");
     }
     Match = BLL.Match.SelectOne(Convert.ToInt32(CupModellist[0].MatchID));
     if (Match == null)
     {
         Response.Redirect("../../Match/Default.aspx");
     }
     if (CupModellist[0].Category == "自然科学类学术论文")
     {
         WorkModel = BLL.CupWorksInfo.FindByInt(ProjectID, "ProjectID");
         if (WorkModel.Count <= 0)
         {
             Response.Redirect("../../Match/Default.aspx");
         }
     }
     else if (CupModellist[0].Category == "哲学社会科学类社会调查报告和学术论文")
     {
         SurveyModel = BLL.CupWorksSurvey.FindByInt(ProjectID, "ProjectID");
         if (SurveyModel.Count <= 0)
         {
             Response.Redirect("../../Match/Default.aspx");
         }
     }
     else if (CupModellist[0].Category == "科技发明制作")
     {
         InventionModel = BLL.CupWorksInvention.FindByInt(ProjectID, "ProjectID");
         if (InventionModel.Count <= 0)
         {
             Response.Redirect("../../Match/Default.aspx");
         }
     }
 }
 /// <summary>
 /// 获取一条记录
 /// </summary>
 public static Models.DB.Match SelectOne(int Id)
 {
     Models.DB.Match       Match = new Models.DB.Match();
     System.Data.DataTable dt    = DAL.Select.GetOne("Tb_Match", Id);
     if (dt.Rows.Count > 0)
     {
         Match.ID = Convert.ToInt32(dt.Rows[0]["Id"]);
         //     Match.Level = dt.Rows[0]["Level"].ToString();
         Match.MatchName = dt.Rows[0]["MatchName"].ToString();
         //     Match.ProjectID = dt.Rows[0]["ProjectID"].ToString();
         Match.Rule              = dt.Rows[0]["Rule"].ToString();
         Match.ScoreIntro        = dt.Rows[0]["ScoreIntro"].ToString();
         Match.Status            = dt.Rows[0]["Status"].ToString();
         Match.MatchModel        = Convert.ToInt32(dt.Rows[0]["MatchModel"]);
         Match.College           = dt.Rows[0]["College"].ToString();
         Match.DeadLine          = Convert.ToDateTime(dt.Rows[0]["DeadLine"]);
         Match.DeclarantDeadLine = Convert.ToDateTime(dt.Rows[0]["DeclarantDeadLine"]);
     }
     return(Match);
 }
 private void initData()
 {
     if (Request["edit"] == null)
     {
         Response.Redirect("Default.aspx");
     }
     else
     {
         try
         {
             int Id = Convert.ToInt32(Request["edit"]);
             Match          = BLL.Match.SelectOne(Id);
             MatchModel     = BLL.MatchModel.SelectOne(Match.MatchModel);
             MatchModels    = BLL.MatchModel.SelectMatchModel();
             SelectedJudges = BLL.Match.SelectJudges(Id);
             Judges         = BLL.JudgeInfoModel.SelectOnePage(1, Int32.MaxValue);
             for (int i = Judges.Count - 1; i >= 0; --i)
             {
                 for (int j = 0; j < SelectedJudges.Count; ++j)
                 {
                     if (Judges[i].Id == SelectedJudges[j].Id)
                     {
                         Judges.RemoveAt(i);
                         break;
                     }
                 }
             }
             for (int i = Judges.Count - 1; i >= 0; --i)
             {
                 if (LoginRole.Name == "CollegeAdmin" && LoginAdmin.College != Judges[i].College)
                 {
                     Judges.RemoveAt(i);
                 }
             }
         }
         catch
         {
             Response.Redirect("Default.aspx");
         }
     }
 }
Exemple #22
0
 private void initData()
 {
     if (Context.Request["ProjectID"] == null)
     {
         Response.Redirect("../../Match/Default.aspx");
     }
     ProjectID = Context.Request["ProjectID"].ToString();
     Projects  = BLL.InnovationProjectModel.FindByInt(ProjectID, "Id");
     if (Projects.Count <= 0)
     {
         Response.Redirect("../../Match/Default.aspx");
     }
     Match = BLL.Match.SelectOne(Convert.ToInt32(Projects[0].MatchID));
     if (Match == null)
     {
         Response.Redirect("../../Match/Default.aspx");
     }
     if ((WorksInfo = BLL.InnovationWorksInfo.FindByInt(ProjectID, "ProjectID")).Count > 0)
     {
         Response.Redirect(String.Format("~/Web/InnovationProjectModel/InnovationProjectModelEdit/WorkInfo.aspx?ProjectID={0}", ProjectID));
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Context.Request["ProjectID"] == null)
     {
         Response.Redirect("../../Match/Default.aspx");
     }
     ProjectID    = Request["ProjectID"];
     CupModellist = BLL.CupProjectModel.FindByInt(ProjectID, "ID");
     if (CupModellist.Count <= 0)
     {
         Response.Redirect("../../Match/Default.aspx");
     }
     Match = BLL.Match.SelectOne(Convert.ToInt32(CupModellist[0].MatchID));
     if (Match == null)
     {
         Response.Redirect("../../Match/Default.aspx");
     }
     if (BLL.CupTeamMemberInfo.CountByProjectID(ProjectID) > 0)
     {
         Response.Redirect(String.Format("~/Web/CupProjectModel/CupInfoEdit/TeamMemberInfo.aspx?ProjectID={0}", ProjectID));
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     accessControl();
     if (Request["more"] == null)
     {
         Response.Redirect("Default.aspx");
     }
     else
     {
         try
         {
             int Id = Convert.ToInt32(Request["more"]);
             Match      = BLL.Match.SelectOne(Id);
             MatchModel = BLL.MatchModel.SelectOne(Match.MatchModel);
             Judges     = BLL.Match.SelectJudges(Id);
         }
         catch
         {
             Response.Redirect("Default.aspx");
         }
     }
 }
Exemple #25
0
        private bool initData(string ProjectId)
        {
            List <Models.DB.InnovationProjectModel> Projects = BLL.InnovationProjectModel.FindByInt(ProjectId, "Id");

            if (Projects.Count <= 0)
            {
                return(false);
            }
            Project = Projects[0];
            Match   = BLL.Match.SelectOne(Project.MatchID);
            List <Models.DB.InnovationWorksInfo> WorksInfos = BLL.InnovationWorksInfo.FindByInt(ProjectId, "ProjectId");

            if (WorksInfos.Count > 0)
            {
                WorksInfo = WorksInfos[0];
            }
            TeamMembers = BLL.InnovationTeamMember.SelectByProjectId(ProjectId);
            Declarant   = BLL.InnovationDeclarantInfo.SelectOne(ProjectId);
            Tutors      = BLL.Tutors.SelectByProjectId(ProjectId);
            Student     = BLL.StudentInfoModel.SelectOneByUserId(Project.UserID + "");
            return(true);
        }
Exemple #26
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string dowhat = context.Request["dowhat"];

            if (dowhat == null)
            {
                dowhat = "";
            }

            String ProjectID = context.Request["ProjectID"];
            List <Models.DB.InnovationProjectModel> modellist = BLL.InnovationProjectModel.FindByInt(ProjectID, "ID");

            if (modellist.Count <= 0)
            {
                context.Response.Redirect("../../Match/Default.aspx");
            }
            Models.DB.Match Match = BLL.Match.SelectOne(Convert.ToInt32(modellist[0].MatchID));
            if (Match == null)
            {
                return;
            }
            if (modellist[0].Statu == "提交" || System.DateTime.Compare(System.DateTime.Now, Match.DeclarantDeadLine) > 0)
            {
                return;
            }


            #region 申报人信息提交
            if (dowhat == "DeclarantCreate")
            {
                String Phone      = context.Request["Phone"];
                String Experience = context.Request["Experience"];
                if (BLL.InnovationDeclarantInfo.Create(ProjectID, Phone, Experience) > 0)
                {
                    context.Response.Write("success");
                }
                else
                {
                    context.Response.Write("failed");
                }

                context.Response.End();
                return;
            }
            #endregion

            #region 推荐人信息提交
            if (dowhat == "RecommendInfoCreate")
            {
                String[] DataList = context.Request.Form[1].ToString().Split(',');
                String[,] DataSource = Utility.Tool.SplitJson(DataList);
                if (BLL.Tutors.CreateMore(DataSource, ProjectID) > 0)
                {
                    context.Response.Write("success");
                }
                else
                {
                    context.Response.Write("failed");
                }
                context.Response.End();
                return;
            }
            #endregion

            #region 团队成员信息提交
            if (dowhat == "TeamMemberCreate")
            {
                String[] DataList = context.Request.Form[1].ToString().Split(',');
                String[,] DataSource = Utility.Tool.SplitJson(DataList);
                if (BLL.InnovationTeamMember.CreateMore(DataSource, ProjectID) > 0)
                {
                    context.Response.Write("success");
                }
                else
                {
                    context.Response.Write("failed");
                }
                context.Response.End();
                return;
            }
            #endregion

            #region 修改备注
            if (dowhat == "RemarkEdit")
            {
                String data = context.Request["Remark"].ToString();
                if (BLL.InnovationProjectModel.UpdateRemark(ProjectID, data) > 0)
                {
                    context.Response.Write("success");
                }
                else
                {
                    context.Response.Write("failed");
                }
                context.Response.End();
                return;
            }
            #endregion


            #region 作品信息提交
            if (dowhat == "WorkInfoCreate")
            {
                String ProjectName       = context.Request["PName"];
                String DeclarationType   = context.Request["DeclarationType"];
                String InterimReport     = context.Request["InterimReport"];
                String SubmitAchievement = context.Request["SubmitAchievement"];
                String Managementbasis   = context.Request["Managementbasis"];
                String StartTime         = context.Request["StartTime"];
                String EndTime           = context.Request["EndTime"];

                String[] DataList = context.Request.Form[1].ToString().Split(',');
                String[,] DataSource = Utility.Tool.SplitJson(DataList);


                if (BLL.InnovationProjectModel.Updata(ProjectID, ProjectName, DeclarationType, StartTime, EndTime, InterimReport, SubmitAchievement, Managementbasis, modellist[0].DeclarationDate.ToString(), modellist[0].MatchID.ToString(), modellist[0].UserID.ToString()) > 0)
                {
                    if (BLL.InnovationWorksInfo.CreateMore(DataSource, ProjectID) > 0)
                    {
                        context.Response.Write("success");
                    }
                    else
                    {
                        context.Response.Write("failed");
                    }
                }
                else
                {
                    context.Response.Write("failed");
                }
                context.Response.End();
                return;
            }
            #endregion
        }
Exemple #27
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (String.IsNullOrEmpty(Request["MatchID"]) || String.IsNullOrEmpty(Request["Index"]) || String.IsNullOrEmpty(Request["currentPage"]))
            {
                Response.Redirect("../Project/Default.aspx?MatchID=" + MatchID);
            }
            currentPage = 1;
            try
            {
                currentPage = Convert.ToInt32(Request["currentPage"]);
                index       = Convert.ToInt32(Request["Index"]);
            }
            catch
            {
                Response.Redirect("../Project/Default.aspx?MatchID=" + MatchID);
            }
            MatchID = Request["MatchID"];
            Match   = BLL.Match.SelectOne(Convert.ToInt32(MatchID));



            /*************根据模型*************************/
            if (Match.MatchModel == 1)
            {
                Projects = BLL.CupProjectModel.FindByInt(MatchID, "MatchID");
                for (int i = 0; i < Projects.Count; i++)
                {
                    CheckRecrod = BLL.CheckRecord.FindOne(Projects[i].ID.ToString(), Match.MatchModel.ToString());
                    if (CheckRecrod == null || CheckRecrod.AfterStatus != "初审通过")
                    {
                        Projects.RemoveAt(i);
                        i--;
                        continue;
                    }
                }
                ProjectCount = Projects.Count;
                try{
                    Project = Projects[Math.Max((currentPage - 1) * 10, 0) + (index - 1)];
                }
                catch
                {
                    Project = new Models.DB.CupProjectModel();
                }
                ProjectID = Project.ID.ToString();
                if (Project.PdfUrl != "")
                {
                    String swf = Project.PdfUrl.Substring(0, Project.PdfUrl.LastIndexOf('.'));
                    if (Utility.PDF2Swf.DoPDF2Swf(Server.MapPath(Project.PdfUrl), Server.MapPath(swf + ".swf")))
                    {
                        FilePath = ResolveUrl(swf + ".swf");
                        showPdf  = true;
                    }
                    else
                    {
                        Response.Write("<script language=\"javascript\" type=\"text/javascript\">");
                        Response.Write("alert(\"无法找到源文件\");");
                        Response.Write("</script>");
                        showPdf = false;
                        //     Response.Redirect("../Project/Default.aspx");
                    }
                }
                else
                {
                    showPdf = false;
                }
            }
            else if (Match.MatchModel == 2)
            {
                Innovations = BLL.InnovationProjectModel.FindByInt(MatchID, "MatchID");
                for (int i = 0; i < Innovations.Count; i++)
                {
                    CheckRecrod = BLL.CheckRecord.FindOne(Innovations[i].Id.ToString(), Match.MatchModel.ToString());
                    if (CheckRecrod == null || CheckRecrod.AfterStatus != "初审通过")
                    {
                        Innovations.RemoveAt(i);
                        i--;
                        continue;
                    }
                }
                ProjectCount = Innovations.Count;
                try
                {
                    Innovation = Innovations[Math.Max((currentPage - 1) * 10, 0) + (index - 1)];
                }
                catch
                {
                    Innovation = new Models.DB.InnovationProjectModel();
                }
                ProjectID = Innovation.Id.ToString();
                if (Innovation.PdfUrl != "")
                {
                    String swf = Innovation.ProjectDoc.Substring(0, Innovation.ProjectDoc.LastIndexOf('.'));
                    if (Utility.PDF2Swf.DoPDF2Swf(Server.MapPath(Innovation.ProjectDoc), Server.MapPath(swf + ".swf")))
                    {
                        FilePath = ResolveUrl(swf + ".swf");
                        showPdf  = true;
                    }
                    else
                    {
                        Response.Write("<script language=\"javascript\" type=\"text/javascript\">");
                        Response.Write("alert(\"无法找到源文件\");");
                        Response.Write("</script>");
                        showPdf = false;
                        //     Response.Redirect("../Project/Default.aspx");
                    }
                }
                else
                {
                    showPdf = false;
                }
            }
            /**************************************/



            if (Session["user"] == null)
            {
                Response.Redirect(ResolveUrl("~/Web/Login/Default.aspx"));
            }
            UserID    = Session["user"].ToString();
            JudgeList = BLL.JudgeInfoModel.FindByInt(UserID, "UserID");
            if (JudgeList.Count > 0)
            {
                Judge = JudgeList[0];
            }
            else
            {
                Judge = new Models.DB.JudgeInfoModel();
            }

            Score = BLL.ProjectScore.FindOne(ProjectID, Match.MatchModel.ToString(), Judge.Id.ToString());
            if (Score == null)
            {
                HasRecord = false;
                Score     = new Models.DB.ProjectScore();
            }
            else
            {
                HasRecord = true;
            }
        }
Exemple #28
0
        public ActionResult PlaceBet(MyPageViewModel placedBet, string username)
        {
            if (!ModelState.IsValid)
            {
                ModelState.AddModelError("", "The password provided is incorrect.");
                return(new RedirectResult(Url.Action("Index") + "#bet"));
            }

            UserBet userBet = new UserBet();

            foreach (var bet in placedBet.Bet.Matches)
            {
                Models.DB.Match match = new Models.DB.Match()
                {
                    HomeTeam  = bet.HomeTeam,
                    AwayTeam  = bet.AwayTeam,
                    HomeScore = bet.HomeScore,
                    AwayScore = bet.AwayScore
                };

                userBet.Matches.Add(match);
                userBet.Finalist1        = placedBet.Bet.Finalist1;
                userBet.Finalist2        = placedBet.Bet.Finalist2;
                userBet.Semifinalist1    = placedBet.Bet.Semifinalist1;
                userBet.Semifinalist2    = placedBet.Bet.Semifinalist2;
                userBet.Semifinalist3    = placedBet.Bet.Semifinalist3;
                userBet.Semifinalist4    = placedBet.Bet.Semifinalist4;
                userBet.QuarterFinalist1 = placedBet.Bet.QuarterFinalist1;
                userBet.QuarterFinalist2 = placedBet.Bet.QuarterFinalist2;
                userBet.QuarterFinalist3 = placedBet.Bet.QuarterFinalist3;
                userBet.QuarterFinalist4 = placedBet.Bet.QuarterFinalist4;
                userBet.QuarterFinalist5 = placedBet.Bet.QuarterFinalist5;
                userBet.QuarterFinalist6 = placedBet.Bet.QuarterFinalist6;
                userBet.QuarterFinalist7 = placedBet.Bet.QuarterFinalist7;
                userBet.QuarterFinalist8 = placedBet.Bet.QuarterFinalist8;
                userBet.Qualified1       = placedBet.Bet.Qualified1;
                userBet.Qualified2       = placedBet.Bet.Qualified2;
                userBet.Qualified3       = placedBet.Bet.Qualified3;
                userBet.Qualified4       = placedBet.Bet.Qualified4;
                userBet.Qualified5       = placedBet.Bet.Qualified5;
                userBet.Qualified6       = placedBet.Bet.Qualified6;
                userBet.Qualified7       = placedBet.Bet.Qualified7;
                userBet.Qualified8       = placedBet.Bet.Qualified8;
                userBet.Qualified9       = placedBet.Bet.Qualified9;
                userBet.Qualified10      = placedBet.Bet.Qualified10;
                userBet.Qualified11      = placedBet.Bet.Qualified11;
                userBet.Qualified12      = placedBet.Bet.Qualified12;
                userBet.Qualified13      = placedBet.Bet.Qualified13;
                userBet.Qualified14      = placedBet.Bet.Qualified14;
                userBet.Qualified15      = placedBet.Bet.Qualified15;
                userBet.Qualified16      = placedBet.Bet.Qualified16;
                userBet.TopScorer        = placedBet.Bet.TopScorer;
                userBet.TotalGoals       = placedBet.Bet.TotalGoals;
            }
            if (!this.IsValidUserBet(placedBet.Bet))
            {
                if (base.TempData["Fail"] == null)
                {
                    base.TempData.Add("Fail", "N\x00e5got blev tokigt, f\x00f6rs\x00f6k igen. T\x00e4nk p\x00e5 att ange olika lag i åttondelsfinal, kvartsfinal, semifinal och final.");
                }
                return(new RedirectResult(base.Url.Action("Index") + "#bet"));
            }
            UserManager.AddBet(userBet, username);
            if (base.TempData["Thanks"] == null)
            {
                base.TempData.Add("Thanks", "Tack f\x00f6r spelet");
            }
            return(new RedirectResult(base.Url.Action("Index")));
        }
        private void initData()
        {
            if (string.IsNullOrEmpty(Request["MID"]))
            {
                Response.Redirect("../Match/Default.aspx");
            }
            try
            {
                Convert.ToInt32(Request["MID"]);
                MatchID = Request["MID"];
            }
            catch
            {
                Response.Redirect("../Match/Default.aspx");
            }
            // 获取当前页
            if (!string.IsNullOrEmpty(Request["page"]))
            {
                try { current_page = Convert.ToInt32(Request["page"]); }
                catch { }
            }

            Match = BLL.Match.SelectOne(Convert.ToInt32(MatchID));

            if (Match.MatchModel == 1)
            {
                // 获取总页数
                Projects = BLL.CupProjectModel.FindByInt(MatchID, "MatchID");
                ProjectRank rank;

                for (int i = 0; i < Projects.Count; i++)
                {
                    if (!BLL.ProjectScore.HasRecord(Projects[i].ID.ToString(), Match.MatchModel.ToString()))
                    {
                        Projects.RemoveAt(i);
                        i--;
                        continue;
                    }
                    else
                    {
                        rank       = new ProjectRank();
                        rank.index = i;
                        rank.score = ProjectAvgScore(Projects[i].ID);
                        rankList.Add(rank);
                        Students.Add(BLL.StudentInfoModel.SelectOneByUserId(Projects[i].UserID + ""));
                        CheckRecords.Add(BLL.CheckRecord.FindOne(Projects[i].ID.ToString(), Match.MatchModel.ToString()));
                    }
                }
                rankList.Sort(delegate(ProjectRank a, ProjectRank b) { return(b.score.CompareTo(a.score)); });

                page_count = (int)Math.Ceiling(Projects.Count / (double)page_size);

                if (current_page > page_count)
                {
                    current_page = page_count;
                }
                if (current_page <= 0)
                {
                    current_page = 1;
                }
            }
            else if (Match.MatchModel == 2)
            {
                //科技创新
                Innovations = BLL.InnovationProjectModel.FindByInt(MatchID, "MatchID");
                ProjectRank rank;
                for (int i = 0; i < Innovations.Count; i++)
                {
                    if (!BLL.ProjectScore.HasRecord(Innovations[i].Id.ToString(), Match.MatchModel.ToString()))
                    {
                        Innovations.RemoveAt(i);
                        i--;
                        continue;
                    }
                    else
                    {
                        rank       = new ProjectRank();
                        rank.index = i;
                        rank.score = ProjectAvgScore(Innovations[i].Id);
                        rankList.Add(rank);
                        Students.Add(BLL.StudentInfoModel.SelectOneByUserId(Innovations[i].UserID.ToString()));
                        CheckRecords.Add(BLL.CheckRecord.FindOne(Innovations[i].Id.ToString(), Match.MatchModel.ToString()));
                    }
                }
                rankList.Sort(delegate(ProjectRank a, ProjectRank b) { return(b.score.CompareTo(a.score)); });

                page_count = (int)Math.Ceiling(Innovations.Count / (double)page_size);

                if (current_page > page_count)
                {
                    current_page = page_count;
                }
                if (current_page <= 0)
                {
                    current_page = 1;
                }
            }
        }
Exemple #30
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string dowhat = context.Request["dowhat"];

            if (dowhat == null)
            {
                dowhat = "";
            }
            String ProjectID = context.Request["ProjectID"];
            List <Models.DB.InnovationProjectModel> modellist = BLL.InnovationProjectModel.FindByInt(ProjectID, "Id");

            if (modellist.Count <= 0)
            {
                context.Response.Redirect("../../Match/Default.aspx");
            }
            Models.DB.Match Match = BLL.Match.SelectOne(Convert.ToInt32(modellist[0].MatchID));
            if (Match == null)
            {
                return;
            }
            ///作品已提交,直接返回
            if (modellist[0].Statu == "提交" || System.DateTime.Compare(System.DateTime.Now, Match.DeclarantDeadLine) > 0)
            {
                return;
            }


            #region 申报人信息修改
            if (dowhat == "DeclarantEdit")
            {
                String ID         = BLL.InnovationDeclarantInfo.SelectOne(ProjectID).Id.ToString();
                String Phone      = context.Request["Phone"];
                String Experience = context.Request["Experience"];
                if (BLL.InnovationDeclarantInfo.Update(ID, ProjectID, Phone, Experience) > 0)
                {
                    context.Response.Write("success");
                }
                else
                {
                    context.Response.Write("failed");
                }

                context.Response.End();
                return;
            }
            #endregion


            #region 推荐人信息修改
            if (dowhat == "RecommendInfoEdit")
            {
                int      count    = 0;
                String[] DataList = context.Request.Form[1].ToString().Split(',');
                String[,] DataSource = Utility.Tool.SplitJson(DataList);
                for (int i = 0; i < DataSource.GetLength(0); i++)
                {
                    String[] data = new String[DataSource.GetLength(1)];
                    for (int j = 0; j < DataSource.GetLength(1); j++)
                    {
                        data[j] = DataSource[i, j];
                    }
                    if (DataSource[i, DataSource.GetLength(1) - 1] == "0")
                    {
                        if (BLL.Tutors.Create(data, ProjectID) > 0)
                        {
                            count++;
                        }
                    }
                    else
                    {
                        if (BLL.Tutors.Updata(data, ProjectID) > 0)
                        {
                            count++;
                        }
                    }
                }
                if (count >= DataSource.GetLength(0))
                {
                    context.Response.Write("success");
                }
                else
                {
                    context.Response.Write("failed");
                }
                context.Response.End();
                return;
            }
            #endregion

            #region 推荐人信息删除
            if (dowhat == "deleteRecommend")
            {
                String ID = context.Request["ID"];
                if (BLL.Delete.Word("Tb_TutorInfo", ID) > 0)
                {
                    context.Response.Write("success");
                }
                else
                {
                    context.Response.Write("failed");
                }
                context.Response.End();
                return;
            }
            #endregion


            #region 团队成员信息修改
            if (dowhat == "TeamMemberEdit")
            {
                int      count    = 0;
                String[] DataList = context.Request.Form[1].ToString().Split(',');
                String[,] DataSource = Utility.Tool.SplitJson(DataList);
                for (int i = 0; i < DataSource.GetLength(0); i++)
                {
                    String[] data = new String[DataSource.GetLength(1)];
                    for (int j = 0; j < DataSource.GetLength(1); j++)
                    {
                        data[j] = DataSource[i, j];
                    }
                    if (DataSource[i, DataSource.GetLength(1) - 1] == "0")
                    {
                        if (BLL.InnovationTeamMember.Create(data, ProjectID) > 0)
                        {
                            count++;
                        }
                    }
                    else
                    {
                        if (BLL.InnovationTeamMember.Updata(data, ProjectID) > 0)
                        {
                            count++;
                        }
                    }
                }
                if (count >= DataSource.GetLength(0))
                {
                    context.Response.Write("success");
                }
                else
                {
                    context.Response.Write("failed");
                }
                context.Response.End();
                return;
            }
            #endregion

            #region 团队成员信息删除
            if (dowhat == "deleteTeamMember")
            {
                String ID = context.Request["ID"];
                if (BLL.Delete.Word("Tb_InnovationTeamMember", ID) > 0)
                {
                    context.Response.Write("success");
                }
                else
                {
                    context.Response.Write("failed");
                }
                context.Response.End();
                return;
            }
            #endregion


            #region 作品信息修改
            if (dowhat == "WorkInfoEdit")
            {
                String ProjectName       = context.Request["PName"];
                String DeclarationType   = context.Request["DeclarationType"];
                String InterimReport     = context.Request["InterimReport"];
                String SubmitAchievement = context.Request["SubmitAchievement"];
                String Managementbasis   = context.Request["Managementbasis"];
                String StartTime         = context.Request["StartTime"];
                String EndTime           = context.Request["EndTime"];
                String ID = context.Request["ID"];

                String[] DataList = context.Request.Form[1].ToString().Split(',');
                String[,] DataSource = Utility.Tool.SplitJson(DataList);


                if (BLL.InnovationProjectModel.Updata(ProjectID, ProjectName, DeclarationType, StartTime, EndTime, InterimReport, SubmitAchievement, Managementbasis, modellist[0].DeclarationDate.ToString(), modellist[0].MatchID.ToString(), modellist[0].UserID.ToString()) > 0)
                {
                    if (BLL.InnovationWorksInfo.UpDate(ID, DataSource, ProjectID) > 0)
                    {
                        context.Response.Write("success");
                    }
                    else
                    {
                        context.Response.Write("failed");
                    }
                }
                else
                {
                    context.Response.Write("failed");
                }
                context.Response.End();
                return;
            }
            #endregion
        }