Ejemplo n.º 1
0
        public int InsertProject(PROJECT project)
        {
            var sql = string.Format(@"INSERT INTO PROJECT(IDEA_ID,EMP_ID,IDEA_TITLE,PRJECT_GRADE,KPI_NAME,KPI_UNIT,BACKGROUND,NAME,
            INS_DT,PRJ_CURR,CURR_VALUE,ATTACHMENT) VALUES(@IDEA_ID,@EMP_ID,@IDEA_TITLE,@PRJECT_GRADE,@KPI_NAME,@KPI_UNIT,@BACKGROUND,@NAME,
            GETDATE(),@PRJ_CURR,@CURR_VALUE,@ATTACHMENT)");

            return(DBManager <PROJECT> .Execute(sql, project));
        }
Ejemplo n.º 2
0
        public string GetLastId()
        {
            var     sql = "SELECT TOP 1 IDEA_ID FROM PROJECT ORDER BY IDEA_ID DESC";
            PROJECT prj = DBManager <PROJECT> .ExecuteReader(sql).FirstOrDefault();

            if (prj == null)
            {
                return(string.Empty);
            }
            return(prj.IDEA_ID);
        }
Ejemplo n.º 3
0
        public string IsExist(string ID)
        {
            var     sql = "SELECT TOP 1 IDEA_ID FROM PROJECT WHERE IDEA_ID=@ID";
            PROJECT prj = DBManager <PROJECT> .ExecuteReader(sql, new { ID = ID }).FirstOrDefault();

            if (prj == null)
            {
                return(string.Empty);
            }
            return(prj.IDEA_ID);
        }