Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         int CourseId  = Convert.ToInt32(Request.Params["CourseId"]);
         int StuNumber = new CourseManege().QueryStuNum(CourseId);
         StuNum.Text = StuNumber.ToString();
         List <Model.Class> clalist = new CourseManege().queryClassByCourseId(CourseId);
         string             ClassId;
         foreach (Model.Class Class in clalist)
         {
             ClassId = Class.ClassId;
             ddlclass.Items.Add(ClassId);
         }
         List <Students> stulist = new StudentManage().queryStudentByCourseId(CourseId);
         Repeater1.DataSource = stulist;
         Repeater1.DataBind();
         int ScoreNum = new ScoreManage().queryCouseScoreNum(CourseId);
         //当前该课程只要有记录记录则无法在添加学生成绩,此处可扩展,
         if (ScoreNum > 0)
         {
             Button2.Enabled = false;
             Literal1.Text   = "该课程已完成成绩录入";
         }
     }
 }
Ejemplo n.º 2
0
    /// <summary>
    /// 改变数字
    /// </summary>
    /// <param name="changeObj">Change object.</param>
    /// <param name="targetBgCellObj">Target background cell object.</param>
    public void ChangeNumber(GameObject changeObj, GameObject targetBgCellObj)
    {
        NumberEntity entity = changeObj.GetComponent <NumberCell>().NumberEntity;

        if (entity.CurrentNumberValue + 1 > GlobalConfig.MaxNubmberValue)
        {
            GlobalConfig.MaxNubmberValue = entity.CurrentNumberValue + 1;
        }

        //分数设置
        ScoreManage.SetScore(entity.CurrentNumberValue + 1);

        var        numberObj     = CommonToolkit.LoadNumberResource(entity.CurrentNumberValue);
        GameObject newGameObject = NumberConstructor.CreateNumber(
            numberObj,
            targetBgCellObj,
            targetBgCellObj.GetComponent <BackgroundCell>().BackgroundCellEntity.Index,
            entity.CurrentNumberValue + 1);

        targetBgCellObj.GetComponent <BackgroundCell>().DisposeNumber();
        CommonToolkit.SetNumberObjectToBackgroundCell(targetBgCellObj, newGameObject);

        GameObject scoreNumberObj = CommonToolkit.GetScoreNumberObject(targetBgCellObj, entity.CurrentNumberValue + 1);

        scoreNumberObj.GetComponent <Animation>().Play("AnimationScoreRun");
    }
Ejemplo n.º 3
0
    private void Start()
    {
        GameObject player = GameObject.FindGameObjectWithTag("Player");

        soundPlayed   = player.GetComponent <PlayRanSound>();
        trackingScore = player.GetComponent <ScoreManage>();
    }
Ejemplo n.º 4
0
 // Update is called once per frame
 void Update()
 {
     if (first == false)
     {
         if (this.CompareTag("filled"))
         {
             transform.DOShakeScale(0.2f, new Vector3(1, 1, 0));
             skin.material = new Material(offskin);
             /// LightOn();
             BoardsInst.BornCall = true;
             if (this.name == ("chosen"))
             {
                 for (int i = 0; i <= 10; i++)
                 {
                     ScoreManage.ScoreUp();
                 }
             }
             else
             {
                 ScoreManage.ScoreUp();
             }
             first = true;
         }
     }
 }
Ejemplo n.º 5
0
        //通过姓名模糊查询
        protected void btn_searchstu_Click(object sender, EventArgs e)
        {
            int             CourseId = Convert.ToInt32(Request.Params["CourseId"]);
            string          StuName  = txt_name.Text.Trim().ToString();
            List <ScoreExt> sclist   = new ScoreManage().queryScorebyCIdSNa(CourseId, StuName);

            Repeater1.DataSource = sclist;
            Repeater1.DataBind();
        }
Ejemplo n.º 6
0
        protected void btn_searchstu_Click(object sender, EventArgs e)
        {
            string             name   = txt_name.Text.Trim();
            int                StuId  = Convert.ToInt32(((Model.Login)Session["CurrentUser"]).UserName);
            string             Season = ddlseason.SelectedItem.Text.Trim();
            List <Model.Score> sclist = new ScoreManage().queryScoreByName(StuId, name, Season);

            Repeater1.DataSource = sclist;
            Repeater1.DataBind();
        }
