コード例 #1
0
        public static Int32 Import(ISOKanbanFile SOKanbanFile, EDIFIles EDIFIles)
        {
            SqlParameter[] _parameters =
            {
                new SqlParameter("@Name", SOKanbanFile.Name)
                ,                         new SqlParameter("@ContentType", SOKanbanFile.ContentType)
                ,                         new SqlParameter("@Data", SOKanbanFile.Data)
                ,                         new SqlParameter("@Xml", SOKanbanFile.Xml)
                ,                         new SqlParameter("@SysCreator", SOKanbanFile.SysCreator)
            };

            switch (EDIFIles)
            {
            case EDIFIles.Standard:
                return(Convert.ToInt32(SqlHelper.ExecuteScalar(ConnectionString, "sp_SOKanbanFiles_Standard_Import", _parameters)));

            case EDIFIles.TAM:
                return(Convert.ToInt32(SqlHelper.ExecuteScalar(ConnectionString, "sp_SOKanbanFiles_TAM_Import", _parameters)));

            case EDIFIles.ADM:
                return(Convert.ToInt32(SqlHelper.ExecuteScalar(ConnectionString, "sp_SOKanbanFiles_ADM_Import", _parameters)));

            case EDIFIles.HPM:
                return(Convert.ToInt32(SqlHelper.ExecuteScalar(ConnectionString, "sp_SOKanbanFiles_HPM_Import", _parameters)));

            case EDIFIles.ADMOES:
                return(Convert.ToInt32(SqlHelper.ExecuteScalar(ConnectionString, "sp_SOKanbanFiles_ADM_OES_Import", _parameters)));

            case EDIFIles.StandardQCReturn:
                return(Convert.ToInt32(SqlHelper.ExecuteScalar(ConnectionString, "sp_SOKanbanFiles_Standard_QCReturn_Import", _parameters)));

            default: return(0);
            }
        }
コード例 #2
0
        public static Int32 Insert(ISOKanbanFile SOKanbanFile)
        {
            SqlParameter[] _parameters =
            {
                new SqlParameter("@Name", SOKanbanFile.Name)
                ,                         new SqlParameter("@ContentType", SOKanbanFile.ContentType)
                ,                         new SqlParameter("@Data", SOKanbanFile.Data)
                ,                         new SqlParameter("@SysCreator", SOKanbanFile.SysCreator)
            };

            return(Convert.ToInt32(SqlHelper.ExecuteScalar(ConnectionString, "sp_SOKanbanFiles_Insert", _parameters)));
        }