Exemplo n.º 1
0
        public int ResetPassword(string EMP_ID)
        {
            var password = this.Encode("123456");
            var sql      = "UPDATE EMPLOYEE SET PASSWORD=@PASSWORD WHERE ID=@EMP_ID";

            return(DBManager <EMPLOYEE> .Execute(sql, new { EMP_ID = EMP_ID, PASSWORD = password }));
        }
Exemplo n.º 2
0
        public virtual int Insert(string FROM_MONTH, string TO_MONTH, string NAME)
        {
            var sql = "INSERT INTO COURSE(FROM_MONTH,TO_MONTH,NAME) VALUES(@FROM_MONTH,@TO_MONTH,@NAME)";

            return(DBManager <COURSE> .Execute(sql, new
            {
                FROM_MONTH = FROM_MONTH,
                TO_MONTH = TO_MONTH,
                NAME = NAME
            }));
        }
Exemplo n.º 3
0
        public virtual int Delete(int ID = 0)
        {
            var sql = "DELETE FROM ASSIGN ";

            if (ID == 0)
            {
                return(DBManager <ASSIGN> .Execute(sql));
            }
            sql += " WHERE ID=@ID ";
            return(DBManager <ASSIGN> .Execute(sql, new { ID = ID }));
        }
Exemplo n.º 4
0
        public virtual int Update(int ID, string FROM_MONTH, string TO_MONTH, string NAME)
        {
            var sql = "UPDATE COURSE SET FROM_MONTH=@FROM_MONTH,TO_MONTH=@TO_MONTH, NAME=@NAME WHERE ID=@ID";

            return(DBManager <COURSE> .Execute(sql, new
            {
                ID = ID,
                FROM_MONTH = FROM_MONTH,
                TO_MONTH = TO_MONTH,
                NAME = NAME
            }));
        }
Exemplo n.º 5
0
        public virtual int Insert(int HIS_ID, int COURSE_ID, string EMP_ID, string MENTOR, string APPROVE = "Unconfirmed", string DEPT = "")
        {
            var sql = "INSERT INTO HIS_DETAIL(HIS_ID,APPROVE,COURSE_ID,EMP_ID,MENTOR,DEPT) VALUES(@HIS_ID,@APPROVE,@COURSE_ID,@EMP_ID,@MENTOR,@DEPT)";

            return(DBManager <HIS_DETAIL> .Execute(sql, new
            {
                HIS_ID = HIS_ID,
                APPROVE = APPROVE,
                COURSE_ID = COURSE_ID,
                EMP_ID = EMP_ID,
                MENTOR = MENTOR,
                DEPT = DEPT
            }));
        }
Exemplo n.º 6
0
        public int ChangePassword(string EmpId, string pass, string newpass)
        {
            var sql = "UPDATE EMPLOYEE SET PASSWORD=@NEWPASS WHERE ID=@EMP_ID AND PASSWORD=@PASS";

            return(DBManager <EMPLOYEE> .Execute(sql, new { NEWPASS = newpass, EMP_ID = EmpId, PASS = pass }));
        }
Exemplo n.º 7
0
        public virtual int Update(int ID, string NAME)
        {
            var sql = "UPDATE SUBJECT SET NAME=@NAME WHERE ID=@ID";

            return(DBManager <SUBJECT> .Execute(sql, new { ID = ID, NAME = NAME }));
        }
Exemplo n.º 8
0
        public virtual int Insert(string NAME)
        {
            var sql = "INSERT INTO SUBJECT(NAME) VALUES(@NAME)";

            return(DBManager <SUBJECT> .Execute(sql, new { NAME = NAME }));
        }
Exemplo n.º 9
0
        public virtual int Update(int ID, string COLUMN, string VALUE)
        {
            var sql = string.Format(@"UPDATE HISTORY SET {0}=@VALUE WHERE ID=@ID", COLUMN);

            return(DBManager <HISTORY> .Execute(sql, new { ID = ID, VALUE = VALUE }));
        }
Exemplo n.º 10
0
        public virtual int Update(int ID, int SCORE, string RESULT_LEVEL)
        {
            var sql = "UPDATE HISTORY SET SCORE=@SCORE,RESULT_LEVEL=@RESULT_LEVEL WHERE ID=@ID";

            return(DBManager <HISTORY> .Execute(sql, new { ID = ID, SCORE = SCORE, RESULT_LEVEL = RESULT_LEVEL }));
        }
Exemplo n.º 11
0
        public virtual int Approve(int ID, string APPROVE)
        {
            var sql = "UPDATE HIS_DETAIL SET APPROVE=@APPROVE WHERE ID=@ID";

            return(DBManager <HIS_DETAIL> .Execute(sql, new { ID = ID, APPROVE = APPROVE }));
        }
Exemplo n.º 12
0
        public virtual int Update(string ID, string NAME, string DEPARTMENT, int ROLE)
        {
            var sql = "UPDATE EMPLOYEE SET NAME=@NAME,DEPARTMENT=@DEPARTMENT,ROLE=@ROLE WHERE ID=@ID";

            return(DBManager <EMPLOYEE> .Execute(sql, new { ID = ID, NAME = NAME, DEPARTMENT = DEPARTMENT, ROLE = ROLE }));
        }