Ejemplo n.º 7
0
        public void Index()
        {
            var context = HttpContext;

            _dealerId   = context.Request["DealerId"];
            _dealerName = context.Request["DealerName"];
            ScoreManage sm = ScoreManage.LoadGradeObject("loadfullscorestruct", "C_Grade", new StructNames(false), LoadDealerInfo, System.Configuration.ConfigurationManager.AppSettings["BPMEngine"]);

            context.Response.Write(JsonConvert.SerializeObject(sm.GetGrade()));
        }
Ejemplo n.º 8
0
 private void Awake()
 {
     if (singleton == null)
     {
         singleton = this;
     }
     else if (singleton != this)
     {
         Destroy(gameObject);
     }
     m_CurScore = 0;
 }
Ejemplo n.º 9
0
        //通过学号查学生
        protected void btn_searchStuId_Click(object sender, EventArgs e)
        {
            int CourseId = Convert.ToInt32(Request.Params["CourseId"]);
            int StuId    = Convert.ToInt32(txt_StuId.Text.Trim());

            if (StuId == 0)
            {
                return;
            }
            List <ScoreExt> sclist = new ScoreManage().queryScorebyCIdSId(CourseId, StuId);

            Repeater1.DataSource = sclist;
            Repeater1.DataBind();
        }
Ejemplo n.º 10
0
        private string GetGrade()
        {
            ScoreManage   sm     = ScoreManage.LoadGradeObject("loadfullscorestruct", "C_Grade", new StructNames(false), LoadDealerInfo, System.Configuration.ConfigurationManager.AppSettings["BPMEngine"]);
            List <Dealer> result = sm.GetGrade(true);

            if (result == null || result.Count <= 0 || result[0].ResultList.Count <= 0)
            {
                return("");
            }
            else
            {
                return(result[0].ResultList[0].ResultGrade);
            }
        }
Ejemplo n.º 11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string          ClassId  = Request.Params["ClassId"].ToString();
            int             CourseId = Convert.ToInt32(Request.Params["CourseId"]);
            List <ScoreExt> sclist   = new ScoreManage().queryScorebyFDY(CourseId, ClassId);

            foreach (ScoreExt sc in sclist)
            {
                sc.KqNum = new KqManage().queryStuKqNum(sc.StuId, sc.CourseId);
                sc.HwNum = new HomeworkManage().queryStuHwNum(sc.StuId, sc.CourseId);
            }
            Repeater1.DataSource = sclist;
            Repeater1.DataBind();
        }
Ejemplo n.º 12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         //绑定下拉框
         int StuId = Convert.ToInt32(((Model.Login)Session["CurrentUser"]).UserName);
         List <CourseMana> Seasonlist = new CourseManege().querySeason(StuId);
         foreach (CourseMana Season in Seasonlist)
         {
             ddlseason.Items.Add(Season.Season);
         }
         //显示数据
         List <Model.Score> sclist = new ScoreManage().queryScore(StuId);
         Repeater1.DataSource = sclist;
         Repeater1.DataBind();
     }
 }
Ejemplo n.º 13
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         int             stuId    = Convert.ToInt32(Request.Params["StuId"]);
         int             CourseId = Convert.ToInt32(Request.Params["CourseId"]);
         List <ScoreExt> sclist   = new ScoreManage().queryScorebyCIdSId(CourseId, stuId);
         CourseMana      course   = new ScoreManage().queryRatio(CourseId);
         MatchRatio.Text     = course.MatchRatio.ToString();
         ClassRatio.Text     = course.ClassRatio.ToString();
         StuName.Text        = sclist[0].StuName.ToString();
         StuId.Text          = sclist[0].StuId.ToString();
         CourseName.Text     = sclist[0].CourseName.ToString();
         old_ClassScore.Text = sclist[0].ClassScore.ToString();
         old_MatchScore.Text = sclist[0].MatchScore.ToString();
         old_FinalScore.Text = sclist[0].FinalScore.ToString();
     }
 }
