示例#1
0
        public ProspectStudentCase(int id, WorkspaceObject obj)
            : base(id, obj)
        {
            if (id < 0)
            {
                SubjectID = 1;
                BranchID = 1;
                LevelID = 1;
                SchoolID = 1;
                CaseStatusID = 1;
                StaffID = 833;

                WorkspaceBufferEngine engine = CurrentSession.BufferEngine;
                ProspectStudentCaseRemarks newremarks = new ProspectStudentCaseRemarks(engine.GetNextValidID(), this);
                newremarks.StaffID = CurrentSession.CredentialManager.ValidStaffID(1);
                AddRemark(newremarks);

            }
        }
示例#2
0
        public override void Populate()
        {
            DatabaseConnection connection = new DatabaseConnection(
                @"select * from CCEx_ProspectCase where intID = @id;");
            DataTable result = connection.AddParameter("@id", ID).Query;

            SubjectID = (int)result.Rows[0]["intSubjectID"];
            BranchID = (int)result.Rows[0]["intBranchID"];
            LevelID = (int)result.Rows[0]["intLevelID"];
            SchoolID = (int)result.Rows[0]["intSchoolID"];
            CaseStatusID = (int)result.Rows[0]["intStatusID"];
            StaffID = (int)result.Rows[0]["intOwnerID"];

            WorkspaceBufferEngine engine = CurrentSession.BufferEngine;
            ProspectStudentCaseRemarks newremarks = new ProspectStudentCaseRemarks(engine.GetNextValidID(), this);
            newremarks.StaffID = CurrentSession.CredentialManager.ValidStaffID(1);
            AddRemark(newremarks);

            connection = new DatabaseConnection(
                @"select CCex_ProspectCaseConversation.intID from CCex_ProspectCaseConversation where intCaseID = @caseid order by dtmConverse desc");

            foreach (DataRow row in connection.AddParameter("@caseid", ID).Query.Rows)
                AddRemark(new ProspectStudentCaseRemarks((int)row[0], this));

            connection = new DatabaseConnection(
                @"select intID from CCEx_ProspectCaseAvailability where intCaseID = @caseid;");

            foreach (DataRow row in connection.AddParameter("@caseid", ID).Query.Rows)
                AddAvailability(new ProspectStudentCaseAvailability((int)row[0], this));
        }
示例#3
0
 public void AddRemark(ProspectStudentCaseRemarks remark)
 {
     _remarks.Add(remark);
 }