Exemplo n.º 13
0
        public virtual int Update(int ID, string EMP_ID, string MENTOR, int COURSE_ID)
        {
            var sql = "UPDATE ASSIGN SET EMP_ID=@EMP_ID,MENTOR=@MENTOR,COURSE_ID=@COURSE_ID WHERE ID=@ID";

            return(DBManager <ASSIGN> .Execute(sql, new { ID = ID, EMP_ID = EMP_ID, MENTOR = MENTOR, COURSE_ID = COURSE_ID }));
        }
Exemplo n.º 14
0
        public virtual int UpdateByMentor(int ID, string STATUS, string SUB_CONTENT, string SUB_LEVEL, DateTime START_DT, DateTime END_DT)
        {
            var sql = "UPDATE HIS_DETAIL SET STATUS=@STATUS,SUB_CONTENT=@SUB_CONTENT,SUB_LEVEL=@SUB_LEVEL,START_DT=@START_DT,END_DT=@END_DT WHERE ID=@ID";

            return(DBManager <HIS_DETAIL> .Execute(sql, new { ID = ID, STATUS = STATUS, SUB_CONTENT = SUB_CONTENT, SUB_LEVEL = SUB_LEVEL, START_DT = START_DT, END_DT = END_DT }));
        }
Exemplo n.º 15
0
        public virtual int Update(int DETAIL_ID, string IMG_URL)
        {
            var sql = "UPDATE ACTIVITY_IMG SET DETAIL_ID=@DETAIL_ID,IMG_URL=@IMG_URL WHERE ID=@ID";

            return(DBManager <ACTIVITY_IMG> .Execute(sql, new { DETAIL_ID = DETAIL_ID, IMG_URL = IMG_URL }));
        }
Exemplo n.º 16
0
        public virtual int Insert(int DETAIL_ID, string IMG_URL)
        {
            var sql = "INSERT INTO ACTIVITY_IMG(DETAIL_ID,IMG_URL) VALUES(@DETAIL_ID,@IMG_URL)";

            return(DBManager <ACTIVITY_IMG> .Execute(sql, new { DETAIL_ID = DETAIL_ID, IMG_URL = IMG_URL }));
        }
Exemplo n.º 17
0
        public virtual int UpdateTestTime(int ID, DateTime TEST_TIME)
        {
            var sql = "UPDATE HIS_DETAIL SET TEST_TIME=@TEST_TIME WHERE ID=@ID";

            return(DBManager <HIS_DETAIL> .Execute(sql, new { ID = ID, TEST_TIME = TEST_TIME }));
        }
Exemplo n.º 18
0
        public virtual int MNGComment(int ID, string MANAGER_CMT)
        {
            var sql = "UPDATE HIS_DETAIL SET MANAGER_CMT=@MANAGER_CMT WHERE ID=@ID";

            return(DBManager <HIS_DETAIL> .Execute(sql, new { ID = ID, MANAGER_CMT = MANAGER_CMT }));
        }
Exemplo n.º 19
0
        public virtual int HRComment(int ID, string HR_CMT)
        {
            var sql = "UPDATE HIS_DETAIL SET HR_CMT=@HR_CMT WHERE ID=@ID";

            return(DBManager <HIS_DETAIL> .Execute(sql, new { ID = ID, HR_CMT = HR_CMT }));
        }
Exemplo n.º 20
0
        public virtual int Update(int ID, int SUB_ID, string STATUS, string SUB_CONTENT, string SUB_LEVEL, DateTime START_DT, DateTime END_DT, string APPROVE, string OUTCOME_TEMPLATE, string OUTCOME_RESULT, DateTime REC_START_DT, DateTime REC_END_DT, DateTime TEST_TIME)
        {
            var sql = "UPDATE HIS_DETAIL SET SUB_ID=@SUB_ID,STATUS=@STATUS,SUB_CONTENT=@SUB_CONTENT,SUB_LEVEL=@SUB_LEVEL,START_DT=@START_DT,END_DT=@END_DT,APPROVE=@APPROVE,OUTCOME_TEMPLATE=@OUTCOME_TEMPLATE,OUTCOME_RESULT=@OUTCOME_RESULT,REC_START_DT=@REC_START_DT,REC_END_DT=@REC_END_DT,TEST_TIME=@TEST_TIME WHERE ID=@ID";

            return(DBManager <HIS_DETAIL> .Execute(sql, new { ID = ID, SUB_ID = SUB_ID, STATUS = STATUS, SUB_CONTENT = SUB_CONTENT, SUB_LEVEL = SUB_LEVEL, START_DT = START_DT, END_DT = END_DT, APPROVE = APPROVE, OUTCOME_TEMPLATE = OUTCOME_TEMPLATE, OUTCOME_RESULT = OUTCOME_RESULT, REC_START_DT = REC_START_DT, REC_END_DT = REC_END_DT, TEST_TIME = TEST_TIME }));
        }