Ejemplo n.º 14
0
        protected void ddlclass_SelectedIndexChanged(object sender, EventArgs e)
        {
            string ClassId  = ddlclass.SelectedItem.Text.Trim();
            int    CourseId = Convert.ToInt32(Request.Params["CourseId"]);

            if (ClassId == "请选择")
            {
                List <ScoreExt> sclist = new ScoreManage().queryScorebyCourseId(CourseId);
                Repeater1.DataSource = sclist;
                Repeater1.DataBind();
            }
            else
            {
                List <ScoreExt> sclist = new ScoreManage().queryScorebyClassId(CourseId, ClassId);
                Repeater1.DataSource = sclist;
                Repeater1.DataBind();
            }
        }
Ejemplo n.º 15
0
    // Use this for initialization
    void Start()
    {
        GameObject gameControllerObject = GameObject.FindWithTag("HandControl");

        if (gameControllerObject != null)
        {
            handController = gameControllerObject.GetComponent <HandController>();
        }
        scorr = gameObject.GetComponent <ScoreManage>();
        if (ScoreManage3.score3 <= 20000)
        {
            Obj.GetComponent <Renderer>().material.mainTexture = textur1;
        }
        else
        {
            Obj.GetComponent <Renderer>().material.mainTexture = textur2;
        }
    }
Ejemplo n.º 16
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "application/x-excel";
            //将HTTP头添加到输出流,设置默认导出的文件名
            int    StuId    = Convert.ToInt32(context.Request.QueryString["StuId"]);
            string StuName  = context.Request.QueryString["StuName"].ToString();
            string filename = HttpUtility.UrlEncode(StuId + StuName + "成绩表.xls");

            context.Response.AddHeader("Content-Disposition", "attachment;filename=" + filename);
            //创建Excel工作簿和工作表
            HSSFWorkbook workbook = new HSSFWorkbook();
            ISheet       newsheet = workbook.CreateSheet("学生成绩表");
            //创建工作表的标题
            IRow rowHeader = newsheet.CreateRow(0);

            rowHeader.CreateCell(0, CellType.Numeric).SetCellValue("课程名");
            rowHeader.CreateCell(1, CellType.String).SetCellValue("课程性质");
            rowHeader.CreateCell(2, CellType.String).SetCellValue("学分");
            rowHeader.CreateCell(3, CellType.Numeric).SetCellValue("学院");
            rowHeader.CreateCell(4, CellType.Numeric).SetCellValue("教师");
            rowHeader.CreateCell(5, CellType.Numeric).SetCellValue("学期");
            rowHeader.CreateCell(6, CellType.Numeric).SetCellValue("平时成绩");
            rowHeader.CreateCell(7, CellType.Numeric).SetCellValue("期末成绩");
            rowHeader.CreateCell(8, CellType.Numeric).SetCellValue("总成绩");

            //查询数据
            List <Model.Score> sclist = new ScoreManage().queryScore(StuId);

            for (int i = 0; i < sclist.Count; i++)
            {
                IRow newRow = newsheet.CreateRow(i + 1);
                newRow.CreateCell(0, CellType.Numeric).SetCellValue(sclist[i].CourseName);
                newRow.CreateCell(1, CellType.Numeric).SetCellValue(sclist[i].courseproperty);
                newRow.CreateCell(2, CellType.Numeric).SetCellValue(sclist[i].Xuefen);
                newRow.CreateCell(3, CellType.Numeric).SetCellValue(sclist[i].CollegeName);
                newRow.CreateCell(4, CellType.Numeric).SetCellValue(sclist[i].TeaName);
                newRow.CreateCell(5, CellType.Numeric).SetCellValue(sclist[i].Season);
                newRow.CreateCell(6, CellType.Numeric).SetCellValue(sclist[i].ClassScore);
                newRow.CreateCell(7, CellType.Numeric).SetCellValue(sclist[i].MatchScore);
                newRow.CreateCell(8, CellType.Numeric).SetCellValue(sclist[i].FinalScore);
            }
            //将输出流写入Excel工作簿
            workbook.Write(context.Response.OutputStream);
        }
