Exemple #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);
            }
        }
Exemple #2
0
        public static DataSet Validate(String xml, EDIFIles EDIFIles)
        {
            SqlParameter[] _parameters =
            {
                new SqlParameter("@xml", xml)
            };

            switch (EDIFIles)
            {
            case EDIFIles.Standard:
                return(SqlHelper.ExecuteDataset(ConnectionString, "sp_SOKanbanFiles_Standard_Validate", _parameters));

            case EDIFIles.TAM:
                return(SqlHelper.ExecuteDataset(ConnectionString, "sp_SOKanbanFiles_TAM_Validate", _parameters));

            case EDIFIles.ADM:
                return(SqlHelper.ExecuteDataset(ConnectionString, "sp_SOKanbanFiles_ADM_Validate", _parameters));

            case EDIFIles.HPM:
                return(SqlHelper.ExecuteDataset(ConnectionString, "sp_SOKanbanFiles_HPM_Validate", _parameters));

            case EDIFIles.ADMOES:
                return(SqlHelper.ExecuteDataset(ConnectionString, "sp_SOKanbanFiles_ADM_OES_Validate", _parameters));

            case EDIFIles.StandardQCReturn:
                return(SqlHelper.ExecuteDataset(ConnectionString, "sp_SOKanbanFiles_Standard_QCReturn_Validate", _parameters));

            default: return((DataSet)null);
            }
        }