Exemplo n.º 21
0
        public virtual int Insert(string ID, string NAME, string DEPARTMENT, string PICTURE, int ROLE, string PASSWORD)
        {
            var sql = "INSERT INTO EMPLOYEE(ID, NAME,DEPARTMENT,PICTURE,ROLE,PASSWORD) VALUES(@ID,@NAME,@DEPARTMENT,@PICTURE,@ROLE,@PASSWORD)";

            return(DBManager <EMPLOYEE> .Execute(sql, new { ID = ID, NAME = NAME, DEPARTMENT = DEPARTMENT, PICTURE = PICTURE, ROLE = ROLE, PASSWORD = PASSWORD }));
        }
Exemplo n.º 22
0
        public virtual int Update(int ID, int COURSE_ID, string EMP_ID, int MENTOR, int SCORE, string RESULT_LEVEL)
        {
            var sql = "UPDATE HISTORY SET COURSE_ID=@COURSE_ID,EMP_ID=@EMP_ID,MENTOR=@MENTOR,SCORE=@SCORE,RESULT_LEVEL=@RESULT_LEVEL WHERE ID=@ID";

            return(DBManager <HISTORY> .Execute(sql, new { ID = ID, COURSE_ID = COURSE_ID, EMP_ID = EMP_ID, MENTOR = MENTOR, SCORE = SCORE, RESULT_LEVEL = RESULT_LEVEL }));
        }
Exemplo n.º 23
0
        public virtual int Insert(string EMP_ID, string MENTOR, int COURSE_ID)
        {
            var sql = "INSERT INTO ASSIGN(EMP_ID,MENTOR,COURSE_ID) VALUES(@EMP_ID,@MENTOR,@COURSE_ID)";

            return(DBManager <ASSIGN> .Execute(sql, new { EMP_ID = EMP_ID, MENTOR = MENTOR, COURSE_ID = COURSE_ID }));
        }
Exemplo n.º 24
0
        public virtual int UpdateByMentee(int ID, string OUTCOME_TEMPLATE, string OUTCOME_RESULT, DateTime REC_START_DT, DateTime REC_END_DT)
        {
            var sql = "UPDATE HIS_DETAIL SET OUTCOME_TEMPLATE=@OUTCOME_TEMPLATE,OUTCOME_RESULT=@OUTCOME_RESULT,REC_START_DT=@REC_START_DT,REC_END_DT=@REC_END_DT WHERE ID=@ID";

            return(DBManager <HIS_DETAIL> .Execute(sql, new { ID = ID, OUTCOME_TEMPLATE = OUTCOME_TEMPLATE, OUTCOME_RESULT = OUTCOME_RESULT, REC_START_DT = REC_START_DT, REC_END_DT = REC_END_DT }));
        }
Exemplo n.º 25
0
        public virtual int Insert(int COURSE_ID, string EMP_ID, string MENTOR)
        {
            var sql = "INSERT INTO HISTORY(COURSE_ID,EMP_ID,MENTOR) VALUES(@COURSE_ID,@EMP_ID,@MENTOR)";

            return(DBManager <HISTORY> .Execute(sql, new { COURSE_ID = COURSE_ID, EMP_ID = EMP_ID, MENTOR = MENTOR }));
        }
Exemplo n.º 26
0
        public virtual int Insert(string EMP_ID, int COURSE_ID, int SUB_ID, string STATUS, string SUB_CONTENT, string SUB_LEVEL, DateTime START_DT, DateTime END_DT, string APPROVE, string OUTCOME_TEMPLATE, string OUTCOME_RESULT, DateTime REC_START_DT, DateTime REC_END_DT, DateTime TEST_TIME)
        {
            var sql = "INSERT INTO HIS_DETAIL(EMP_ID,COURSE_ID,SUB_ID,STATUS,SUB_CONTENT,SUB_LEVEL,START_DT,END_DT,APPROVE,OUTCOME_TEMPLATE,OUTCOME_RESULT,REC_START_DT,REC_END_DT,TEST_TIME) VALUES(@EMP_ID,@COURSE_ID,@SUB_ID,@STATUS,@SUB_CONTENT,@SUB_LEVEL,@START_DT,@END_DT,@APPROVE,@OUTCOME_TEMPLATE,@OUTCOME_RESULT,@REC_START_DT,@REC_END_DT,@TEST_TIME)";

            return(DBManager <HIS_DETAIL> .Execute(sql, new { EMP_ID = EMP_ID, COURSE_ID = COURSE_ID, SUB_ID = SUB_ID, STATUS = STATUS, SUB_CONTENT = SUB_CONTENT, SUB_LEVEL = SUB_LEVEL, START_DT = START_DT, END_DT = END_DT, APPROVE = APPROVE, OUTCOME_TEMPLATE = OUTCOME_TEMPLATE, OUTCOME_RESULT = OUTCOME_RESULT, REC_START_DT = REC_START_DT, REC_END_DT = REC_END_DT, TEST_TIME = TEST_TIME }));
        }