Ejemplo n.º 17
0
        protected void ddlseason_SelectedIndexChanged(object sender, EventArgs e)
        {
            string Season   = ddlseason.SelectedItem.Text.Trim();
            int    CourseId = Convert.ToInt32(Request.Params["CourseId"]);
            int    StuId    = Convert.ToInt32(((Model.Login)Session["CurrentUser"]).UserName);

            if (Season == "请选择")
            {
                List <Model.Score> sclist = new ScoreManage().queryScore(StuId);
                Repeater1.DataSource = sclist;
                Repeater1.DataBind();
            }
            else
            {
                List <Model.Score> scList = new ScoreManage().queryScoreBySea(StuId, Season);
                Repeater1.DataSource = scList;
                Repeater1.DataBind();
            }
        }
Ejemplo n.º 18
0
        protected void btn_change_Click(object sender, EventArgs e)
        {
            Model.Score sc = new Model.Score()
            {
                StuId      = Convert.ToInt32(Request.Params["StuId"]),
                CourseId   = Convert.ToInt32(Request.Params["CourseId"]),
                ClassScore = float.Parse(new_ClassScore.Text.ToString().Trim()),
                MatchScore = float.Parse(new_MatchScore.Text.ToString().Trim()),
                FinalScore = float.Parse(new_FinalScore.Text.ToString().Trim()),
            };
            int res = new ScoreManage().ChangeScore(sc);

            if (res > 0)
            {
                Response.Write("<script>alert('修改成功!');history.go(-2)</script>");
            }
            else
            {
                Response.Write("<script>alert('修改失败!');</script>");
            }
        }
Ejemplo n.º 19
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         int             CourseId = Convert.ToInt32(Request.Params["CourseId"]);
         List <ScoreExt> sclist   = new ScoreManage().queryScorebyCourseId(CourseId);
         Repeater1.DataSource = sclist;
         Repeater1.DataBind();
         //绑定下拉框
         List <Model.Class> clalist = new CourseManege().queryClassByCourseId(CourseId);
         string             ClassId;
         foreach (Model.Class Class in clalist)
         {
             ClassId = Class.ClassId;
             ddlclass.Items.Add(ClassId);
         }
         //显示计分比例
         CourseMana course = new ScoreManage().queryRatio(CourseId);
         MatchRatio.Text = course.MatchRatio.ToString();
         ClassRatio.Text = course.ClassRatio.ToString();
     }
 }
Ejemplo n.º 20
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            float matchratio = float.Parse(TextBox2.Text.Trim());
            float classratio = float.Parse(TextBox1.Text.Trim());

            for (int i = 0; i < Repeater1.Items.Count; i++)
            {
                Model.Score sc = new Model.Score()
                {
                    StuId      = Convert.ToInt32(((Literal)Repeater1.Items[i].FindControl("StuId")).Text.Trim()),
                    CourseId   = Convert.ToInt32(Request.Params["CourseId"]),
                    MatchScore = float.Parse(((TextBox)(Repeater1.Items[i].Controls[0].FindControl("matchScore"))).Text),
                    ClassScore = float.Parse(((TextBox)(Repeater1.Items[i].FindControl("classScore"))).Text),
                    FinalScore = float.Parse(((TextBox)(Repeater1.Items[i].FindControl("matchScore"))).Text) * matchratio + float.Parse(((TextBox)(Repeater1.Items[i].FindControl("classScore"))).Text) * classratio
                };
                int result = new ScoreManage().addStuScore(sc);
                if (result == 0)
                {
                    Response.Write("<script>window.alert('成功添加了" + i + "名同学的成绩,第" + i + 1 + "位同学成绩添加失败!');</script>");
                    break;
                }
            }
            Response.Write("<script>window.alert('成功添加了" + Repeater1.Items.Count + "名同学的成绩');</script>");
        }
Ejemplo n.º 21
0
 // Start is called before the first frame update
 void Start()
 {
     coinpicksound = GameObject.Find("CoinPickSound").GetComponent <AudioSource>();
     scoreManager  = FindObjectOfType <ScoreManage>();
 }
Ejemplo n.º 22
0
    //private string[] _names = new string[10];


    void Awake()
    {
        _scoreManage = Camera.main.GetComponent <ScoreManage>();
        _player      = Camera.main.GetComponent <Player>();
    }
Ejemplo n.º 23
0
        private void 成绩管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ScoreManage scoreManage = new ScoreManage();

            scoreManage.ShowDialog();
        }
Ejemplo n.º 24
0
        /// <summary>
        /// 读取数据和计算评分
        /// </summary>
        /// <returns>评分json</returns>
        static string LoadDataAndGetGrade()
        {
            Log.WriteLog(true, "开始读取数据结构", 0.0, null);
            ScoreManage sm = ScoreManage.LoadGradeObject("loadfullscorestruct", "C_Grade", new StructNames(), LoadDealerInfo, Config.Settings["Engine"]);

            //ScoreManage.Engine.EngineConfig.CommandFactory.CreateCommand().ExecuteDataTable("TRUNCATE TABLE C_JXSMC ");
            //Log.WriteLog(true, sm.GetGradeLog, 0);
            sm.ReCordLog = Program.recordLog;
            Log.WriteLog(true, "开始计算评分", 0.0, null);
            List <Dealer> dealers = sm.GetGrade(true);

            if (Program.recordLog)
            {
                Log.WriteLog(true, sm.GetGradeLog, 0.0, null);
            }
            JArray        jarray  = new JArray();
            JArray        ret     = new JArray();
            List <string> sqlList = new List <string>();

            foreach (Dealer item in dealers)
            {
                JObject token = new JObject();
                token.Add("menu_name", "customer_success");
                token.Add("third_system_no", item.DealerId);
                token.Add("account", item.DealerAccount);
                token.Add("dealerType", item.DealerType);
                token.Add("dealerKind", item.DealerKind);
                token.Add("dealerName", item.DealerName);
                token.Add("hasScore", item.ResultList.Count > 0 ? "1" : "0");
                token.Add("SystemScore", item.ResultList.Count > 0 ? item.ResultList[0].TotalScore.ToString() : "");
                token.Add("grade", item.ResultList.Count > 0 ? item.ResultList[0].ResultGrade : "");
                ret.Add(token);
                Score rw = item.ResultList.Count > 0 ? item.ResultList[0].Scores.FirstOrDefault(x => x.ScoreName == "入网评分") : null;
                Score yw = item.ResultList.Count > 0 ? item.ResultList[0].Scores.FirstOrDefault(x => x.ScoreName == "业务评分") : null;
                sqlList.Add(DealerGrade.Replace("[VALUES]",
                                                "'" + item.DealerId + "','" + item.DealerName + "','" + item.DealerType + "','" +
                                                (rw != null ? rw.RealScore.ToString() : "") + "','" +
                                                (yw != null ? yw.RealScore.ToString() : "") + "','" +
                                                (item.ResultList.Count > 0 ? item.ResultList[0].TotalScore.ToString() : "") + "','" +
                                                (item.ResultList.Count > 0 ? item.ResultList[0].ResultGrade : "") + "','" +
                                                item.DealerKind + "','" + DateTime.Now.Year + "','" + DateTime.Now.Month + "','" +
                                                DateTime.Now.Day + "','" + item.DealerId + "','" + (item.ResultList.Count > 0 ? "1" : "0") + "'"));
            }
            try
            {
                foreach (string sql in sqlList)
                {
                    int i = ScoreManage.Engine.EngineConfig.CommandFactory.CreateCommand().ExecuteNonQuery(sql);
                }
            }
            catch (Exception e)
            {
            }
            string sendData = ret.ToString();

            if (!Directory.Exists(".\\WaitPush"))
            {
                Directory.CreateDirectory(".\\WaitPush");
            }
            StreamWriter sw = new StreamWriter(".\\WaitPush\\" + DateTime.Now.ToString("yyyy_MM_dd_HH_mm_ss_fff") + ".txt");

            sw.Write(sendData);
            sw.Close();

            return("源数据:\r\n" + JsonConvert.SerializeObject(dealers) + "\r\n处理后数据:\r\n" + sendData + "\r\n");
        }
Ejemplo n.º 25
0
        public void Index()
        {
            var context = HttpContext;

            context.Response.ContentType = "text/plain";
            string score  = "";
            string action = context.Request["action"] ?? "";

            _dealerName = context.Request["dealer"] ?? "";
            _dealerId   = context.Request["crmDealerId"] ?? "";
            string type       = context.Request["type"] ?? "";
            string dealerType = context.Request["dealerType"] ?? "";

            if (string.IsNullOrEmpty(_dealerName) || string.IsNullOrEmpty(type))
            {
                try
                {
                    string    sql = "SELECT DISTRIBUTOR,TYPE,DISTRIBUTORTYPE FROM I_ALLOWIN WHERE CRMDEALERID='" + _dealerId + "'";
                    DataTable dt  = AppUtility.Engine.EngineConfig.CommandFactory.CreateCommand().ExecuteDataTable(sql);
                    type        = dt.Rows[0]["TYPE"] + string.Empty;
                    dealerType  = dt.Rows[0]["DISTRIBUTORTYPE"] + string.Empty;
                    _dealerName = dt.Rows[0]["DISTRIBUTOR"] + string.Empty;
                }
                catch (Exception ex) { }
            }
            ScoreManage   sm        = ScoreManage.LoadGradeObject("loadfullscorestruct", "C_Grade", new StructNames(false), LoadDealerInfo, System.Configuration.ConfigurationManager.AppSettings["BPMEngine"]);
            List <Dealer> scoreList = sm.GetGrade();

            foreach (var dealer in scoreList)
            {
                foreach (var list in dealer.ResultList)
                {
                    if (type == list.DealerType && dealerType == list.DealerIntranet)
                    {
                        if (action == "Prewaring" || action == "Relegation" || action == "RiskPoint2")
                        {
                            score = list.TotalScore.ToString();
                        }
                        else
                        {
                            foreach (var item in list.Scores)
                            {
                                if (item.ScoreName == "入网评分" && (action == "AllowIn" || action == "RiskPoint1" || action == "UpdateEnterNet"))
                                {
                                    score = item.RealScore.ToString();
                                }
                            }
                        }
                    }
                }
            }
            if (action == "RiskPoint1" && !string.IsNullOrEmpty(_dealerName))
            {
                string sql =
                    "SELECT TOTAL,ICOUNT,CASE WHEN TOTAL IS NULL OR TOTAL = 0 THEN 0 ELSE ROUND(ICOUNT*100/TOTAL,2) END RATE FROM (" +
                    "SELECT DISTINCT IA.DISTRIBUTOR AS Dealer,IA.SystemScore,IA.TYPE,IA.DISTRIBUTORTYPE,IA.PROVINCE,IA.CITY,IA.CrmDealerId," +
                    "(SELECT COUNT(1) FROM in_cms.mv_dy_application_date_info@to_dy_cms cms WHERE cms.经销商名称 = IA.DISTRIBUTOR) TOTAL," +
                    "(SELECT COUNT(1) FROM in_cms.mv_dy_application_date_info@to_dy_cms cms WHERE cms.经销商名称 = IA.DISTRIBUTOR AND TO_DATE(cms.合同到期日,'yyyy-mm-dd')< SYSDATE) ICOUNT " +
                    "FROM I_ALLOWIN IA WHERE IA.DISTRIBUTOR = '" + _dealerName + "')";
                DataTable table = AppUtility.Engine.EngineConfig.CommandFactory.CreateCommand().ExecuteDataTable(sql);
                score += "|" + table.Rows[0]["RATE"] + "%";
            }
            //string ms = JsonConvert.SerializeObject(sm.GetGrade());
            context.Response.Write(score);
        }
Ejemplo n.º 26
0
        private void toolStripButton3_Click(object sender, EventArgs e)
        {
            ScoreManage scoreManage = new ScoreManage();

            scoreManage.ShowDialog();
        }